App will not run when linked to boost thread library
Hi I have added boost::threads to our mac application, which means that I have to build the boost thread library. I have manage to build the universal boost static and dynamic library. When I add the static library to the project, the project builds with no problems and the dynamic library produced it added to the application package. However as soon a I try to run the application, the application fails with the error that it cannot load the dynamic library. Is there a tool on the mac to determine why a dynamic library does not load. Does anyone know why boost is causing this problem. The dynamic library to built on 10.5 with 10.4 framework. The version of boost is 1.36.0 Thanks in advance Katherine -- View this message in context: http://www.nabble.com/App-will-not-run-when-linked-to-boost-thread-library-t... Sent from the Boost - Users mailing list archive at Nabble.com.
On Fri, Sep 19, 2008 at 01:19:15PM -0700, kittymaguire wrote:
Is there a tool on the mac to determine why a dynamic library does not load.
I'm not well acquainted with OSX, but maybe ldd exists; ldd ./executable will print shared library dependencies and potential problems.
Does anyone know why boost is causing this problem.
David Philp had a related problem, and traced it back to running the strip command on the final executable. (i.e. the executable worked provided that the strip command was _not_ applied to it).
On Sep 19, 2008, at 11:45 PM, Zeljko Vrba wrote:
On Fri, Sep 19, 2008 at 01:19:15PM -0700, kittymaguire wrote:
Is there a tool on the mac to determine why a dynamic library does not load.
I'm not well acquainted with OSX, but maybe ldd exists;
ldd ./executable
will print shared library dependencies and potential problems.
with OSX use otool instead of ldd. Start with otool -L -- Noel
Hi I used otool to get the following dependencies otool -L libHOMEServices.dylib libHOMEServices.dylib: libHOMEServices.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libiconv.2.dylib (compatibility version 5.0.0, current version 5.0.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.6) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 11.0.0) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 368.28.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 18.0.0) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 128.0.0) @executable_path/XUL (compatibility version 1.0.0, current version 1.0.0) @executable_path/libxpcom.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/libmozjs.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/libnspr4.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/libnss3.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/libplc4.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/libplds4.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/libsmime3.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/libsoftokn3.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/libssl3.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/libsqlite3.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/../Frameworks/Ext2fsLibrary.framework/Versions/A/Ext2fsLibrary (compatibility version 1.0.0, current version 1.0.0) @executable_path/libnssutil3.dylib (compatibility version 1.0.0, current version 1.0.0) libboost_regex-xgcc40-mt-1_36.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 22.0.0) I assume that because no path is given, that the boost lib should go in the same folder as the libHOMEServices.dylib, but placing it in that folder the application still does not start. The dependencies of boost library are otool -L libboost_regex-xgcc40-mt-1_36.dylib libboost_regex-xgcc40-mt-1_36.dylib: libboost_regex-xgcc40-mt-1_36.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.1) If I do not link with the boost libraries, then the application starts. Regards Katherine K. Noel Belcourt wrote:
On Sep 19, 2008, at 11:45 PM, Zeljko Vrba wrote:
On Fri, Sep 19, 2008 at 01:19:15PM -0700, kittymaguire wrote:
Is there a tool on the mac to determine why a dynamic library does not load.
I'm not well acquainted with OSX, but maybe ldd exists;
ldd ./executable
will print shared library dependencies and potential problems.
with OSX use otool instead of ldd. Start with
otool -L
-- Noel
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- View this message in context: http://www.nabble.com/App-will-not-run-when-linked-to-boost-thread-library-t... Sent from the Boost - Users mailing list archive at Nabble.com.
On 22/09/2008, at 5:44 PM, kittymaguire wrote:
Hi
I used otool to get the following dependencies
... snip
I assume that because no path is given, that the boost lib should go in the same folder as the libHOMEServices.dylib, but placing it in that folder the application still does not start.
I don't know about that. The loader will have to be able to find it one way or another. Can you run the application from the command line, and describe the error message (if any). If the problem is that the loader can't find the libraries, you will see a useful message. Otherwise you are probably barking up the wrong tree with otool. Also you might have a look in the logs---start up Console.app and look in system.log.
If I do not link with the boost libraries, then the application starts.
Are you using bjam? I think that's the problem. D
The application is based on xul, so running from the command line give no error messages, also tried the console, but again no error messages. But yesterday I found the problem, our xul uses a wrapper to give the parameters to xulrunner and if I placed the dylibs in the folder of the wrapper then the application will start. Is there a way to build the boost libraries and specific their location, as it would be better if the boost libraries where in the same folder as the xulrunner dylibs. I am using bjam to build boost. David Philp wrote:
On 22/09/2008, at 5:44 PM, kittymaguire wrote:
Hi
I used otool to get the following dependencies
... snip
I assume that because no path is given, that the boost lib should go in the same folder as the libHOMEServices.dylib, but placing it in that folder the application still does not start.
I don't know about that. The loader will have to be able to find it one way or another.
Can you run the application from the command line, and describe the error message (if any). If the problem is that the loader can't find the libraries, you will see a useful message. Otherwise you are probably barking up the wrong tree with otool.
Also you might have a look in the logs---start up Console.app and look in system.log.
If I do not link with the boost libraries, then the application starts.
Are you using bjam? I think that's the problem.
D
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- View this message in context: http://www.nabble.com/App-will-not-run-when-linked-to-boost-thread-library-t... Sent from the Boost - Users mailing list archive at Nabble.com.
participants (4)
-
David Philp
-
K. Noel Belcourt
-
kittymaguire
-
Zeljko Vrba