Hi Loic, your gdal configuration is fine I think but OSSIM (which is a internal dependency of OTB) required also tiff and geotiff headers to compile. I would advise you to install those headers. You should have on your system a package called libtif-dev or libtiff-devel (and libgeotiff-dev).
Doing this, you'll not have to override GEOTIFF_INCLUDE_DIRS and TIFF_INCLUDE_DIRS. System tiff and geotiff headers will be used to compile OSSIM and no conflict will appear in your OTB config as you've rename tiff symbol in your gdal configuration. If you're not able to install those headers for tiff and geotiff (if you're not root for instance), OTB can also work with tiff/geotiff symbol exposed or not renamed in gdal, in this case the same tiff/geotiff headers need to be used to build ossim. In this case you need to point TIFF_INCLUDE_DIRS to gdal include directory and TIFF_LIBRARY to your gdal library. I agree that the OTB documentation is still not 100% clear on this, there was by the way a recent discussion on this particular issue on otb-developers: https://groups.google.com/forum/#!topic/otb-developers/jE7YK1NtXN8 <https://groups.google.com/forum/#%21topic/otb-developers/jE7YK1NtXN8> Let us know if you've got other issues. Regards, Manuel On 23/04/2014 14:33, [email protected] wrote: > Hello everyone, > > I tried to install OTB4.0 from sources. > > I configured cmake and launch the make command. > > During the build, I got the following issue: > > > [ 95%] Built target OTBTesting > Linking CXX executable ../../bin/otbTestDriver > ../../bin/libotbossim.so.21971.1.0: undefined reference to > `TIFFSetDirectory' > ../../bin/libotbossim.so.21971.1.0: undefined reference to `GTIFPrint' > ../../bin/libotbossim.so.21971.1.0: undefined reference to `XTIFFOpen' > ../../bin/libotbossim.so.21971.1.0: undefined reference to > `TIFFNumberOfDirectories' > ../../bin/libotbossim.so.21971.1.0: undefined reference to `GTIFKeySet' > ../../bin/libotbossim.so.21971.1.0: undefined reference to `TIFFIsTiled' > ../../bin/libotbossim.so.21971.1.0: undefined reference to `TIFFOpen' > ../../bin/libotbossim.so.21971.1.0: undefined reference to > `TIFFReadRGBAStrip' > ../../bin/libotbossim.so.21971.1.0: undefined reference to > `TIFFCurrentDirectory' > ../../bin/libotbossim.so.21971.1.0: undefined reference to `TIFFClose' > ../../bin/libotbossim.so.21971.1.0: undefined reference to > `TIFFReadScanline' > ../../bin/libotbossim.so.21971.1.0: undefined reference to `GTIFNew' > ../../bin/libotbossim.so.21971.1.0: undefined reference to `TIFFReadTile' > ../../bin/libotbossim.so.21971.1.0: undefined reference to `TIFFFlush' > ../../bin/libotbossim.so.21971.1.0: undefined reference to `GTIFGetDefn' > ../../bin/libotbossim.so.21971.1.0: undefined reference to `GTIFFree' > ../../bin/libotbossim.so.21971.1.0: undefined reference to > `TIFFWriteEncodedStri > ../../bin/libotbossim.so.21971.1.0: undefined reference to `GTIFKeyGet' > ../../bin/libotbossim.so.21971.1.0: undefined reference to `TIFFGetField' > ../../bin/libotbossim.so.21971.1.0: undefined reference to > `TIFFReadRGBATile' > ../../bin/libotbossim.so.21971.1.0: undefined reference to `XTIFFClose' > ../../bin/libotbossim.so.21971.1.0: undefined reference to `TIFFSetField' > ../../bin/libotbossim.so.21971.1.0: undefined reference to > `TIFFSetWarningHandle > ../../bin/libotbossim.so.21971.1.0: undefined reference to > `TIFFWriteScanline' > ../../bin/libotbossim.so.21971.1.0: undefined reference to `GTIFWriteKeys' > ../../bin/libotbossim.so.21971.1.0: undefined reference to > `TIFFSetErrorHandler' > ../../bin/libotbossim.so.21971.1.0: undefined reference to `TIFFWriteTile' > ../../bin/libotbossim.so.21971.1.0: undefined reference to > `TIFFWriteDirectory' > collect2: ld returned 1 exit status > make[2]: *** [bin/otbTestDriver] Error 1 > make[1]: *** [Code/Testing/CMakeFiles/otbTestDriver.dir/all] Error 2 > make: *** [all] Error 2 > > I supposed that the headers of tiff and geotiff were not found, yet I > set GEOTIFF_INCLUDE_DIRS = > /home/lwasquel/gdal-1.10.1/frmts/gtiff/libgeotiff > > and TIFF_INCLUDE_DIRS=/home/lwasquel/gdal-1.10.1/frmts/gtiff/libtiff > > > I have some warning messages during the ccmake configuration: > CMake Warning at CMake/ImportGdal.cmake:206 (message): > CHECK_XTIFFOPEN_SYMBOL test failed : your platform exhibits a > gdal/geotiff > conflict. Opening a TIF file may generate a crash. This is most > probably > because the gdal library you configuredembeds its own version of > libgeotiff > and is ABI incompatible with the system libgeotiff > > You might consider building GDAL yourself without using > --with-hide-internal-symbols and pointing GEOTIFF_INCLUDE_DIRS to the > geotiff headers included in gdal sources > Call Stack (most recent call first): > CMakeLists.txt:206 (include) > > During the cmake generation, I have the following warning: > CMake Warning at Utilities/otbossim/CMakeLists.txt:87 (add_library): > Cannot generate a safe runtime search path for target otbossim because > there is a cycle in the constraint graph: > > dir 0 is [/home/lwasquel/gdal-1.10.1/.libs] > dir 1 must precede it due to runtime library [libgdal.so.1] > dir 1 is [/home/lwasquel/local/lib] > dir 0 must precede it due to runtime library [libgdal.so.1] > dir 2 is [/home/lwasquel/OTB/OTB-Binary-4.0.0/bin] > > Some of these libraries may not be found correctly. > > /home/lwasquel/OTB/OTB-Binary-4.0.0 is the folder where i try to > install OTB. > I think that the problems comes from here, but I don't understand what > it means. > > > > > I built my GDAL library with the following command: > > ./configure --prefix=/home/lwasquel/local --with-libtiff=internal > --with-geotiff=internal --with-rename-internal-libtiff-symbols=yes > --with-rename-internal-libgeotiff-symbols=yes --with-libz=internal > --with-jpeg=/usr/lib/libjpeg.so > > Can you help me please? > > Regards, > Loïc > > -- > -- > Check the OTB FAQ at > http://www.orfeo-toolbox.org/FAQ.html > > You received this message because you are subscribed to the Google > Groups "otb-users" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/otb-users?hl=en > --- > You received this message because you are subscribed to the Google > Groups "otb-users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout. -- Manuel GRIZONNET CNES - DCT/SI/AP - BPI 1219 18, avenue Edouard Belin 31401 Toulouse Cedex 09 - France Tel: +33 561 282 630 - Fax: +33 561 283 109 -- -- Check the OTB FAQ at http://www.orfeo-toolbox.org/FAQ.html You received this message because you are subscribed to the Google Groups "otb-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/otb-users?hl=en --- You received this message because you are subscribed to the Google Groups "otb-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
