Re: [ros-users] Enabling double precision and finding librar…

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ build_output.log (text/x-log)
+ build_output.log (text/x-log)
Delete this message
Reply to this message
Author: Soo-Hyun Yoo
Date:  
To: ros-users
Subject: Re: [ros-users] Enabling double precision and finding libraries in ODE
Brian,

I have installed C Turtle and included the lines John gave in the
manifest.xml of package "opende," though they did not seem to have any
effect.

Attached are the build_output.log files for atrias_sim on the first and
second Make invocations.

Do you think using third-party dependencies will be a dead end in the long
run? I will soon try using the system installation of ODE instead of the one
provided by ROS since the system-wide ODE installation currently compiles
with our non-ROS code.

Soo-Hyun Yoo

On Mon, Aug 16, 2010 at 11:29 AM, Brian Gerkey <>wrote:

> On Sun, Aug 15, 2010 at 5:44 PM, Daniel Stonier <>
> wrote:
> > On 16 August 2010 09:19, Soo-Hyun Yoo <> wrote:
> >> First, how do I customize how ROS packages are built? ODE builds
> >> successfully in single precision, but this will be problematic later
> on. I
> >> tried uncommenting "--enable-double-precision" in the
> "Makefile.ode.tarball"
> >> file in the opende package directory to no effect.
> >
> > I'd love a way to customise them too - bit like gentoo with its USE
> flags.
> > Not really possible at the moment though. Not sure if they have plans in
> > that direction either. Anyway, its not a really big problem. I usually
> > simply fork a package, sometimes even share resources (cmake files)
> betwen
> > the packages so I'm not creating redundancies. We did this with opencv at
> > our company to create an embedded version of opencv without all the gui
> > components.
>
> This is not an area where we've focused much effort, because we'd
> prefer to get out of the business of downloading, unpacking, and
> building other people's code. Standard package managers (apt-get,
> yum, port, emerge, etc.) do that much better than we ever will. We
> strongly prefer to rely on software that can be installed by an OS
> package manager. We pull 3rdparty code into the build only as a last
> resort, often because the version available from the package manager
> is too old (but "too old" is always up for debate, and I always argue
> the side of using the older version, even if it's worse, because we
> don't take on a maintenance burden).
>
> >> Third, I should mention that I am new to CMake and suspect that my
> >> CMakeLists.txt is incorrect. I get make errors the first time I build
> >> atrias_sim but they disappear on the second build. This makes me suspect
> >> that I am incorrectly specifying the libraries for the atrias_sim
> >> executable. Could someone more experienced with CMake please verify
> this?
> >
> > You are building a library and an executable. CMake and RoS are probably
> > using parallel jobs in which case it tries to build the library and the
> > exeuctable at the same time. However on the first run, the library will
> take
> > longer and so when the executable tries to link, it can't find the
> library.
> > Note that you won't be seeing this problem if your ROS_PARALLEL_JOBS is
> set
> > to 1.
> > To fix it, simply add the following line to your cmake and it will make
> sure
> > it will delay building the executable until after the library has been
> > built.
> > add_dependencies(robot_sim ${PROJECT_NAME})
>
> Hmm, that shouldn't fix anything. In the following lines from the
> CMakeLists.txt, the call to target_link_libraries() causes the
> executable to depend on the library:
>
> rosbuild_add_library(${PROJECT_NAME} ${SIM_LIB})
> rosbuild_add_executable(robot_sim src/robot_sim.cpp)
> target_link_libraries(robot_sim ${PROJECT_NAME})
>
> There shouldn't be any missing dependencies. Can you post the build
> errors that you see on the first 'make' invocation?
>
>        brian.
> _______________________________________________
> ros-users mailing list
> 
> https://code.ros.org/mailman/listinfo/ros-users

>

mkdir -p bin
cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
[rosbuild] Building package atrias_sim
[rosbuild] Cached build flags older than manifests; calling rospack to get flags
[rosbuild] Including /home/yoos/devel/ros/ros/core/rospy/cmake/rospy.cmake
[rosbuild] Including /home/yoos/devel/ros/ros/core/roscpp/cmake/roscpp.cmake
[rosbuild] Including /home/yoos/devel/ros/ros/core/roslisp/cmake/roslisp.cmake
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build
cd build && make -j2
make[1]: Entering directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[2]: Entering directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[3]: Entering directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
Scanning dependencies of target rospack_genmsg_libexe
make[3]: Leaving directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
[ 0%] Built target rospack_genmsg_libexe
make[3]: Entering directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
Scanning dependencies of target rosbuild_precompile
make[3]: Leaving directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
[ 0%] Built target rosbuild_precompile
make[3]: Entering directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
Scanning dependencies of target atrias_sim
make[3]: Leaving directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[3]: Entering directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
[ 16%] [ 33%] Building CXX object CMakeFiles/atrias_sim.dir/src/robot_sim.o
Building CXX object CMakeFiles/atrias_sim.dir/src/sem.o
In file included from /mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/src/robot_sim.cpp:1:0:
/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/src/robot_sim.h:4:0: warning: "dDOUBLE" redefined
<command-line>:0:0: note: this is the location of the previous definition
/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/src/sem.cpp: In function ‘int sem_get_semid()’:
/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/src/sem.cpp:72:1: warning: control reaches end of non-void function
[ 50%] Building CXX object CMakeFiles/atrias_sim.dir/src/shm.o
/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/src/robot_sim.cpp: In function ‘void nearCallback(void*, dxGeom*, dxGeom*)’:
/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/src/robot_sim.cpp:421:79: warning: suggest parentheses around assignment used as truth value
/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/src/robot_sim.cpp:430:13: warning: suggest parentheses around assignment used as truth value
/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/src/robot_sim.cpp: In function ‘void create_bodies()’:
/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/src/robot_sim.cpp:749:14: warning: unused variable ‘q’
/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/src/robot_sim.cpp: In function ‘void spawn_logging()’:
/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/src/robot_sim.cpp:607:58: warning: ‘t’ is used uninitialized in this function
[ 66%] Building CXX object CMakeFiles/atrias_sim.dir/src/sim_log.o
[ 83%] Building CXX object CMakeFiles/atrias_sim.dir/src/sim_vis.o
/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/src/robot_sim.cpp: At global scope:
/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/src/robot_sim.cpp:46:13: warning: ‘void start()’ declared ‘static’ but never defined
/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/src/robot_sim.cpp:47:13: warning: ‘void command(int)’ declared ‘static’ but never defined
/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/src/sim_vis.cpp: In function ‘void* send_draw_data()’:
/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/src/sim_vis.cpp:16:1: warning: no return statement in function returning non-void
Linking CXX shared library ../lib/libatrias_sim.so
/usr/bin/ld: cannot find -ldrawstuff
collect2: ld returned 1 exit status
make[3]: *** [../lib/libatrias_sim.so] Error 1
make[3]: Leaving directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[2]: *** [CMakeFiles/atrias_sim.dir/all] Error 2
make[2]: Leaving directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make: *** [all] Error 2
mkdir -p bin
cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake ..
[rosbuild] Building package atrias_sim
[rosbuild] Including /home/yoos/devel/ros/ros/core/rospy/cmake/rospy.cmake
[rosbuild] Including /home/yoos/devel/ros/ros/core/roscpp/cmake/roscpp.cmake
[rosbuild] Including /home/yoos/devel/ros/ros/core/roslisp/cmake/roslisp.cmake
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build
cd build && make -j2
make[1]: Entering directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[2]: Entering directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[3]: Entering directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[3]: Leaving directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
[ 0%] Built target rospack_genmsg_libexe
make[3]: Entering directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[3]: Leaving directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
[ 0%] Built target rosbuild_precompile
make[3]: Entering directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[3]: Leaving directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[3]: Entering directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
Linking CXX shared library ../lib/libatrias_sim.so
/usr/bin/ld: cannot find -ldrawstuff
collect2: ld returned 1 exit status
make[3]: *** [../lib/libatrias_sim.so] Error 1
make[3]: Leaving directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[2]: *** [CMakeFiles/atrias_sim.dir/all] Error 2
make[2]: Leaving directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make: *** [all] Error 2