[pHash-support] Error compiling on Centos

Lech Wilczyński lech.wilczynski at gmail.com
Sat May 25 07:13:13 PDT 2013


On my machine:
Linux  2.6.18-348.3.1.el5 #1 i686 i386 GNU/Linux

I get the following make output:

make  all-recursive
make[1]: Entering directory `/root/pHash-0.9.6'
Making all in src
make[2]: Entering directory `/root/pHash-0.9.6/src'
/bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..
  -pthread -I/usr/local/include -Dcimg_use_png -Dcimg_use_jpeg  -O2
-ffast-math -O3 -MT pHash.lo -MD -MP -MF .deps/pHash.Tpo -c -o pHash.lo
pHash.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -pthread
-I/usr/local/include -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT
pHash.lo -MD -MP -MF .deps/pHash.Tpo -c pHash.cpp  -fPIC -DPIC -o
.libs/pHash.o
In file included from pHash.cpp:26:
../config.h:47:1: warning: "HAVE_STDLIB_H" redefined
In file included from /usr/include/jpeglib.h:28,
                 from /usr/local/include/CImg.h:272,
                 from pHash.h:50,
                 from pHash.cpp:25:
/usr/include/jconfig.h:12:1: warning: this is the location of the previous
definition
pHash.cpp: In function 'cimg_library::CImg<float>* GetMHKernel(float,
float)':
pHash.cpp:832: warning: converting to 'int' from 'float'
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -pthread
-I/usr/local/include -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT
pHash.lo -MD -MP -MF .deps/pHash.Tpo -c pHash.cpp -o pHash.o >/dev/null 2>&1
mv -f .deps/pHash.Tpo .deps/pHash.Plo
/bin/sh ../libtool --tag=CXX   --mode=link g++  -O2 -ffast-math -O3
-no-undefined -L/usr/local/lib -o libpHash.la -rpath /usr/local/lib
pHash.lo    -lpng -ljpeg
libtool: link: g++  -fPIC -DPIC -shared -nostdlib
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crti.o
/usr/lib/gcc/i386-redhat-linux/4.1.2/crtbeginS.o  .libs/pHash.o
-L/usr/local/lib -lpng -ljpeg -L/usr/lib/gcc/i386-redhat-linux/4.1.2
-L/usr/lib/gcc/i386-redhat-linux/4.1.2/../../.. -lstdc++ -lm -lc -lgcc_s
/usr/lib/gcc/i386-redhat-linux/4.1.2/crtfastmath.o
/usr/lib/gcc/i386-redhat-linux/4.1.2/crtendS.o
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crtn.o  -O2 -O3   -Wl,-soname
-Wl,libpHash.so.0 -o .libs/libpHash.so.0.0.0
libtool: link: (cd ".libs" && rm -f "libpHash.so.0" && ln -s
"libpHash.so.0.0.0" "libpHash.so.0")
libtool: link: (cd ".libs" && rm -f "libpHash.so" && ln -s
"libpHash.so.0.0.0" "libpHash.so")
libtool: link: ar cru .libs/libpHash.a  pHash.o
libtool: link: ranlib .libs/libpHash.a
libtool: link: ( cd ".libs" && rm -f "libpHash.la" && ln -s
"../libpHash.la" "libpHash.la" )
make[2]: Leaving directory `/root/pHash-0.9.6/src'
Making all in bindings
make[2]: Entering directory `/root/pHash-0.9.6/bindings'
make[3]: Entering directory `/root/pHash-0.9.6/bindings'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/root/pHash-0.9.6/bindings'
make[2]: Leaving directory `/root/pHash-0.9.6/bindings'
Making all in examples
make[2]: Entering directory `/root/pHash-0.9.6/examples'
g++ -DHAVE_CONFIG_H -I. -I.. -I../src  -pthread -I/usr/local/include
-Dcimg_use_png -Dcimg_use_jpeg  -O2 -ffast-math -O3 -MT test_texthash.o -MD
-MP -MF .deps/test_texthash.Tpo -c -o test_texthash.o test_texthash.cpp
mv -f .deps/test_texthash.Tpo .deps/test_texthash.Po
/bin/sh ../libtool --tag=CXX   --mode=link g++  -O2 -ffast-math -O3
 -L/usr/local/lib -o test_texthash test_texthash.o ../src/libpHash.la -lpng
-ljpeg
libtool: link: g++ -O2 -ffast-math -O3 -o .libs/test_texthash
test_texthash.o  -L/usr/local/lib ../src/.libs/libpHash.so -lpng -ljpeg
-Wl,-rpath -Wl,/usr/local/lib
../src/.libs/libpHash.so: undefined reference to `pthread_create'
../src/.libs/libpHash.so: undefined reference to `pthread_join'
collect2: ld returned 1 exit status
make[2]: *** [test_texthash] Error 1
make[2]: Leaving directory `/root/pHash-0.9.6/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/pHash-0.9.6'
make: *** [all] Error 2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phash.org/pipermail/phash-support-phash.org/attachments/20130525/84ec493b/attachment-0001.htm>


More information about the pHash-support mailing list