Shared object files (libroslib.so)

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Shared object files (libroslib.so)

ibwood
Hi all,

I have had a bit of trouble with shared object files. I get an error when I try to run a node and I'm not sure why. I have the "libroslib.so" file located in the "lib" package of my project. The error that comes up is the following:

" error while loading shared libraries: libroslib.so: cannot open shared object file: No such file or directory "

-Ian

Reply | Threaded
Open this post in threaded view
|

Re: Shared object files (libroslib.so)

Cedric Skybotix
On 07/12/10 16:29, ibwood wrote:

> Hi all,
>
> I have had a bit of trouble with shared object files. I get an error when I
> try to run a node and I'm not sure why. I have the "libroslib.so" file
> located in the "lib" package of my project. The error that comes up is the
> following:
>
> " error while loading shared libraries: libroslib.so: cannot open shared
> object file: No such file or directory "
>
> -Ian
>
>
>    

Hello Ian,

You can use the LD_LIBRARY_PATH environment variable to define where you
system is looking for libraries.

You can also use ldd <binary name> to find out which libraries are used,
and where they are found.

HTH

--
Dr. Cedric Pradalier
http://www.asl.ethz.ch/people/cedricp

_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|

Re: Shared object files (libroslib.so)

ibwood
Hi Cedric,

Thanks for the quick reply. Unfortunately the system still can't locate the file. Maybe I did this incorrectly... I opened the bashrc file and included " LD_LIBRARY_PATH=~*path* ". Any thoughts?

-Ian
Reply | Threaded
Open this post in threaded view
|

Re: Shared object files (libroslib.so)

Cedric Skybotix
On 07/12/10 17:02, ibwood wrote:
> Hi Cedric,
>
> Thanks for the quick reply. Unfortunately the system still can't locate the
> file. Maybe I did this incorrectly... I opened the bashrc file and included
> " LD_LIBRARY_PATH=~*path* ". Any thoughts?
>
> -Ian
>    

"~" does not mean anything to the dynamic loader. Use the $HOME variable
in your path instead.

Best

--
Dr. Cedric Pradalier
http://www.asl.ethz.ch/people/cedricp

_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|

Re: Shared object files (libroslib.so)

ibwood
It's still not working. I probably have to install the libraries or something, using sudo apt-get install. I was looking online but I couldn't find a command for the specified file.

-Ian
Reply | Threaded
Open this post in threaded view
|

Re: Shared object files (libroslib.so)

Cedric Skybotix
On 07/12/10 17:48, ibwood wrote:
> It's still not working. I probably have to install the libraries or
> something, using sudo apt-get install. I was looking online but I couldn't
> find a command for the specified file.
>
> -Ian
>    

Ian, it seems that you're trying to hack something by copy-pasting
libraries into some directories. This is not at all the way ROS is meant
to be used, and this is not a very maintainable solution.

You should rather add the right dependencies in your manifest to and let
ROS make the linking correctly. In particular, you certainly want to add
<depend package="roscpp"/> to your manifest file.

Best,

--
Dr. Cedric Pradalier
http://www.asl.ethz.ch/people/cedricp

_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|

Re: Shared object files (libroslib.so)

ibwood
Yeah, I had all of the required dependencies in the manifest file. Still not doing it :S
Reply | Threaded
Open this post in threaded view
|

Re: Shared object files (libroslib.so)

Josh Faust
In reply to this post by ibwood

I have had a bit of trouble with shared object files. I get an error when I
try to run a node and I'm not sure why. I have the "libroslib.so" file
located in the "lib" package of my project. The error that comes up is the
following:


What do you mean by this?  Did you move libroslib.so from roscpp into a package called "lib"?

_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|

Re: Shared object files (libroslib.so)

ibwood
oh it was originally in the roscpp package? I must have moved it.. I guess that's what cedric was trying to say. Thanks guys.

-Ian
Reply | Threaded
Open this post in threaded view
|

Re: Shared object files (libroslib.so)

Brian Gerkey-2

You shouldn't move libraries around.  The ROS build system uses package metadata to automatically find and link your applications against the appropriate libraries.

    brian.

On Jul 12, 2010 10:07 AM, "ibwood" <[hidden email]> wrote:
>
> oh it was originally in the roscpp package? I must have moved it.. I guess
> that's what cedric was trying to say. Thanks guys.
>
> -Ian
> --
> View this message in context: http://ros-users.122217.n3.nabble.com/Shared-object-files-libroslib-so-tp960459p960890.html
> Sent from the ROS-Users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> ros-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/ros-users
> _______________________________________________
> ros-users mailing list
> [hidden email]
> https://code.ros.org/mailman/listinfo/ros-users


_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|

Re: Shared object files (libroslib.so)

ibwood
In reply to this post by ibwood
Ok but say I wanted to install a library that doesn't exist at the moment. How would one go about doing that?

Thanks,
-Ian
Reply | Threaded
Open this post in threaded view
|

Re: Shared object files (libroslib.so)

Brian Gerkey-2
On Tue, Jul 13, 2010 at 7:54 AM, ibwood <[hidden email]> wrote:
> Ok but say I wanted to install a library that doesn't exist at the moment.
> How would one go about doing that?

Can you elaborate?  I don't understand what you mean.

        brian.
_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|

Re: Shared object files (libroslib.so)

ibwood
Sure, I want to create a shared library. When I try to run the same node, another shared object file is coming up with problems. Here is the error:

error while loading shared libraries: libboost_thread-gcc42-mt-1_37.so.1.37.0: cannot open shared object file: No such file or directory

The thing with the first file i specified (libroslib.so) was that it existed, this one does not, or I have no idea on the location of it. I have searched online but I am not finding the required information, such as what is in the file, or how to create it properly.

-Ian
Reply | Threaded
Open this post in threaded view
|

Re: Shared object files (libroslib.so)

ibwood
If anyone knows how to fix this error I would really appreciate it. I'm still not having any luck..
Reply | Threaded
Open this post in threaded view
|

Re: Shared object files (libroslib.so)

Brian Gerkey-2
In reply to this post by ibwood
On Tue, Jul 13, 2010 at 10:58 AM, ibwood <[hidden email]> wrote:

> Sure, I want to create a shared library. When I try to run the same node,
> another shared object file is coming up with problems. Here is the error:
>
> error while loading shared libraries:
> libboost_thread-gcc42-mt-1_37.so.1.37.0: cannot open shared object file: No
> such file or directory
>
> The thing with the first file i specified (libroslib.so) was that it
> existed, this one does not, or I have no idea on the location of it. I have
> searched online but I am not finding the required information, such as what
> is in the file, or how to create it properly.

hi Ian,

It looks like something didn't link against Boost properly.  That
shouldn't be the case, but it can happen.

What are you trying to run?  Can you post the CMakeLists.txt for your package?

        brian.
_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|

Re: Shared object files (libroslib.so)

ibwood
It's ok now I got it working. Thanks a lot for your help Brian.

Turns out the package with the node that I was trying to run wasn't being compiled successfully when using rosmake. When I got it compiled, the resulting node worked with no problem.

-Ian