Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Could not complete the build #1717

Closed
bymoye opened this issue Nov 2, 2020 · 18 comments
Closed

Could not complete the build #1717

bymoye opened this issue Nov 2, 2020 · 18 comments

Comments

@bymoye
Copy link

bymoye commented Nov 2, 2020

/usr/local/bin/ld: ../incubator-pagespeed-ngx-1.14.33.1-RC1/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.signals.o.o): in function pagespeed_ol_apr_signal_description_get':
signals.c:(.text.apr_signal_description_get+0xe): undefined reference to sys_siglist' collect2: error :ld return 1 make[1]: *** [objs/Makefile:457:objs/nginx] error 1
Fedora 33
Gcc:10
Help, I don't know how to solve this. I also tried the stable version with the same error.

@Lofesa
Copy link

Lofesa commented Nov 4, 2020

Maybe is a library incompatibility. Signals comes from the stardad c libraries ans seems that is used by apr_memcached.
@oschaaf can you take a look on to this?

@oschaaf
Copy link
Member

oschaaf commented Nov 4, 2020

fedora/gcc10 just isn't a platform that we test building on. There probably aren't any fundamental blockers, but it may take some trial and error to get this to work.

@bymoye
Copy link
Author

bymoye commented Nov 6, 2020

fedora / gcc10并不是我们测试构建的平台。可能没有任何基本的阻止程序,但是要使其正常工作可能需要反复试验。

But there is no problem in fedora 32 gcc:10.2.1....

@bymoye bymoye closed this as completed Nov 17, 2020
@bantilan
Copy link

bantilan commented Feb 3, 2021

Got the same error on Ubuntu 20.10 (groovy), GCC 10.2.0:

-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie -ldl -lpthread -lpthread -lcrypt /root/nginx-1.19.6/debian/modules/ngx_pagespeed/psol/lib/Release/linux/x64/pagespeed_automatic.a -lstdc++ -lrt -pthread -lm -luuid -lm -lpcre -lssl -lcrypto -ldl -lpthread -lz \
-Wl,-E
/usr/bin/ld: /root/nginx-1.19.6/debian/modules/ngx_pagespeed/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.signals.o.o): in function `pagespeed_ol_apr_signal_description_get':
signals.c:(.text.apr_signal_description_get+0xe): undefined reference to `sys_siglist'
collect2: error: ld returned 1 exit status
make[2]: *** [objs/Makefile:397: objs/nginx] Error 1
make[2]: Leaving directory '/root/nginx-1.19.6/debian/build-nginx'
make[1]: *** [Makefile:8: build] Error 2
make[1]: Leaving directory '/root/nginx-1.19.6/debian/build-nginx'
make: *** [debian/rules:52: build-arch.nginx] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

@am1github
Copy link

Same on Gentoo Linux 5.4.97; GCC 9.3.0

-L/usr/lib64 -L/usr/lib64 -Wl,-E -ldl -lpthread -lpthread -lcrypt -L/usr/lib64 -lluajit-5.1 -lm -ldl -lpam /opt/nginx/pagespeed/psol/lib/Release/linux/x64/pagespeed_automatic.a -lstdc++ -lrt -pthread -lm -luuid -lpcre -lssl -lcrypto -ldl -lpthread -lz -lgd -lGeoIP \
-Wl,-E -Wl,-O1 -Wl,--as-needed -L/usr/lib64/perl5/5.30.3/x86_64-linux/CORE -lperl -ldl -lm -lcrypt -lutil -lc \
-Wl,-E
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /opt/nginx/pagespeed/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.signals.o.o): in function `pagespeed_ol_apr_signal_description_get':
signals.c:(.text.apr_signal_description_get+0xe): undefined reference to `sys_siglist'
collect2: error: ld returned 1 exit status

Any solutions available for this?

@eilandert
Copy link

Same on Ubuntu 21.04 gcc 10.2.0

