Hi Thomas, Generally the short name, e.g. libotbtinyXML.4.0.dylib (instead its full path), is due to the id (possibly full path) of the built lib not being set. Then when the lib is linked, the path is not in the id, so is not referenced.
There are ways around it, like defining DYLD_LIBRARY_PATH or DYLD_VERSIONED_LIBRARY_PATH env vars to point to your libotb* directory. Ultimately, the CMake definition of the lib should include a full install path for the id, or use @rpath (see `man dyld`). In the meantime, you could try using the OSGeo4Mac orfeo-40 formula [0]. The lib ids and linking are handled correctly by Homebrew. I noticed you already have stuff installed in /usr/local. If it was not from Homebrew, this will cause issues. Alternatively, you can install Homebrew to a custom prefix, like /opt/osgeo4mac; though, some CMake modules may look in /usr/local first anyways (don't think this is the case with OTB). There is an `orfeo` in the main Homebrew tap, but it is 3.20, not 4.0. You can install OTB 4.0.0 (after installing Homebrew) with: $ brew install osgeo/osgeo4mac/orfeo-40 Or... $ brew tap osgeo/osgeo4mac $ brew info orfeo-40 (<-- review options) $ brew install orfeo-40 [--with-option --with-option] If you use the orfeo-40 formula, please post any issues to the OSGeo4Mac tracker [1]. [0] https://github.com/OSGeo/homebrew-osgeo4mac/blob/master/Formula/orfeo-40.rb [1] https://github.com/OSGeo/homebrew-osgeo4mac/issues Regards, Larry Shaffer Dakota Cartography Black Hills, South Dakota On Mon, May 19, 2014 at 8:55 AM, Thomas Tilak <[email protected]>wrote: > Hello, > > I am facing an issue when I build OTB and its applications. The building > is done normally but it seems that the linking with dynamic libraries and > espacially "Utilities" libraries such as libotbtinyXml, libotbedison, > libotbconfigfile, libotbmuparse, libotbossimplugin, libotbossim, > libOpenThreads is not working well. > > When I run otbApplicationLauncherCommandLine, I got the following message: > > dyld: Library not loaded: libotbtinyXML.4.0.dylib > Referenced from: /usr/local/bin/otbApplicationLauncherCommandLine > Reason: image not found > Trace/BPT trap: 5 > > and when I use the otool -L on otbApplicationLauncherCommandLine: > > ... > I think the lib path should be set > (/usr/local/lib/otb/libotbtinyXML.4.0.dylib instead > of libotbtinyXML.4.0.dylib). I can do it using the install_name_tool but it > is quite annoying. > > Best regards. > > > > -- > -- > 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. > -- -- 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.
