rmottola / Arctic-Fox

Web Browser for Mac OS X 10.6+, Linux (PowerPC, x86, amd64, ARM, MIPS), NetBSD, OpenBSD, and Windows XP.
Other
290 stars 35 forks source link

cdefs.h is an internal glibc header that should NEVER be used by any application. #178

Closed xplshn closed 6 months ago

xplshn commented 6 months ago

Just as the Gentoo wiki says:

cdefs.h is an internal glibc header that should NEVER be used by any application, see musl faq

Using cdefs.h prevents ArticFox from compiling with in Musl systems like Alpine, Adelie(PPC Linux distro), VoidLinux Musl and VoidLinux Musl PPC.

rmottola commented 6 months ago

Please provide a reference where this file is included.

rmottola commented 6 months ago

Where do you have issues on Alpine? For me compilation has an error in Hunspell and it doesn't seem related to cdefs.h at all. https://github.com/rmottola/Arctic-Fox/issues/125

xplshn commented 6 months ago

I am compiling in Void Linux. Both Alpine and Void use Musl as its LibC

xplshn commented 6 months ago

Alpine might have cdefs.h installed as an standalone lib, which is what Gentoo does too. https://wiki.gentoo.org/wiki/Musl_porting_notes

rmottola commented 6 months ago

still, tell me which files are causing you errors and I will se eif gecko has specific patches.

xplshn commented 6 months ago

Yes - Sorry, I was trying to recompile and I got this error:

 0:40.47 configure: error:  Could not find the following X libraries:  -lX11 -lXext -lXt
 0:40.47 *** Fix above errors and then restart with\
 0:40.47                "/usr/bin/make -f client.mk build"
 0:40.47 make[2]: *** [/void-packages/homebrew/Arctic-Fox/client.mk:362: configure] Error 1
 0:40.47 make[1]: *** [/void-packages/homebrew/Arctic-Fox/client.mk:374: /void-packages/homebrew/Arctic-Fox/obj-x86_64-unknown-linux-gnu/Makefile] Error 2
 0:40.47 make: *** [client.mk:171: build] Error 2
 0:40.48 0 compiler warnings present.
 0:40.50 Failed to parse ccache stats output: Cacheable calls:    505 / 548 (92.15%)
[anto@/portstree/masterdir Arctic-Fox]$ xbps-install -yu libXt-devel libX11-devel libXext-devel libX11 libXt libXe>
Package 'libXt-devel' is up to date.
Package 'libX11-devel' is up to date.
Package 'libXext-devel' is up to date.
Package 'libX11' is up to date.
Package 'libXt' is up to date.
Package 'libXext' is up to date.
[anto@/portstree/masterdir Arctic-Fox]$ 

The libraries are installed, yet it can't find them.

xplshn commented 6 months ago

After this step, the cdefs.h missing error should pop up.

xplshn commented 6 months ago
[anto@/portstree/masterdir Arctic-Fox]$ pkg-config --cflags --libs 'x11'
-lX11 
[anto@/portstree/masterdir Arctic-Fox]$ pkg-config --exists --print-errors 'x11'
[anto@/portstree/masterdir Arctic-Fox]$ pkg-config --exists --print-errors 'xext'
[anto@/portstree/masterdir Arctic-Fox]$ pkg-config --cflags --libs 'xext'
-lXext 
[anto@/portstree/masterdir Arctic-Fox]$ pkg-config --exists --print-errors 'xt'
[anto@/portstree/masterdir Arctic-Fox]$ pkg-config --cflags --libs 'xt'
-I/usr/include/uuid -lXt -lX11 
[anto@/portstree/masterdir Arctic-Fox]$ 

I do not understand where Clang, GCC and zig cc might be looking for the libraries.

rmottola commented 6 months ago

@xplshn I think here we have a strange issue with void linux, which I don't have. I don't think it has anything to do with cfdefs.h ? It might be that you don't need extra CFLAGS because void puts everything in /usr/include?

Gentoo works in this way, so I get:

pkg-config --cflags --libs 'x11'
 -lX11
pkg-config --cflags --libs 'xt'
-I/usr/include/uuid -lXt -lX11

On FreeBSD, instead, I get:

 pkg-config --cflags --libs 'x11'
-I/usr/local/include -D_THREAD_SAFE -L/usr/local/lib -lX11 

could you check in config..log and see how/why the test is failing?

PS are you compiling release 43.0, mater or dev?

xplshn commented 6 months ago

I tried with master. I will try to compile in a few hours, I want to replace Firefox by something lighter for my potato PC. Void does put every header at /usr/include/*, each library has one folder with the package name, I didn't add more CFLAGS to the default .mozconfig, I also tried with the one you used for Alpine.