Home | Tutorials | Wiki | Issues
Ask Your Question
0

Linking problem when compiling from source

asked 2013-06-11 19:49:42 -0500

bit-pirate gravatar image

Hi there!

I'm not sure what's going on, but when compiling Gazebo from source (default), the gazebo executable is missing some shared libraries.

$ gazebo
    gazebo: error while loading shared libraries: libgazebo_common.so.1: cannot open shared object file: No such file or directory

$ ldd /usr/local/bin/gazebo
    linux-vdso.so.1 =>  (0x00007fffdcd04000)
    libgazebo_common.so.1 => not found
    libgazebo_util.so.1 => not found
    libgazebo_sdf_interface.so.1 => not found
    libgazebo_transport.so.1 => not found
    libgazebo_physics.so.1 => not found
    libgazebo_sensors.so.1 => not found
    libgazebo_msgs.so.1 => not found
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb95ff5a000)
    libtbb.so.2 => /usr/lib/libtbb.so.2 (0x00007fb95fd2c000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb95fb28000)
    libprotobuf.so.7 => /usr/lib/libprotobuf.so.7 (0x00007fb95f839000)
    libgazebo_math.so.1 => not found
    libboost_thread.so.1.46.1 => /usr/lib/libboost_thread.so.1.46.1 (0x00007fb95f61f000)
    libboost_system.so.1.46.1 => /usr/lib/libboost_system.so.1.46.1 (0x00007fb95f41b000)
    libboost_program_options.so.1.46.1 => /usr/lib/libboost_program_options.so.1.46.1 (0x00007fb95f1b5000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb95eeb5000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb95ec9f000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb95e8df000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fb9601ac000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fb95e6c8000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb95e3cc000)

I can get Gazebo running after adding /usr/local/lib to the LD_LIBRARY_PATH, but I have the feeling, that shouldn't be necessary.

Any idea what's wrong?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-06-12 21:32:53 -0500

Boris gravatar image

According to ldconfig(8)

ldconfig creates the necessary links and cache to the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld.so.conf, and in the trusted directories (/lib and /usr/lib)

Also on Ubuntu there are no configuration files in /etc/ld.so.conf.d/ for such location as /usr/local/lib, thus it has to be added manually in order dynamic linker to find appropriate libraries.

So, seems there is nothing wrong :)

edit flag offensive delete link more

Comments

OK, I went over the [instructions](http://gazebosim.org/wiki/1.6/install#Compiling_From_Source) again and saw that it is actually listed. However, it is missing when using the default. I may just be a matter of correcting those instructions. Thanks for your help!

bit-pirate gravatar imagebit-pirate ( 2013-06-13 19:13:31 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-06-11 19:49:42 -0500

Seen: 1,196 times

Last updated: Jun 12 '13