elinks icon indicating copy to clipboard operation
elinks copied to clipboard

posix pwd.h and grp.h unapplicable on win32

Open MagicalDrizzle opened this issue 2 years ago • 10 comments

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.

MagicalDrizzle avatar Mar 12 '22 20:03 MagicalDrizzle

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

rkd77 avatar Mar 13 '22 11:03 rkd77

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 avatar Mar 13 '22 14:03 MagicalDrizzle

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.

MagicalDrizzle avatar Mar 13 '22 14:03 MagicalDrizzle

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 https://github.com/rkd77/elinks/commit/27983d603820cc76cbc87148bc24b55470f03610 .

rkd77 avatar Mar 13 '22 16:03 rkd77

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

MagicalDrizzle avatar Mar 16 '22 15:03 MagicalDrizzle

For libev is called libev's emulation of libevent.

rkd77 avatar Mar 16 '22 17:03 rkd77

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

MagicalDrizzle avatar Mar 27 '22 19:03 MagicalDrizzle

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

rkd77 avatar Mar 28 '22 13:03 rkd77

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

MagicalDrizzle avatar Mar 28 '22 19:03 MagicalDrizzle

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

rkd77 avatar Mar 29 '22 07:03 rkd77