On 11/23/2015 11:49 AM, Frank B. Brokken wrote: > Dear Sebastien Bacher, you wrote: >> >> Package: bobcat >> Version: 4.01.03-2 >> >> That package fails to build on Ubuntu (unsure what's the difference with >> Debian, maybe toolchain), recent sync example >> https://launchpadlibrarian.net/227370551/buildlog_ubuntu-xenial-i386.bobcat_4.01.03-2_BUILDING.txt.gz >> >> "process/os/59start2.o: In function `std::thread::thread<void >> (&)(FBB::Process*), FBB::Process*>(void (&)(FBB::Process*), >> FBB::Process*&&)': >> /usr/include/c++/5/thread:137: undefined reference to `pthread_create' >> sharedcondition/os/70condition1.o: In function >> `FBB::SharedCondition::Condition::Condition()':" >> >> >> Seems like somebody applied that change to fix the issue >> http://launchpadlibrarian.net/157657756/bobcat_3.18.01-1_3.18.01-1ubuntu1.diff.gz >> >> There is no reason the fix should be specific to Ubuntu, maybe it could >> be included in Debian? > > Thanks for your report, but unfortunately it's not clear to me what the > problem is. The undefined reference to pthread_create is a linker error, but > pthread_create is, or at least should be, available in the pthread > library. But in order to make this available the compilations should use > -pthread, which bobcat's building process does. Maybe you can provide some > additional clarifications?
Hi Frank At first I thought this might be the presence of our old friend --as-needed again (see our discussion of this 5 years ago: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=608145 But the ordering of libraries is the same, and both builds specify -lpthread. The only difference at this step is the addition of -Bsymbolic-functions, and whatever underlying differences there might be in the linkers: Ubuntu build log: > Creating shared library libbobcat.so > g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security > --std=c++14 -Wall -isystem tmp -fPIC -Wl,-Bsymbolic-functions -Wl,-z,relro > -lpthread -shared -Wl,--as-needed,-z,defs,-soname,libbobcat.so.4 -o > tmp/libso/libbobcat.so.4.01.03 */os/*.o -lX11 -lssl -lcrypto -lreadline > -lmilter -L/usr/lib/libmilter ^^^^^^^^^^^^^^^^^^^^ Debian sid build log: > Creating shared library libbobcat.so > g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security > --std=c++14 -Wall -isystem tmp -fPIC -Wl,-z,relro -lpthread -shared > -Wl,--as-needed,-z,defs,-soname,libbobcat.so.4 -o > tmp/libso/libbobcat.so.4.01.03 */os/*.o -lX11 -lssl -lcrypto -lreadline > -lmilter -L/usr/lib/libmilter There's a possible reference to -symbolic here: > https://gcc.gnu.org/onlinedocs/gcc-5.2.0/gcc/Link-Options.html#Link-Options tony
signature.asc
Description: OpenPGP digital signature