/usr/bin/ld: /usr/src/incubator-pagespeed-mod/pagespeed/automatic/pagespeed_automatic.a(107.signals.o.o): in function pagespeed_ol_apr_signal_description_get': signals.c:(.text.apr_signal_description_get+0xe): undefined reference to sys_siglist'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:287: /usr/src/incubator-pagespeed-mod/pagespeed/automatic/static_rewriter] Error 1
make: *** [Makefile:256: all] Error 2

@drillsar
Copy link

Not solved? Same on Gentoo Linux 5.10.27; gcc 10.3.0

/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/src/mod_pagespeed/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.signals.o.o): in function pagespeed_ol_apr_signal_description_get': signals.c:(.text.apr_signal_description_get+0xe): undefined reference to sys_siglist'
collect2: error: ld returned 1 exit status
make[1]: *** [objs/Makefile:276: objs/nginx] Error 1
make[1]: Leaving directory '/var/tmp/portage/www-servers/nginx-1.21.0/work/nginx-1.21.0'
make: *** [Makefile:10: build] Error 2

@valsha
Copy link

valsha commented Aug 3, 2021

Ubuntu 20.04

/usr/bin/ld: /root/incubator-pagespeed-ngx-latest-stable/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.signals.o.o): in function pagespeed_ol_apr_signal_description_get': signals.c:(.text.apr_signal_description_get+0xe): undefined reference to sys_siglist'
collect2: error: ld returned 1 exit status
make[1]: *** [objs/Makefile:289: objs/nginx] Error 1
make[1]: Leaving directory '/root/nginx-1.21.1'
make: *** [Makefile:10: build] Error 2
Error: Failure running 'make', exiting.

@Lofesa
Copy link

Lofesa commented Aug 4, 2021

Maybe gcc version related?

@eilandert
Copy link

it's glibc related I believe, every distribution released since +/- 1 year won't be able to compile, see #1735. I can compile it on ubuntu focal but not later.

@Lofesa
Copy link

Lofesa commented Aug 4, 2021

I don´t know if in Ubuntu can be set a dual gcc installation or downgrade the gcc.
I compile the module with gcc 9.3.1 on a centos 7 server and it build

@eilandert
Copy link

