Issue Details (XML | Word | Printable)

Key: LOGCXX-245
Type: Bug Bug
Status: Resolved Resolved
Resolution: Invalid
Priority: Major Major
Assignee: Curt Arnold
Reporter: Curt Arnold
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Log4cxx

Generated XCode projects fail to link with apr dylibs in /usr/lib

Created: 21/Feb/08 09:19 PM   Updated: 12/Mar/08 08:35 PM
Return to search
Component/s: Build
Affects Version/s: 0.10.0
Fix Version/s: None

Time Tracking:
Not Specified

Resolution Date: 12/Mar/08 08:35 PM


 Description  « Hide
Mac OS/X comes with APR and APR-Util preinstalled in /usr/lib, however attempting to build the XCode project files that come with log4cxx 0.10.0 will fail to link with these libraries. The suggested work-around is to create symbolic links to the preinstalled libraries and then add the path to the symbolic links on the library search path which surprisingly does work.

From log4cxx docs:

  Xcode fails when linking to apr and aprutil dylibs in /usr/lib,
  however it will succeed linking to symbolic links to the same files.
  As a workaround until a resolution is found:
  
  Create symbolic links to the libraries in some arbitrary directory:
  
+-----+
mkdir ~/apr-dylib
cd ~/apr-dylib
ln -s /usr/lib/libapr-1.dylib libapr-1.dylib
ln -s /usr/lib/libaprutil-1.dylib libaprutil-1.dylib
+------+
   
   Then add the arbitary directory to the Library Search Paths
   (Build tab of the Get Info page for the project).
    
    
   The project file generation does does not
   properly create an entry in the "Link Binary with Libraries"
   build phase for projects that depend on log4cxx. To
   work around the problem, open the project in Xcode and
   in the Groups & Files pane, drag log4cxx.dylib
   and drop on the "Link Binary with Libraries" folder
   under Targets.




 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Curt Arnold added a comment - 23/Feb/08 03:25 PM
The issue is that MacOSX 10.4 did not ship with apr and apr-util and therefore do not have those libraries in $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk. The better solution than suggested in RC2 is to change "Base SDK Path" to MacOSX10.5.sdk.

Curt Arnold added a comment - 12/Mar/08 08:35 PM
Intentional behavior of Xcode which inhibits linking with /usr/lib in preference to linking with SDK. Mac OS 10.4 SDK does not include APR and APR-Util, though 10.5 does.