Login
Username:

Password:


Lost Password?

Register now!
Main Menu
H3D.org Feeds
H3D.org Forum Index
   Installing and compiling
     H3DLoad
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
sajjad
Posted on: 2009/5/6 16:58
Quite a regular
Joined: 2008/5/15
From:
Posts: 30
H3DLoad
Hello forum,

I am trying to compile H3DLoad and having the following linking problem

/usr/lib64/libdcmimage.so.1: undefined reference to `TIFFGetVersion'
/usr/lib64/libdcmimage.so.1: undefined reference to `png_set_tIME'
/usr/lib64/libdcmimage.so.1: undefined reference to `png_create_write_struct'
..................................

...............................


It seems that it cannot link to the library related to png image and tiff format

Then i have installed them from the repository

But the error is still there.


Any hint would be of great help


Regards
Sajjad

daniel
Posted on: 2009/5/7 9:49
Webmaster
Joined: 2004/11/28
From:
Posts: 520
Re: H3DLoad
Did you compile and link libdcmimage.so yourself? It seems like the tiff and png library was not linked to when creating that library.

I quick fix to get H3DAPI working could be to add the tiff and png library to the linking of H3DLoad, but I think it should be done in libdcmimage.so to be done properly.
sajjad
Posted on: 2009/5/7 14:40
Quite a regular
Joined: 2008/5/15
From:
Posts: 30
Re: H3DLoad
Hello Daniel,

I am starting the installation from scratch and i have already got the H3DUtil and HAPI compiled and installed.

while doing the cmake . for H3DAPI i have the following the info

STATUS,H3DAPI debug libraries not found. Debug build might not work.

STATUS,H3DUtil debug libraries not found. Debug build might not work.

STATUS,HAPI debug libraries not found. Debug build might not work.


What should be the path ? The libraries for H3DUtil and HAPI
are installed in /usr/local/lib .

What should be the H3DAPI debug libraries?

Should the debug libraries point to same path as well?


Regards
Sajjad
sajjad
Posted on: 2009/5/7 15:02
Quite a regular
Joined: 2008/5/15
From:
Posts: 30
Re: H3DLoad
Hello again,

I eneded up with the same error:

*********************************************************'
Linking CXX executable H3DLoad
/usr/lib64/libdcmimage.so.1: undefined reference to `TIFFGetVersion'
/usr/lib64/libdcmimage.so.1: undefined reference to `png_set_tIME'
/usr/lib64/libdcmimage.so.1: undefined reference to `png_create_write_struct'
/usr/lib64/libdcmimage.so.1: undefined reference to `TIFFSetField'
/usr/lib64/libdcmimage.so.1: undefined reference to `png_write_image'
/usr/lib64/libdcmimage.so.1: undefined reference to `png_write_info'
/usr/lib64/libdcmimage.so.1: undefined reference to `TIFFFdOpen'
/usr/lib64/libdcmimage.so.1: undefined reference to `TIFFWriteScanline'
/usr/lib64/libdcmimage.so.1: undefined reference to `png_access_version_number'
/usr/lib64/libdcmimage.so.1: undefined reference to `TIFFFlushData'
/usr/lib64/libdcmimage.so.1: undefined reference to `png_write_end'
/usr/lib64/libdcmimage.so.1: undefined reference to `TIFFClose'
/usr/lib64/libdcmimage.so.1: undefined reference to `png_set_text'
/usr/lib64/libdcmimage.so.1: undefined reference to `png_init_io'
/usr/lib64/libdcmimage.so.1: undefined reference to `png_set_IHDR'
/usr/lib64/libdcmimage.so.1: undefined reference to `png_destroy_write_struct'
/usr/lib64/libdcmimage.so.1: undefined reference to `png_create_info_struct'
/usr/lib64/libdcmimage.so.1: undefined reference to `png_convert_from_time_t'
collect2: ld returned 1 exit status
make[2]: *** [H3DLoad] Error 1

********************************************************


I installed the DICOM image toolkit from the repository using the apt-get install and it is installed fine.

After you feedback i reinstalled that


Any other tips to track that down?

I really need to get up with H3DLoad


Regards
Sajjad




Markus
Posted on: 2009/5/14 9:33
Webmaster
Joined: 2006/3/27
From: SenseGraphics
Posts: 1531
Re: H3DLoad
Ignore the warnings about debug libraries. They will not give you any specific problems.

If you want debug-libraries you need to use the cmake gui (ccmake) to change the build type of HAPI and H3DUtil projects and build and install such projects.

I do not really know what to do about the dicom toolkit. If you would create a small C++ example linking to the dicom library files (excluding the tiff and jpg libraries) and then run it, would you get the same errors?
sajjad
Posted on: 2009/5/17 10:43
Quite a regular
Joined: 2008/5/15
From:
Posts: 30
Re: H3DLoad
Hello Markus,

I managed to fix it . I removed the DICOM toolkit assuming that i may not need to use that in any near future.

Now it is functional.


Thanks
Sajjad
mprada
Posted on: 2009/12/18 14:36
Just popping in
Joined: 2009/12/9
From:
Posts: 5
Re: H3DLoad
I'm having the same problem here. When I try to compile SurfaceExample I get the following output:

FATRONIK\mprada@pcf-264-0209l:~/src/HAPI-1.1.0-Source/HAPI/examples/SurfaceExample/build$ make
[100%] Building CXX object CMakeFiles/SurfaceExample.dir/home/FATRONIK/mprada/src/HAPI-1.1.0-Source/HAPI/examples/SurfaceExample/SurfaceDemo.cpp.o
Linking CXX executable SurfaceExample
/usr/lib64/libdcmimage.so.1: undefined reference to `TIFFSetField'
/usr/lib64/libdcmimage.so.1: undefined reference to `TIFFClose'
/usr/lib64/libdcmimage.so.1: undefined reference to `TIFFFlushData'
/usr/lib64/libdcmimage.so.1: undefined reference to `TIFFFdOpen'
/usr/lib64/libdcmimage.so.1: undefined reference to `TIFFWriteScanline'
/usr/lib64/libdcmimage.so.1: undefined reference to `TIFFGetVersion'
collect2: ld returned 1 exit status
make[2]: *** [SurfaceExample] Error 1
make[1]: *** [CMakeFiles/SurfaceExample.dir/all] Error 2
make: *** [all] Error 2
FATRONIK\mprada@pcf-264-0209l:~/src/HAPI-1.1.0-Source/HAPI/examples/SurfaceExample/build$


The strange thing is that HAPIDemo example compiles and runs just fine.

I've been trying to track down the problem with no result. According to 'ldd' both libHAPI and libH3DUtil link to /usr/lib/libdcmimage.so.1, while the linker error is about /usr/lib64/libdcmimage.so.1.

I also tried to remove the DICOM toolkit as mentioned in the last post, but it only gets worse.

Any idea what might be going wrong?
mprada
Posted on: 2009/12/21 15:34
Just popping in
Joined: 2009/12/9
From:
Posts: 5
Re: H3DLoad
Ok, It seems that removing DICOM toolkit does solve the problem.

I only had to compile HAPI again, not just the examples :oops:
Markus
Posted on: 2009/12/28 9:49
Webmaster
Joined: 2006/3/27
From: SenseGraphics
Posts: 1531
Re: H3DLoad
Sadly I am not confident enough with linux to know how it sets up and loads needed libraries at run-time. Apart from the fact that some missing references in a library is not shown until run-time.

It seems odd though that it tries to load a different library than the one it linked against. Did you check what values CMake found? Or if you have several versions of DICOM installed on your system?
karlu
Posted on: 2010/1/3 20:29
Guru
Joined: 2004/12/2
From: Sweden
Posts: 585
Re: H3DLoad
My guess is that libdcmimage is trying to use another library to read TIFF data but that library is not available at compile time and therefore not linked against. If you want to look for the missing library, try the "nm" command, for example
for file in `ls *.so`
 do
  echo $file
  nm --demangle $file | grep TIFFFdOpen
 done


----------------
KJ Lundin Palmerius
Norrköping Visualization and Interaction Studio
Linköping University, Sweden

(1) 2 »
Threaded | Newest First Previous Topic | Next Topic | Top

Register To Post
 



(C) 2004 SenseGraphics AB    ---    Powered by XOOPS