Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

posix pwd.h and grp.h unapplicable on win32 #140

Open
MagicalDrizzle opened this issue Mar 12, 2022 · 10 comments
Open

posix pwd.h and grp.h unapplicable on win32 #140

MagicalDrizzle opened this issue Mar 12, 2022 · 10 comments

Comments

@MagicalDrizzle
Copy link

I have been trying to build this on msys2, but it seems posix applications just doesn't play nice on windows (the two mentioned file not found)
is there a workaround?

[1/294] Compiling C object src/elinks.exe.p/document_css_css.c.obj
FAILED: src/elinks.exe.p/document_css_css.c.obj
"cc" "-Isrc/elinks.exe.p" "-Isrc" "-I../src" "-I." "-I.." "-IC:/msys64/mingw64/include" "-IC:/msys64/mingw64/include/libxml++-5.0" "-IC:/msys64/mingw64/lib/libxml++-5.0/include" "-IC:/msys64/mingw64/include/libxml2" "-fdiagnostics-color=always" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-g" "-DGETTEXT_PACKAGE=\"elinks\"" "-DBUILD_ID=\"2ec2d2b416d4cb58e2eb1dac773f9ef121439206-dirty\"" "-D_FORTIFY_SOURCE=2" "-D__USE_MINGW_ANSI_STDIO=1" "-DHAVE_CONFIG_H" "-fno-strict-aliasing" "-Wno-builtin-declaration-mismatch" "-Wno-address" "-xc++" "-fpermissive" "-Wno-sign-compare" "-std=c++17" -MD -MQ src/elinks.exe.p/document_css_css.c.obj -MF "src/elinks.exe.p/document_css_css.c.obj.d" -o src/elinks.exe.p/document_css_css.c.obj "-c" ../src/document/css/css.c
In file included from ../src/osdep/system.h:20,
                 from ../src/elinks.h:17,
                 from ../src/document/css/css.c:10:
../src/osdep/unix/sysinfo.h:26:10: fatal error: pwd.h: No such file or directory
   26 | #include <pwd.h>
      |          ^~~~~~~
compilation terminated.
[2/294] Compiling C object src/elinks.exe.p/dialogs_status.c.obj
FAILED: src/elinks.exe.p/dialogs_status.c.obj
"cc" "-Isrc/elinks.exe.p" "-Isrc" "-I../src" "-I." "-I.." "-IC:/msys64/mingw64/include" "-IC:/msys64/mingw64/include/libxml++-5.0" "-IC:/msys64/mingw64/lib/libxml++-5.0/include" "-IC:/msys64/mingw64/include/libxml2" "-fdiagnostics-color=always" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-g" "-DGETTEXT_PACKAGE=\"elinks\"" "-DBUILD_ID=\"2ec2d2b416d4cb58e2eb1dac773f9ef121439206-dirty\"" "-D_FORTIFY_SOURCE=2" "-D__USE_MINGW_ANSI_STDIO=1" "-DHAVE_CONFIG_H" "-fno-strict-aliasing" "-Wno-builtin-declaration-mismatch" "-Wno-address" "-xc++" "-fpermissive" "-Wno-sign-compare" "-std=c++17" -MD -MQ src/elinks.exe.p/dialogs_status.c.obj -MF "src/elinks.exe.p/dialogs_status.c.obj.d" -o src/elinks.exe.p/dialogs_status.c.obj "-c" ../src/dialogs/status.c
In file included from ../src/osdep/system.h:20,
                 from ../src/elinks.h:17,
                 from ../src/dialogs/status.c:9:
../src/osdep/unix/sysinfo.h:26:10: fatal error: pwd.h: No such file or directory
   26 | #include <pwd.h>
      |          ^~~~~~~
