# Executable not created after rosmake

This error am facing is strange and am not able to resolve this over 5 days. your help is much appreciated. I have detailed the issue below.

I compiled a ros package known as tum_ardrone. before running rosmake, the ld_library_path was

    /opt/ros/fuerte/lib


when I ran

    rosmake tum_ardrone


It showed the following error

     undefined reference to dgemm_'


I concluded that the error was related to missing links, through lapack and blas, and thus included the following into LD_LIBRARY_PATH.

     /opt/ros/fuerte/lib:usr/lib


I tried rosmake againa nd still got the error.

After that, I modified the LD_LIBRARY_PATH to just

    /usr/lib


and the pakcage was compiled without errors. However, all exe's pertaining to the package was created except one. The exe was defined and included in the CMakeLists.txt file as well. However the exe named drone_stateestimation was not created. And this is the exe that is connected to lapack and blas, the reason for those errors This has nothing to do with the package. It is a generic issue, I hope since the same package works fine in another laptop. I even tried reinstalling/downloading a new copy the package, but no use.

Can anybody please tell me what could be the problem?

Is there another interpretation for the following error, or a direct solution?

     undefined reference to dgemm_'


Update :

In the Cmake file, the order of the link was

                    blas lapack


I changed it to

                   lapack blas.


Now I am facing with a new error

                  undefined reference to _gfortran_st_write_done'


As per suggestions, I have maintained the LD_LIBRARY_PATH the same and haven't altered it like I did before,

A link had a similar question and provided a suggestion. not able to post links due to my karma.

the suggestion

                                     UPDATE:
Your problem appears to be that the correct libraries are not being found by the linker. My first guess is that you are using "gcc" to compile and link instead of using "gfortran". GCC will compile the Fortran source but does not "know" where the standard Fortran libraries are located.

edit retag close merge delete

1

In my opinion removing /opt/ros/fuerte/lib from LD_LIBRARY_PATH is a very bad idea.

( 2014-03-21 02:48:15 -0500 )edit

( 2014-03-21 08:39:54 -0500 )edit

Please do execute the following commands and provide the full output (put it e.g. on pastebin.com and post the link here, put spaces in the link to post despite low karma) roscd tum_ardrone, make clean, VERBOSE=1 make -j1.

( 2014-03-22 00:09:24 -0500 )edit

Just a longshot, since you mentioned chaning the library order: What happens when you put blas lapack blas (blas appears twice) instead of blas lapack` as the linked libraries?

( 2014-03-22 00:11:25 -0500 )edit

I tried lapack blas gfortran and it worked.!

( 2014-03-23 20:28:44 -0500 )edit