2017-12-18 23:03 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001397Orfeo Toolbox (OTB)Generalpublic2017-08-24 12:44
Reporterrashadkm 
Assigned Torashadkm 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Summary0001397: OTBIOkml links only with base, dom, and engine but cmake includes all kml libs
DescriptionThis has been a issue in packaging where only required dependencies are copied.

OTBIOKML links with kmlbase, kmldom, kmlengine. (source: objdump -p output) and GDAL etc.. GDAL linking seems strange here. but that's another bug report

now when cmake writes lib/cmake/OTB-5.10/Modules/OTBlibkml.cmake (install phase)

it writes below code:

      
set(OTBlibkml_LOADED 1)
set(OTBlibkml_DEPENDS "")
set(OTBlibkml_LIBRARIES "${OTB_INSTALL_PREFIX}/lib/libkmlbase.so;${OTB_INSTALL_PREFIX}/lib/libkmlconvenience.so;${OTB_INSTALL_PREFIX}/lib/libkmldom.so;${OTB_INSTALL_PREFIX}/lib/libkmlengine.so;${OTB_INSTALL_PREFIX}/lib/libkmlregionator.so;${OTB_INSTALL_PREFIX}/lib/libkmlxsd.so;${OTB_INSTALL_PREFIX}/lib/libminizip.so")
set(OTBlibkml_INCLUDE_DIRS "${OTB_INSTALL_PREFIX}/include/OTB-5.10;${OTB_INSTALL_PREFIX}/include")
set(OTBlibkml_LIBRARY_DIRS "")

this is wrong. because objdump -p lib/libOTBIOKML-5.10.so.1 | grep NEEDED does not list all of those. ofcourse, it is "safe" to link with them all. But I don't think safe is the correct word to use anyway.

Here is the output of objdump -p
  NEEDED libkmlbase.so
  NEEDED libkmldom.so
  NEEDED libkmlengine.so
  NEEDED libgdal.so.20
  NEEDED libOTBVectorDataBase-5.10.so.1
  NEEDED libOTBTransform-5.10.so.1
  NEEDED libOTBOSSIMAdapters-5.10.so.1
  NEEDED libITKTransform-4.10.so.1
  NEEDED libITKCommon-4.10.so.1
  NEEDED libitksys-4.10.so.1
  NEEDED libitkvnl_algo-4.10.so.1
  NEEDED libitkvnl-4.10.so.1
  NEEDED libm.so.6
  NEEDED libstdc++.so.6
  NEEDED libgcc_s.so.1
  NEEDED libc.so.6


Now what happens, is packaging scripts must be twisted to add libkml*.so/.dll due to this bug. Because when we collect all required dlls for libOTBIOKML.so libkmlregionator and libkmlxsd does not comeup in the list. ofcourse, they are not a dependency of our libOTBIOKML and a valid XDK gets generated.

It is valid in all sense. but when you run cmake on external projects, it configures fine but fails during build

make
make[2]: *** No rule to make target `/tmp/test_xdk/OTB-5.10.1-xdk-Linux64/lib/libkmlconvenience.so', needed by `HelloWorld'. Stop.
make[1]: *** [CMakeFiles/HelloWorld.dir/all] Error 2
make: *** [all] Error 2


The above is just the case for libkml, there is Qt libs which has same issue. We include QtXml, glut but this is not required. Building of external module such as helloworld will fails with the similar error message.


Right fix is to correct cmake code in OTBlibkml and OTBQt4 modules.

Now I had explicitly added all those libkml* and libQtXml, libglut* in Packaging scripts to make XDK work.

Nonetheless, this bug must be fixed to avoid hacks that hide bugs.

TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes
There are no notes attached to this issue.
+Notes

-Issue History
Date Modified Username Field Change
2017-05-04 12:06 rashadkm New Issue
2017-05-04 12:09 rashadkm Description Updated View Revisions
2017-08-24 12:44 rashadkm Status new => closed
2017-08-24 12:44 rashadkm Assigned To => rashadkm
2017-08-24 12:44 rashadkm Resolution open => fixed
+Issue History