Cannot find -lnlopt_cxx on compilation

Issue #40 closed
Baptiste BUSCH created an issue

Hello,

I have been using an older version of trac_ik for some months already. Lately I have updated trac_ik and some other system libraries and got the following error on catkin_make command:

/usr/bin/ld: Cannot find -lnlopt_cxx on compilation

I know tracik requires nltop to be installed. When updating system libraries it has also updated nlopt one. I have also downloaded and installed the latest version of nlopt from their website just in case system upgrade messed it up.

Could trac_ik need an oldest version of nlopt and be uncompatible with the newest one? If yes could you indicate which version of nlopt is necessary to solve that compilation error.

Thank you very much in advance.

Comments (3)

  1. Baptiste BUSCH reporter

    I have been able to solve it by createing a symbolic link from libnlopt.so to libnlopt_cxx.so. I suppose the newest nlopt do not create the cxx.so library. You could probably change the name in the import to solve that issue.

  2. Robbert Hofman

    I could not catkin build this repository, giving me the following error:

    Errors     << trac_ik_examples:make ~/catkin_ws/logs/trac_ik_examples/build.make.000.log    
    /usr/bin/ld: ~/catkin_ws/devel/.private/trac_ik_lib/lib/libtrac_ik.so: undefined reference to `nlopt_get_errmsg'
    collect2: error: ld returned 1 exit status
    make[2]: *** [CMakeFiles/ik_tests.dir/build.make:121: ~/catkin_ws/devel/.private/trac_ik_examples/lib/trac_ik_examples/ik_tests] Error 1
    make[1]: *** [CMakeFiles/Makefile2:668: CMakeFiles/ik_tests.dir/all] Error 2
    make: *** [Makefile:141: all] Error 2
    

    Indeed, @Baptiste Bernard Bordes 's solution worked for me, after building nlopt from source:

    cd /usr/local/lib
    sudo ln -s libnlopt.so libnlopt_cxx.so
    

    did the trick.

  3. Log in to comment