Problem compiling an icub binary

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem compiling an icub binary

Arturo Ribes-2
Hi,

I am having problems with linking a compiled source to yarp libraries. In a computer with yarp and icub software up to date, I am able to compile my sources successfuly. 
Now I changed to another computer, which I just updated yarp and icub to the latest version (it had old versions from svn, so i moved the old dirs, cloned the git repositories and compiled/installed everything).
But now, when I try to compile my binaries, the linker gives me the following error:

/usr/bin/ld: cannot find -lYARP::YARP_OS
/usr/bin/ld: cannot find -lYARP::YARP_sig
/usr/bin/ld: cannot find -lYARP::YARP_math
/usr/bin/ld: cannot find -lYARP::YARP_dev
/usr/bin/ld: cannot find -lYARP::YARP_name
/usr/bin/ld: cannot find -lYARP::YARP_init

The thing is that my CMakeLists.txt has another executable which also uses yarp but compiles ok. The problematic one is

target_link_libraries(reachReactableTarget ${catkin_LIBRARIES} ${YARP_LIBRARIES} actionPrimitives iKin ctrlLib icubmod ${QT_LIBRARIES})

while the successful one is

target_link_libraries(testYarpROS ${catkin_LIBRARIES} ${YARP_LIBRARIES})

If I add icubmod to the testYarpROS target_link_libraries line, then it gives the same error, but without it, it compiles ok.


-- 
Arturo Ribes, PhD
Researcher in Artificial Intelligence
Artificial Intelligence Research Institute (IIIA)
Spanish National Research Council (CSIC)
Campus UAB, E-08193, Bellaterra, Barcelona, Spain
Tel: +34935809570 (ext 264), Fax: +34935809661
[hidden email] | http://www.iiia.csic.es/~aribes

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem compiling an icub binary

Lorenzo Natale-2

Dear Arturo,

This is strange, I suspect something strange is happening, it could be old CMakeCache pointing to YARP libraries that are no longer available or conflicting library installations, or ${catkin_LIBRARIES} conflicting with ${YARP_LIBRARIES}.

 

Can you print the content of these CMake variables?

 

BTW: we are trying to move these discussions to github/robotology/Support to exploit the github issue tracking system. Do you mind opening an issue there (and copy&paste this discussion)?

 

Lorenzo

 

From: Arturo Ribes [mailto:[hidden email]]
Sent: venerdì 22 maggio 2015 19:08
To: [hidden email]
Subject: [rc-hackers] Problem compiling an icub binary

 

Hi,

 

I am having problems with linking a compiled source to yarp libraries. In a computer with yarp and icub software up to date, I am able to compile my sources successfuly. 

Now I changed to another computer, which I just updated yarp and icub to the latest version (it had old versions from svn, so i moved the old dirs, cloned the git repositories and compiled/installed everything).

But now, when I try to compile my binaries, the linker gives me the following error:

 

/usr/bin/ld: cannot find -lYARP::YARP_OS

/usr/bin/ld: cannot find -lYARP::YARP_sig

/usr/bin/ld: cannot find -lYARP::YARP_math

/usr/bin/ld: cannot find -lYARP::YARP_dev

/usr/bin/ld: cannot find -lYARP::YARP_name

/usr/bin/ld: cannot find -lYARP::YARP_init

 

The thing is that my CMakeLists.txt has another executable which also uses yarp but compiles ok. The problematic one is

target_link_libraries(reachReactableTarget ${catkin_LIBRARIES} ${YARP_LIBRARIES} actionPrimitives iKin ctrlLib icubmod ${QT_LIBRARIES})

while the successful one is

target_link_libraries(testYarpROS ${catkin_LIBRARIES} ${YARP_LIBRARIES})

If I add icubmod to the testYarpROS target_link_libraries line, then it gives the same error, but without it, it compiles ok.



-- 

Arturo Ribes, PhD
Researcher in Artificial Intelligence
Artificial Intelligence Research Institute (IIIA)
Spanish National Research Council (CSIC)
Campus UAB, E-08193, Bellaterra, Barcelona, Spain
Tel: +34935809570 (ext 264), Fax: +34935809661
[hidden email] | http://www.iiia.csic.es/~aribes


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem compiling an icub binary

Daniele E. Domenichelli
In reply to this post by Arturo Ribes-2
Hello Arturo,


On 22/05/15 19:08, Arturo Ribes wrote:
> But now, when I try to compile my binaries, the linker gives me the
> following error:
>
> /usr/bin/ld: cannot find -lYARP::YARP_OS
> /usr/bin/ld: cannot find -lYARP::YARP_sig
> /usr/bin/ld: cannot find -lYARP::YARP_math
> /usr/bin/ld: cannot find -lYARP::YARP_dev
> /usr/bin/ld: cannot find -lYARP::YARP_name
> /usr/bin/ld: cannot find -lYARP::YARP_init


This looks like a known issue with yarp installed over an old versions
not fully uninstalled.
Please check if you have any folder like:

    <prefix>/lib/YARP-<VERSION>

If you do, delete these folders (leaving only the unversioned one
<prefix>/lib/YARP) and try again. If you did not change it manually,
prefix should be /usr/local on linux or C:\Program Files\YARP on windows.

Let us know if this works.


Cheers,
  Daniele

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem compiling an icub binary

Arturo Ribes-2
Indeed, the problem was with multiple versions installed. I had to uninstall everything and then install the new versions of yarp and icub to a separate folder. This last step, although not necessary, makes it easier for future updates.

Thanks for your comments.

On Mon, May 25, 2015 at 5:06 PM, Daniele E. Domenichelli <[hidden email]> wrote:
Hello Arturo,


On 22/05/15 19:08, Arturo Ribes wrote:
> But now, when I try to compile my binaries, the linker gives me the
> following error:
>
> /usr/bin/ld: cannot find -lYARP::YARP_OS
> /usr/bin/ld: cannot find -lYARP::YARP_sig
> /usr/bin/ld: cannot find -lYARP::YARP_math
> /usr/bin/ld: cannot find -lYARP::YARP_dev
> /usr/bin/ld: cannot find -lYARP::YARP_name
> /usr/bin/ld: cannot find -lYARP::YARP_init


This looks like a known issue with yarp installed over an old versions
not fully uninstalled.
Please check if you have any folder like:

    <prefix>/lib/YARP-<VERSION>

If you do, delete these folders (leaving only the unversioned one
<prefix>/lib/YARP) and try again. If you did not change it manually,
prefix should be /usr/local on linux or C:\Program Files\YARP on windows.

Let us know if this works.


Cheers,
  Daniele

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers



--
Arturo Ribes, PhD
Researcher in Artificial Intelligence
Artificial Intelligence Research Institute (IIIA)
Spanish National Research Council (CSIC)
Campus UAB, E-08193, Bellaterra, Barcelona, Spain
Tel: +34935809570 (ext 264), Fax: +34935809661
[hidden email] | http://www.iiia.csic.es/~aribes

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
Loading...