compilation terminated.
[3/294] Compiling C object src/elinks.exe.p/document_css_apply.c.obj
FAILED: src/elinks.exe.p/document_css_apply.c.obj
"cc" "-Isrc/elinks.exe.p" "-Isrc" "-I../src" "-I." "-I.." "-IC:/msys64/mingw64/include" "-IC:/msys64/mingw64/include/libxml++-5.0" "-IC:/msys64/mingw64/lib/libxml++-5.0/include" "-IC:/msys64/mingw64/include/libxml2" "-fdiagnostics-color=always" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-g" "-DGETTEXT_PACKAGE=\"elinks\"" "-DBUILD_ID=\"2ec2d2b416d4cb58e2eb1dac773f9ef121439206-dirty\"" "-D_FORTIFY_SOURCE=2" "-D__USE_MINGW_ANSI_STDIO=1" "-DHAVE_CONFIG_H" "-fno-strict-aliasing" "-Wno-builtin-declaration-mismatch" "-Wno-address" "-xc++" "-fpermissive" "-Wno-sign-compare" "-std=c++17" -MD -MQ src/elinks.exe.p/document_css_apply.c.obj -MF "src/elinks.exe.p/document_css_apply.c.obj.d" -o src/elinks.exe.p/document_css_apply.c.obj "-c" ../src/document/css/apply.c
In file included from ../src/osdep/system.h:20,
                 from ../src/elinks.h:17,
                 from ../src/document/css/apply.c:16:
../src/osdep/unix/sysinfo.h:26:10: fatal error: pwd.h: No such file or directory
   26 | #include <pwd.h>
      |          ^~~~~~~
compilation terminated.
[4/294] Compiling C object src/elinks.exe.p/document_css_stylesheet.c.obj
FAILED: src/elinks.exe.p/document_css_stylesheet.c.obj
"cc" "-Isrc/elinks.exe.p" "-Isrc" "-I../src" "-I." "-I.." "-IC:/msys64/mingw64/include" "-IC:/msys64/mingw64/include/libxml++-5.0" "-IC:/msys64/mingw64/lib/libxml++-5.0/include" "-IC:/msys64/mingw64/include/libxml2" "-fdiagnostics-color=always" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-g" "-DGETTEXT_PACKAGE=\"elinks\"" "-DBUILD_ID=\"2ec2d2b416d4cb58e2eb1dac773f9ef121439206-dirty\"" "-D_FORTIFY_SOURCE=2" "-D__USE_MINGW_ANSI_STDIO=1" "-DHAVE_CONFIG_H" "-fno-strict-aliasing" "-Wno-builtin-declaration-mismatch" "-Wno-address" "-xc++" "-fpermissive" "-Wno-sign-compare" "-std=c++17" -MD -MQ src/elinks.exe.p/document_css_stylesheet.c.obj -MF "src/elinks.exe.p/document_css_stylesheet.c.obj.d" -o src/elinks.exe.p/document_css_stylesheet.c.obj "-c" ../src/document/css/stylesheet.c
In file included from ../src/osdep/system.h:20,
                 from ../src/elinks.h:17,
                 from ../src/document/css/stylesheet.c:11:
../src/osdep/unix/sysinfo.h:26:10: fatal error: pwd.h: No such file or directory
   26 | #include <pwd.h>
      |          ^~~~~~~
compilation terminated.
[5/294] Compiling C object src/elinks.exe.p/document_css_parser.c.obj
FAILED: src/elinks.exe.p/document_css_parser.c.obj
"cc" "-Isrc/elinks.exe.p" "-Isrc" "-I../src" "-I." "-I.." "-IC:/msys64/mingw64/include" "-IC:/msys64/mingw64/include/libxml++-5.0" "-IC:/msys64/mingw64/lib/libxml++-5.0/include" "-IC:/msys64/mingw64/include/libxml2" "-fdiagnostics-color=always" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-g" "-DGETTEXT_PACKAGE=\"elinks\"" "-DBUILD_ID=\"2ec2d2b416d4cb58e2eb1dac773f9ef121439206-dirty\"" "-D_FORTIFY_SOURCE=2" "-D__USE_MINGW_ANSI_STDIO=1" "-DHAVE_CONFIG_H" "-fno-strict-aliasing" "-Wno-builtin-declaration-mismatch" "-Wno-address" "-xc++" "-fpermissive" "-Wno-sign-compare" "-std=c++17" -MD -MQ src/elinks.exe.p/document_css_parser.c.obj -MF "src/elinks.exe.p/document_css_parser.c.obj.d" -o src/elinks.exe.p/document_css_parser.c.obj "-c" ../src/document/css/parser.c
In file included from ../src/osdep/system.h:20,
                 from ../src/elinks.h:17,
                 from ../src/document/css/parser.c:11:
../src/osdep/unix/sysinfo.h:26:10: fatal error: pwd.h: No such file or directory
   26 | #include <pwd.h>
      |          ^~~~~~~
