Johnny wrote: > Hello, > > I've encountered an odd problem I'm hoping someone can help me out with. > > In trying to do a standard build of a new version of a package which has > always compiled for me in the past (djvulibre) and I get a failure. The > configure works fine. The make fails with the following output at the > failure point: > > ----------------- > > g++ -o .libs/bzz -DHAVE_CONFIG_H -I.. -I.. -I../libdjvu -I. -DNDEBUG -Wall > -O3 -Wno-non-virtual-dtor -mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS > bzz.o ../libdjvu/.libs/libdjvulibre.so -ljpeg -lpthread -lm > ../libdjvu/.libs/libdjvulibre.so: undefined reference to > `__sync_bool_compare_and_swap_4' > ../libdjvu/.libs/libdjvulibre.so: undefined reference to > `__sync_add_and_fetch_4' > collect2: ld returned 1 exit status > make[1]: *** [bzz] Error 1 > make[1]: Leaving directory `/home/johnny/source/djvulibre-3.5.21/tools' > make: *** [all] Error 2 > > ----------------- > > I filed a bug report with the developer. > > The developer is telling me that this problem is related to whether or > not my system supports "Intel atomic builtins." However, when checking > my configure output, it reports that "yes" it does. So the undefined > reference error shouldn't be occurring. The compilation is being run in > a clean directory and the make and configure are being run on the same > system. > > The developer had me test a simple cpp file and compile it so see if the > builtin atomic functions would compile properly--as apparently this is > what the configure script tests for when it checks for atomic builtin > support. You need to compile for a more recent processor. By default gcc targets older procerssors that don't have hardware support for the atomic builtins. Try -march=i486. Andrew.