Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#203 libIL.so: undefined reference to `png_set_gray_1_2_4_to_8

open
nobody
None
5
2011-08-30
2011-08-30
Dennis
No

Using libpng-1.5.4 and the make fails at this point;

make[1]: Entering directory `/usr/src/devil-1.7.8/bin'
gcc -DHAVE_CONFIG_H -I. -I../include/IL -I ./../include -O2 -march=native -pipe -MT ilur.o -MD -MP -MF .deps/ilur.Tpo -c -o ilur.o `test -f '../src-ILU/ilur/ilur.c' || echo './'`../src-ILU/ilur/ilur.c
mv -f .deps/ilur.Tpo .deps/ilur.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -O2 -march=native -pipe -s -lpng -o ilur ilur.o ../lib/libILU.la -lm -lz
libtool: link: gcc -O2 -march=native -pipe -s -o .libs/ilur ilur.o ../lib/.libs/libILU.so /usr/src/devil-1.7.8/lib/.libs/libIL.so -ltiff -lmng -llcms -ljasper -ljpeg -lIlmImf -lImath -lHalf -lIex -lIlmThread -lpng -lm -lz -pthread
/usr/src/devil-1.7.8/lib/.libs/libIL.so: undefined reference to `png_set_gray_1_2_4_to_8'
collect2: ld returned 1 exit status
make[1]: *** [ilur] Error 1
make[1]: Leaving directory `/usr/src/devil-1.7.8/bin'
make: *** [all-recursive] Error 1

Discussion

  • Jim Stuttard
    Jim Stuttard
    2011-09-22

    I get this with both gcc-4.6.1 on archlinux i686 and gcc-4.4.5 on scientific linux x86_64.

     
  • Jim Stuttard
    Jim Stuttard
    2011-09-22

    Duplicate of #3098108

    workaround suggested there works for me:

    pass CFLAGS to configure:

    CFLAGS=-Dpng_set_gray_1_2_4_to_8=png_set_expand_gray_1_2_4_to_8
    ./configure