Personally, I have no problems to build on focal or whatever distribution, as I build in Docker. But I do think this a problem what should be solved in the long-term future. Unfortunately I have too little knowledge on the problem to help fix this :-(

@RaitoBezarius
Copy link

Just ran into this issue on NixOS unstable.

@medamin25
Copy link

also in NixOS stable.

nix error: building nix env: exit status 100
Output has been trimmed to the last 20 lines
/nix/store/rq6bh3qfrqnyqwik0w3q6w180zg3w2pa-binutils-2.38/bin/ld: warning: libssl.so.1.1, needed by /nix/store/2ksd6iaqmqk3q53jd2j01z7k1f3i8kl7-srt-1.4.4/lib64/libsrt.so.1.4, may conflict with libssl.so.3
/nix/store/rq6bh3qfrqnyqwik0w3q6w180zg3w2pa-binutils-2.38/bin/ld: warning: libcrypto.so.1.1, needed by /nix/store/2ksd6iaqmqk3q53jd2j01z7k1f3i8kl7-srt-1.4.4/lib64/libsrt.so.1.4, may conflict with libcrypto.so.3
/nix/store/rq6bh3qfrqnyqwik0w3q6w180zg3w2pa-binutils-2.38/bin/ld: warning: libcrypto.so.1.1, needed by /nix/store/2ksd6iaqmqk3q53jd2j01z7k1f3i8kl7-srt-1.4.4/lib64/libsrt.so.1.4, may conflict with libcrypto.so.3
/nix/store/rq6bh3qfrqnyqwik0w3q6w180zg3w2pa-binutils-2.38/bin/ld: /nix/store/dgg4ycikp5wmln9jvg4dx6hp245am2mw-ngx_pagespeed/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.signals.o.o): in function `pagespeed_ol_apr_signal_description_get':
signals.c:(.text.apr_signal_description_get+0xe): undefined reference to `sys_siglist'
/nix/store/rq6bh3qfrqnyqwik0w3q6w180zg3w2pa-binutils-2.38/bin/ld: /nix/store/dgg4ycikp5wmln9jvg4dx6hp245am2mw-ngx_pagespeed/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.proc_mutex.o.o): in function `proc_mutex_pthread_tryacquire':
proc_mutex.c:(.text.proc_mutex_pthread_tryacquire+0x3c): undefined reference to `pthread_mutex_consistent_np'
/nix/store/rq6bh3qfrqnyqwik0w3q6w180zg3w2pa-binutils-2.38/bin/ld: /nix/store/dgg4ycikp5wmln9jvg4dx6hp245am2mw-ngx_pagespeed/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.proc_mutex.o.o): in function `proc_mutex_pthread_acquire':
proc_mutex.c:(.text.proc_mutex_pthread_acquire+0x2c): undefined reference to `pthread_mutex_consistent_np'
/nix/store/rq6bh3qfrqnyqwik0w3q6w180zg3w2pa-binutils-2.38/bin/ld: /nix/store/dgg4ycikp5wmln9jvg4dx6hp245am2mw-ngx_pagespeed/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.proc_mutex.o.o): in function `proc_mutex_pthread_create':
proc_mutex.c:(.text.proc_mutex_pthread_create+0xac): undefined reference to `pthread_mutexattr_setrobust_np'
/nix/store/rq6bh3qfrqnyqwik0w3q6w180zg3w2pa-binutils-2.38/bin/ld: /nix/store/dgg4ycikp5wmln9jvg4dx6hp245am2mw-ngx_pagespeed/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.thread.o.o): in function `pagespeed_ol_apr_thread_yield':
thread.c:(.text.apr_thread_yield+0x1): undefined reference to `pthread_yield'
collect2: error: ld returned 1 exit status
make[1]: *** [objs/Makefile:468: objs/nginx] Error 1
make[1]: Leaving directory '/tmp/nix-build-nginx-1.22.0.drv-0/nginx-1.22.0'
make: *** [Makefile:10: build] Error 2
builder for '/nix/store/y0zhgn8q7bslw1mjqrlaw0zcq6yrj5jh-nginx-1.22.0.drv' failed with exit code 2
error: build of '/nix/store/y0zhgn8q7bslw1mjqrlaw0zcq6yrj5jh-nginx-1.22.0.drv' failed

@GwynethLlewelyn
Copy link

GwynethLlewelyn commented Sep 4, 2022

Compiling a slightly older version (1.13.35.2) on Ubuntu 22.04.1 LTS (jammy) with:

  • GNU ld (GNU Binutils for Ubuntu) 2.38
  • gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
  • linux-libc-dev 5.15.0-47.51 (amd64)
  • 5.15.0-47-generic #51-Ubuntu SMP
  • System library 2.35.0
  • GNU Make 4.3
  • cmake version 3.22.1
  • pkg-config 0.29.2

gives:

/usr/bin/ld: /usr/local/src/nginx/modules/incubator-pagespeed-ngx-1.13.35.2-stable/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.signals.o.o): in function `pagespeed_ol_apr_signal_description_get':
signals.c:(.text.apr_signal_description_get+0xe): undefined reference to `sys_siglist'
/usr/bin/ld: /usr/local/src/nginx/modules/incubator-pagespeed-ngx-1.13.35.2-stable/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.proc_mutex.o.o): in function `proc_mutex_pthread_tryacquire':
proc_mutex.c:(.text.proc_mutex_pthread_tryacquire+0x3c): undefined reference to `pthread_mutex_consistent_np'
/usr/bin/ld: /usr/local/src/nginx/modules/incubator-pagespeed-ngx-1.13.35.2-stable/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.proc_mutex.o.o): in function `proc_mutex_pthread_acquire':
proc_mutex.c:(.text.proc_mutex_pthread_acquire+0x2c): undefined reference to `pthread_mutex_consistent_np'
/usr/bin/ld: /usr/local/src/nginx/modules/incubator-pagespeed-ngx-1.13.35.2-stable/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.proc_mutex.o.o): in function `proc_mutex_pthread_create':
proc_mutex.c:(.text.proc_mutex_pthread_create+0xac): undefined reference to `pthread_mutexattr_setrobust_np'
/usr/bin/ld: /usr/local/src/nginx/modules/incubator-pagespeed-ngx-1.13.35.2-stable/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.thread.o.o): infunction `pagespeed_ol_apr_thread_yield':
thread.c:(.text.apr_thread_yield+0x1): undefined reference to `pthread_yield'
collect2: error: ld returned 1 exit status
make[1]: *** [objs/Makefile:352: objs/nginx] Error 1
make[1]: Leaving directory '/usr/local/src/nginx/nginx-1.22.0'
make: *** [Makefile:13: install] Error 2