compilation terminated.
[6/294] Compiling C object src/elinks.exe.p/document_css_value.c.obj
FAILED: src/elinks.exe.p/document_css_value.c.obj
"cc" "-Isrc/elinks.exe.p" "-Isrc" "-I../src" "-I." "-I.." "-IC:/msys64/mingw64/include" "-IC:/msys64/mingw64/include/libxml++-5.0" "-IC:/msys64/mingw64/lib/libxml++-5.0/include" "-IC:/msys64/mingw64/include/libxml2" "-fdiagnostics-color=always" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-g" "-DGETTEXT_PACKAGE=\"elinks\"" "-DBUILD_ID=\"2ec2d2b416d4cb58e2eb1dac773f9ef121439206-dirty\"" "-D_FORTIFY_SOURCE=2" "-D__USE_MINGW_ANSI_STDIO=1" "-DHAVE_CONFIG_H" "-fno-strict-aliasing" "-Wno-builtin-declaration-mismatch" "-Wno-address" "-xc++" "-fpermissive" "-Wno-sign-compare" "-std=c++17" -MD -MQ src/elinks.exe.p/document_css_value.c.obj -MF "src/elinks.exe.p/document_css_value.c.obj.d" -o src/elinks.exe.p/document_css_value.c.obj "-c" ../src/document/css/value.c
In file included from ../src/osdep/system.h:20,
                 from ../src/elinks.h:17,
                 from ../src/document/css/value.c:11:
../src/osdep/unix/sysinfo.h:26:10: fatal error: pwd.h: No such file or directory
   26 | #include <pwd.h>
      |          ^~~~~~~
compilation terminated.
@rkd77
Copy link
Owner

rkd77 commented Mar 13, 2022

Try to build with this ^. If this does not help to compile, no idea. No access to Windows, sorry.

@MagicalDrizzle
Copy link
Author

now meson setup itself failed...weird

Checking for size of "int" : 4
Checking for size of "long" : 4
Checking for size of "long long" : 8
Checking for size of "off_t" : 8
Configuring config.h using configuration

src/osdep/meson.build:12:13: ERROR: The `==` operator of bool does not accept objects of type int (1)

@MagicalDrizzle
Copy link
Author

mm, weird that only the unix line has that...

if conf_data.get('CONFIG_OS_RISCOS')
	subdir('riscos')
endif
if conf_data.get('CONFIG_OS_UNIX') == 1
	subdir('unix')
endif
if conf_data.get('CONFIG_OS_WIN32')
	subdir('win32')
endif

removed == 1 and meson succeed now, though now it's termios.h not found

C:/msys64/mingw64/include/errno.h:138: note: this is the location of the previous definition
  138 | #define ENETUNREACH 118
      |
In file included from ../src/config/home.c:22:
../src/osdep/osdep.h:80:10: fatal error: termios.h: No such file or directory
   80 | #include <termios.h>
      |          ^~~~~~~~~~~
compilation terminated.

@rkd77
Copy link
Owner

rkd77 commented Mar 13, 2022

This ^ way you eventually compile it. If for some problematic header in the meson.build there is conf_data.set10(, try to change it conf_data.set( like in eb226fc.
In case of warnings do as in 27983d6 .

@MagicalDrizzle
Copy link
Author

what's the difference between libev and libevent (in the context of elinks)?

@rkd77
Copy link
Owner

rkd77 commented Mar 16, 2022

For libev is called libev's emulation of libevent.

@MagicalDrizzle
Copy link
Author

MagicalDrizzle commented Mar 27, 2022

seems quickjs detection is being weird...it's right there lol
itsrightthere

@rkd77
Copy link
Owner

rkd77 commented Mar 28, 2022

Where is located quickjs (folder name), and how is named library. For example show output of ls -l command in this directory.

@MagicalDrizzle
Copy link
Author

MagicalDrizzle commented Mar 28, 2022

it's there on the address bar, clang64/lib (i'm using clang)

ls -l /clang64/lib/quickjs
total 13780
-rw-r--r-- 1 Mizuki None 1243134 Mar 15 02:47 libquickjs
-rw-r--r-- 1 Mizuki None 5565186 Mar 28 01:40 libquickjs.a
-rw-r--r-- 1 Mizuki None 7296482 Mar 28 01:40 libquickjs.lto.a

I just compiled the 20210327 release then install it in my clang64/ folder

@rkd77
Copy link
Owner

rkd77 commented Mar 29, 2022

You can try insert at the beginning of build script:
export LIBRARY_PATH=/clang64
meson ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants