You are not logged in.

#1 2009-05-04 00:22:32

amca01
Member
Registered: 2008-12-28
Posts: 57

Error compiling djvulibre - "undefined reference"

On attempting to compile djvulibre, with the usual

./configure
make
make install

I get the following errors during "make":

../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'

after which the compilation stops with an error signal.  Does anyone know what's going on here, and how I can avoid these errors?

Thanks,
-A.

Offline

#2 2009-05-04 00:33:22

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: Error compiling djvulibre - "undefined reference"

just use CFLAGS="-march=i686" wink these are gcc built-in functions that are activated only with arch >= i486

Offline

#3 2009-05-04 00:41:31

amca01
Member
Registered: 2008-12-28
Posts: 57

Re: Error compiling djvulibre - "undefined reference"

Thanks - but where do I set this variable?  I tried it as an environment variable, and running the configure, make commands again, only to obtain the same error.  (Sorry to be such a klutz here!)

Thanks again,
-A.

Offline

#4 2009-05-04 01:04:53

amca01
Member
Registered: 2008-12-28
Posts: 57

Re: Error compiling djvulibre - "undefined reference"

I also tried

./configure CFLAGS="-march=i686"

which should work, but again I get the same errors.

-T.

Offline

#5 2009-05-04 01:33:37

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Error compiling djvulibre - "undefined reference"

amca01 wrote:

On attempting to compile djvulibre, with the usual

./configure
make
make install

I get the following errors during "make":

../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'

after which the compilation stops with an error signal.  Does anyone know what's going on here, and how I can avoid these errors?

Thanks,
-A.

Out of curiosity, why aren't you simply installing it with pacman?

Offline

#6 2009-05-04 01:36:04

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: Error compiling djvulibre - "undefined reference"

amca01 wrote:

I also tried

./configure CFLAGS="-march=i686"

which should work, but again I get the same errors.

-T.

hehe, in reverse wink


CFLAGS="-march=i686" ./configure --blah ...
make
make install

Offline

Board footer

Powered by FluxBB