I'm going to try v1.14.33.1-RC1 to see if that helps. It's two years old, but...

@eilandert
Copy link

Compiling a slightly older version (1.13.35.2) on Ubuntu 22.04.1 LTS (jammy) with:

  • GNU ld (GNU Binutils for Ubuntu) 2.38
  • gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
  • linux-libc-dev 5.15.0-47.51 (amd64)
  • 5.15.0-47-generic #51-Ubuntu SMP
  • System library 2.35.0
  • GNU Make 4.3
  • cmake version 3.22.1
  • pkg-config 0.29.2

gives:

/usr/bin/ld: /usr/local/src/nginx/modules/incubator-pagespeed-ngx-1.13.35.2-stable/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.signals.o.o): in function `pagespeed_ol_apr_signal_description_get':
signals.c:(.text.apr_signal_description_get+0xe): undefined reference to `sys_siglist'
/usr/bin/ld: /usr/local/src/nginx/modules/incubator-pagespeed-ngx-1.13.35.2-stable/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.proc_mutex.o.o): in function `proc_mutex_pthread_tryacquire':
proc_mutex.c:(.text.proc_mutex_pthread_tryacquire+0x3c): undefined reference to `pthread_mutex_consistent_np'
/usr/bin/ld: /usr/local/src/nginx/modules/incubator-pagespeed-ngx-1.13.35.2-stable/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.proc_mutex.o.o): in function `proc_mutex_pthread_acquire':
proc_mutex.c:(.text.proc_mutex_pthread_acquire+0x2c): undefined reference to `pthread_mutex_consistent_np'
/usr/bin/ld: /usr/local/src/nginx/modules/incubator-pagespeed-ngx-1.13.35.2-stable/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.proc_mutex.o.o): in function `proc_mutex_pthread_create':
proc_mutex.c:(.text.proc_mutex_pthread_create+0xac): undefined reference to `pthread_mutexattr_setrobust_np'
/usr/bin/ld: /usr/local/src/nginx/modules/incubator-pagespeed-ngx-1.13.35.2-stable/psol/lib/Release/linux/x64/pagespeed_automatic.a(107.thread.o.o): infunction `pagespeed_ol_apr_thread_yield':
thread.c:(.text.apr_thread_yield+0x1): undefined reference to `pthread_yield'
collect2: error: ld returned 1 exit status
make[1]: *** [objs/Makefile:352: objs/nginx] Error 1
make[1]: Leaving directory '/usr/local/src/nginx/nginx-1.22.0'
make: *** [Makefile:13: install] Error 2

I'm going to try v1.14.33.1-RC1 to see if that helps. It's two years old, but...

this error means you are trying to use a psol library built on an older glibc.
(for example, the psol library is built on ubuntu focal or bionic, you are using ubuntu jammy).
On newer glibc they removed pthread_mutex_consistent_np and sys_siglist functions

I uploaded precompiled psol binaries here: http://www.tiredofit.nl/psol-jammy.tar.xz

@GwynethLlewelyn
Copy link

@eilandert you're absolutely correct! I read your comments on issue #1743 — it took me a while to fix the toolchain, but, eventually, with your precompiled binaries, I managed to succeed. I'm sure that others will, too.

On the other hand, to @bymoye and other maintainers/moderators of this package: it would be nice to fix the autoconf files, so that it properly checks for the glibc version used by PSOL, and recompile it — if needed — using a more recent version, with the patches provided under issue #1743...

@eilandert
Copy link

I cooked some build instructions in #1760

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

No branches or pull requests