Issue Details (XML | Word | Printable)

Key: STDCXX-488
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Eric Lemings
Reporter: Andrew Black
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

[Mac OS X/Darwin] RPATH not defined in makefile.in

Created: 18/Jul/07 03:29 PM   Updated: 11/Jun/08 05:58 PM
Return to search
Component/s: Build and Installation
Affects Version/s: 4.2.0, 4.2.1
Fix Version/s: 4.2.2

Time Tracking:
Original Estimate: Not Specified
Remaining Estimate: 0h
Time Spent - 2.17h
Time Spent: 2.17h
Time Spent - 2.17h

Environment: All Mac OS X and Darwin platforms, dynamic builds

Severity: Runtime Error
Resolved: 18/Mar/08 09:07 PM
Resolution Date: 11/Jun/08 05:57 PM


 Description  « Hide
When configuring a build on Mac OS X and Darwin, the generated makefile.in doesn't define a value for the RPATH makefile variable. As a result, the path to the library directory isn't embedded into the build. In turn, this leads to failures running the generated executables in dynamic builds.

A placeholder workaround is to define DYLD_LIBRARY_PATH.

The correct resolution is to determine the correct value for the RPATH variable.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Martin Sebor added a comment - 27/Oct/07 09:31 PM
This should be easy to fix. Scheduled for 4.2.1.

Martin Sebor added a comment - 13/Mar/08 04:05 PM
Assigned to Brad.

Martin Sebor added a comment - 18/Mar/08 06:15 PM
See the following thread for a discussion of the problem.


Martin Sebor added a comment - 05/May/08 04:42 PM
The patch is bad. See this discussion for the problems it has caused and some possible solutions.

Martin Sebor added a comment - 05/May/08 04:43 PM
Added 4.2.1 to the list of Affected Version/s and scheduled for 4.2.2.

Martin Sebor added a comment - 19/May/08 11:55 PM
See also this proposal for how to abstract away both the DYLD_LIBRARY_PATH and LD_LIBRARY_PATH variables from the makefiles.

Eric Lemings added a comment - 02/Jun/08 08:56 PM
Probably just need to remove the $BUILDDIR from the @install_name. Also, it might be possible to use the RPATH originally requested:

"And with 10.5 comes @rpath. If the install_name of your library is @rpath/libmysqlpp.2.dylib and you link your executable with, -Wl,-rpath,/home/graham/lib -Wl,-rpath,../lib -Wl,-rpath,. then the dynamic linker will look for libmysqlpp.2.dylib in each dir in turn until it finds it."

http://lists.apple.com/archives/xcode-users/2007/Dec/msg00179.html


Eric Lemings added a comment - 11/Jun/08 05:57 PM
I tested the latest change (http://svn.apache.org/viewvc?view=rev&revision=662906) without setting BUILDDIR and without setting DYLD_LIBRARY_PATH and it seems to work as it should. Only tested on Darwin 9. Still needs testing on Darwin 8 but confident it is now resolved...for good.