[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wget2 | build: Fix the build with slibtool (!498)

From: orbea (@orbea)
Subject: Re: wget2 | build: Fix the build with slibtool (!498)
Date: Wed, 29 Sep 2021 22:22:52 +0000

orbea commented:

The first issue I encountered was no `-no-whole-archive` in slibtool and it was 
only after getting past that I found it failed with undefined references for 
pthread. These undefined references only occur with slibtool because GNU 
libtool is silently adding `-pthread` for some reason I do not understand. On 
the other hand slibtool does not have such unexpected behaviors. I attached a 
log using GNU libtool showing this.

> libtool: link: clang -shared  -fPIC -DPIC  .libs/libwget_alloc_la-xalloc.o  
> -Wl,--whole-archive ../lib/.libs/libgnu.a -Wl,--no-whole-archive   -g -O2 
> -Wl,--no-whole-archive   **-pthread** -Wl,-soname -Wl,libwget_alloc.so.1 -o 
> .libs/libwget_alloc.so.1.0.0

> libtool: link: clang -shared  -fPIC -DPIC  .libs/libwget_ip_la-ip.o  
> -Wl,--whole-archive ../lib/.libs/libgnu.a -Wl,--no-whole-archive   -g -O2 
> -Wl,--no-whole-archive   **-pthread** -Wl,-soname -Wl,libwget_ip.so.1 -o 
> .libs/libwget_ip.so.1.0.0


While this is not the issue in this case its worth noting that `-no-undefined` 
is set in `libwget_la_LDFLAGS` which is then used then used everywhere else in 
the file. GNU libtool has a long standing bug where it just silently ignores 
`-no-undefined` while slibtool will actually respect it.

I reproduced this on Slackware64 and attached the `config.log`.

And now I reproduced both issues again on a Gentoo system.

Also for reference I have fixed similar pthread issues in several projects, 
NetworkManager is one.


Reply to this email directly or view it on GitLab: 
You're receiving this email because of your account on gitlab.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]