Hi all,
I'm trying building ros under osx Lion by following the tutorial reported on the ROS website. I have installed macports and the latest version of XCode.
I applied the patch reported here: https://code.ros.org/trac/ros/ticket/3626 Otherwise the compilation of rosconsole still fails with the following error:
mkdir -p bin
cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake ..
[rosbuild] Building package rosconsole
[rosbuild] Including /Users/luca/Software/ros/electric/ros_comm/clients/roslisp/cmake/roslisp.cmake
[rosbuild] Including /Users/luca/Software/ros/electric/ros_comm/clients/rospy/cmake/rospy.cmake
[rosbuild] Including /Users/luca/Software/ros/electric/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_TOOLCHAIN_FILE
-- Build files have been written to: /Users/luca/Software/ros/electric/ros_comm/tools/rosconsole/build
cd build && make -l8
[ 0%] Built target rospack_genmsg_libexe
[ 0%] Built target rosbuild_precompile
Linking CXX shared library ../lib/librosconsole.dylib
clang: warning: argument unused during compilation: '-pthread'
ld: library not found for -llog4cxx
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [../lib/librosconsole.dylib] Error 1
make[2]: *** [CMakeFiles/rosconsole.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2
It seems that it is not able to find log4cxx. Otherwise it is installed through macport and the .profile file is configured for seeing it. This is my .profile:
# MacPorts Installer addition on 2011-10-21_at_13:20:04: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
# ROS
source /Users/luca/Software/ros/electric/setup.bash
[ -f ~/.git-bash-completion.sh ] && . ~/.git-bash-completion.sh
# define colors
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
export CPATH=/opt/local/include:/usr/local/include
export LIBRARY_PATH=/opt/local/lib:/usr/local/lib:/usr/lib/
export LD_LIBRARY_PATH=/opt/local/lib:/usr/local/lib
export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/opt/local/lib:/opt/local/Library/Frameworks:/usr/local/lib:/usr/lib/
Is there a know solution?
Thanks!
If you are not married to Macports, William has also done a lot of good work getting ROS up and running using Homebrew. This is how I installed ROS on Lion and it was pretty painless.
You are trying to build it with Xcode? I would think you just need to add the path '/opt/local/lib' to your library link path in Xcode.
Here is a stack overflow talking about linking external libraries with Xcode: http://stackoverflow.com/questions/445815/linking-libraries-in-xcode
EDIT:
Sorry I misunderstood your question. Try running LDFLAGS=-L/opt/local/lib make while you are in the directory given by roscd rosconsole. I think your environment variables should have covered this but maybe they have typos or something and this will show you that if rosconsole then compiles.
Also check to make sure something like /opt/local/lib/liblog4cxx.dylib exitsts.
Asked: 2011-11-30 04:43:25 -0500
Seen: 440 times
Last updated: Dec 06 '11
Compilation error building Rviz on OSX Lion
Percepetion_pcl status under Osx [closed]
Error building nodelet under osx Lion
CMAKE_OSX_DEPLOYMENT_TARGET and CMAKE_OSX_SYSROOT
Error building geometry stack in OSX
ROS install errors on Lion using Homebrew
Building Ogre fails on Osx Lion
netpbm fails to install when installing with Homebrew on OS X
ROS Answers is licensed under Creative Commons Attribution 3.0 Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.