Sat, 09/29/2012 - 02:03
Building occ undet Fedora 17
Does anybody know why this make error occurs:
/home/brad/work/occ/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::getScanLine(unsigned int) const'
/home/brad/work/occ/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::fipImage(FREE_IMAGE_TYPE, unsigned int, unsigned int, unsigned int)'
The errant g++ line is:
g++ -DCSFDB -DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -O2 -o .libs/DRAWEXE DRAWEXE.o -lstdc++ ../TKDraw/.libs/libTKDraw.so -L/usr/lib /home/brad/work/occ/adm/make/TKMesh/.libs/libTKMesh.so /home/brad/work/occ/adm/make/TKService/.libs/libTKService.so /home/brad/work/occ/adm/make/TKHLR/.libs/libTKHLR.so ../TKMesh/.libs/libTKMesh.so ../TKTopAlgo/.libs/libTKTopAlgo.so ../TKHLR/.libs/libTKHLR.so /home/brad/work/occ/adm/make/TKTopAlgo/.libs/libTKTopAlgo.so /home/brad/work/occ/adm/make/TKGeomAlgo/.libs/libTKGeomAlgo.so ../TKGeomAlgo/.libs/libTKGeomAlgo.so /home/brad/work/occ/adm/make/TKBRep/.libs/libTKBRep.so ../TKGeomBase/.libs/libTKGeomBase.so ../TKG2d/.libs/libTKG2d.so ../TKBRep/.libs/libTKBRep.so /home/brad/work/occ/adm/make/TKGeomBase/.libs/libTKGeomBase.so /home/brad/work/occ/adm/make/TKG3d/.libs/libTKG3d.so ../TKMath/.libs/libTKMath.so ../TKG3d/.libs/libTKG3d.so /home/brad/work/occ/adm/make/TKG2d/.libs/libTKG2d.so ../TKernel/.libs/libTKernel.so ../TKService/.libs/libTKService.so /home/brad/work/occ/adm/make/TKMath/.libs/libTKMath.so /home/brad/work/occ/adm/make/TKernel/.libs/libTKernel.so -lrt -ltcl8.5 -ltk8.5 -ltbb -ltbbmalloc -lXt -lX11 -lXmu -lfreeimageplus -ldl -lpthread -Wl,-rpath -Wl,/home/brad/lib
In which -lfreeimage occours after libTKSevice.so
Both fipImage::getScanLine and fipImage::fipImage are present in /usr/lib/libfreeimageplus.so
$ nm -D /usr/lib/libfreeimageplus.so
..
00005490 T _ZNK8fipImage11getScanLineEt
..
00004bf0 T _ZN8fipImageD1Ev
The symbols are both correctly flagged U in libTKService.so, although I am unclear as to how libTKService.so is compiled and linked!
Changing the g++ line to specifically link libfreeimageplus.so using /usr/lib/libfreeimageplus.so in place of -lfreeimage produces the identical error.
I'm completely baffled! Can suggest a solution?
Sat, 09/29/2012 - 02:20
EDit:-
I've just discovered the -C switch to nm with the result that:
$ nm -DC /usr/lib/libfreeimageplus.so | grep getScanLine
00005490 T fipImage::getScanLine(unsigned short) const
$ [brad@p2800 lib]$ nm -DC /usr/lib/libfreeimageplus.so | grep fipImage::fipImage
00004d60 T fipImage::fipImage(FREE_IMAGE_TYPE, unsigned short, unsigned short, unsigned short)
In which I note that unsigned short is specified whereas unsigned int is required.
Is this the problem? If so where is the source for TKService so I can patch it?