Sorry for the late reply, I was about to create a new thread as you suggested earlier and I got sidetracked by the fact that I once got lucky that the linker actually managed to link almost whole of libxul.so, only to fail because I forgot to
disable another pthread_setname_np and
didn't tell the compiler that Hurd doesn't have epoll...
Screenshot_2022-09-03_19-02-09.png
Seeing this success, I naively tried to link libxul again and again after fixing the linker's complaints, and luck didn't give me the chance this time. I wasted hours on that one...
Moonchild wrote: ↑2022-09-04, 09:10
Also, the "still linking" message should not pop up every minute, but only after like 20.
I was tinkering with config/link.py that time, thinking that maybe I could avoid getting the linker killed (and thus saving libxul.so) if I sent out enough console outputs. The plan obviously didn't work, and even if it did I would've run into the earlier epoll and pthread_setname_np issues anyway.
Moonchild wrote: ↑2022-09-04, 09:10
Right, so what's likely happening is that python gets pushed out of memory by the linker taking up all space, crashes, leaves the linking process hanging with no parent process which then gets terminated by the OS.
That seems to be the likely explanation then. If that's the case then I have no choice but to set up a cross-compilation environment with Linux as the host. I already got gcc, libgcc, and libstdc++ built targeting the Hurd, I just now have to figure out how to cross-compile Pale Moon. According to
Firefox's source docs, I just have to put something like "ac_add_options --target=i686-gnu" to my mozconfig. I also have to make sure CC and CXX points to the correct compilers, which would be i686-gnu-gcc and i686-gnu-g++ respectively. That's enough to make the configure script recognize that I'm cross-compiling.
Then I ran into a peculiar error:
Code: Select all
0:04.52 checking for c++... (cached) /usr/local/bin/i686-gnu-g++ -std=gnu++11
0:04.66 checking whether the C++ compiler (/usr/local/bin/i686-gnu-g++ -std=gnu++11 ) works... no
0:04.66 configure: error: installation or configuration problem: C++ compiler cannot create executables.
0:04.67 DEBUG: <truncated - see config.log for full output>
0:04.67 DEBUG: configure:1432: /usr/local/bin/i686-gnu-g++ -std=gnu++11 -o conftest conftest.C 1>&5
0:04.67 DEBUG: /usr/bin/i686-gnu-ld: /usr/local/lib/gcc/i686-gnu/12.2.0/../../../../i686-gnu/lib/libstdc++.so: undefined reference to `pthread_rwlock_unlock'
0:04.67 DEBUG: /usr/bin/i686-gnu-ld: /usr/local/lib/gcc/i686-gnu/12.2.0/../../../../i686-gnu/lib/libstdc++.so: undefined reference to `pthread_create'
0:04.67 DEBUG: /usr/bin/i686-gnu-ld: /usr/local/lib/gcc/i686-gnu/12.2.0/../../../../i686-gnu/lib/libstdc++.so: undefined reference to `pthread_key_create'
0:04.67 DEBUG: /usr/bin/i686-gnu-ld: /usr/local/lib/gcc/i686-gnu/12.2.0/../../../../i686-gnu/lib/libstdc++.so: undefined reference to `pthread_getspecific'
0:04.67 DEBUG: /usr/bin/i686-gnu-ld: /usr/local/lib/gcc/i686-gnu/12.2.0/../../../../i686-gnu/lib/libstdc++.so: undefined reference to `pthread_key_delete'
0:04.67 DEBUG: /usr/bin/i686-gnu-ld: /usr/local/lib/gcc/i686-gnu/12.2.0/../../../../i686-gnu/lib/libstdc++.so: undefined reference to `pthread_rwlock_rdlock'
0:04.67 DEBUG: /usr/bin/i686-gnu-ld: /usr/local/lib/gcc/i686-gnu/12.2.0/../../../../i686-gnu/lib/libstdc++.so: undefined reference to `pthread_once'
0:04.67 DEBUG: /usr/bin/i686-gnu-ld: /usr/local/lib/gcc/i686-gnu/12.2.0/../../../../i686-gnu/lib/libstdc++.so: undefined reference to `pthread_rwlock_wrlock'
0:04.67 DEBUG: /usr/bin/i686-gnu-ld: /usr/local/lib/gcc/i686-gnu/12.2.0/../../../../i686-gnu/lib/libstdc++.so: undefined reference to `pthread_join'
0:04.67 DEBUG: /usr/bin/i686-gnu-ld: /usr/local/lib/gcc/i686-gnu/12.2.0/../../../../i686-gnu/lib/libstdc++.so: undefined reference to `pthread_setspecific'
0:04.67 DEBUG: /usr/bin/i686-gnu-ld: /usr/local/lib/gcc/i686-gnu/12.2.0/../../../../i686-gnu/lib/libstdc++.so: undefined reference to `pthread_detach'
0:04.67 DEBUG: collect2: error: ld returned 1 exit status
0:04.67 DEBUG: configure: failed program was:
0:04.67 DEBUG:
0:04.67 DEBUG: #line 1427 "configure"
0:04.67 DEBUG: #include "confdefs.h"
0:04.67 DEBUG:
0:04.67 DEBUG: int main(){return(0);}
0:04.67 DEBUG: configure: error: installation or configuration problem: C++ compiler cannot create executables.
0:04.67 ERROR: old-configure failed
For whatever reason it is not including the pthread library, even though I have --with-pthreads in my mozconfig. In the end I decided to just give up looking at why old-configure is not including pthread libs and instead exported LDFLAGS with "-pthread". That seems to work and I'm now able to truly start compiling.
I will report back whether I succeeded or get stuck. Right now my compiler is complaining about missing <netinet/in.h>, which should be simple to fix (I've forgotten to copy that from my Hurd box).
My current mozconfig:
Code: Select all
export CC=i686-gnu-gcc
export CXX=i686-gnu-g++
export LDFLAGS="-pthread"
mk_add_options PYTHON=/usr/bin/python2
mk_add_options AUTOCONF=/usr/bin/autoconf-2.13
# Set GTK Version to 2 or 3
_GTK_VERSION=3
# Standard build options for Pale Moon
ac_add_options --enable-application=palemoon
ac_add_options --target=i686-gnu
ac_add_options --enable-optimize="-O2 -Wl,--no-keep-memory,--reduce-memory-overhead"
ac_add_options --enable-default-toolkit=cairo-gtk$_GTK_VERSION
ac_add_options --enable-phoenix-extensions
ac_add_options --enable-jemalloc
ac_add_options --enable-strip
ac_add_options --enable-devtools
ac_add_options --enable-av1
ac_add_options --enable-sndio
ac_add_options --enable-pulseaudio
ac_add_options --disable-alsa
ac_add_options --disable-gamepad
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-necko-wifi
ac_add_options --disable-updater
ac_add_options --disable-crashreporter
ac_add_options --disable-accessibility
ac_add_options --disable-parental-controls
ac_add_options --disable-eme
ac_add_options --disable-webrtc
ac_add_options --with-pthreads
# Please see https://www.palemoon.org/redist.shtml for restrictions when using the official branding.
ac_add_options --enable-official-branding
export MC_OFFICIAL=1
export MOZILLA_OFFICIAL=1
ac_add_options --x-libraries=/usr/lib64
export MOZ_PKG_SPECIAL=gtk$_GTK_VERSION
You do not have the required permissions to view the files attached to this post.