LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-21-2014, 04:35 AM   #1
Tonystark
LQ Newbie
 
Registered: Jul 2013
Posts: 13

Rep: Reputation: Disabled
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_'

Please help. I have been stuck for really a long time.
 
Old 03-21-2014, 05:17 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,577

Rep: Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816
about LD_LIBRARY_PATH:
it is used by running processes, but not by a make or a compilation (actually the compiler itself may need it to be able to work, but does not affect the result).
so my suggestion is: do not alter it at all.
about the error: undefined reference:
it looks like a linker error, probably your makefile is not complete or a library (.so) file is missing. Try to insert -llapack or -lblas. (actually I do not know which one, because I haven't seen your makefile).
 
Old 03-21-2014, 07:21 AM   #3
Tonystark
LQ Newbie
 
Registered: Jul 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
Thank you so much for your patient reply. The make file is a CMakeLists.txt. The file contents are below.

#
# Author: Jakob Engel <jajuengel@gmail.com>
#

cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Set the build type. Options are:
# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage
# Debug : w/ debug symbols, w/o optimization
# Release : w/o debug symbols, w/ optimization
# RelWithDebInfo : w/ debug symbols, w/ optimization
# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries
set(ROS_BUILD_TYPE RelWithDebInfo)

rosbuild_init()

#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)


# ------------------- add dynamic reconfigure api ------------------------------------
rosbuild_find_ros_package(dynamic_reconfigure)
include(${dynamic_reconfigure_PACKAGE_PATH}/cmake/cfgbuild.cmake)
gencfg()




# --------------------------- stateestimation & PTAM --------------------------------
# set header ans source files
set(STATEESTIMATION_SOURCE_FILES
src/stateestimation/GLWindow2.cc
src/stateestimation/GLWindowMenu.cc
src/stateestimation/main_stateestimation.cpp
src/stateestimation/DroneKalmanFilter.cpp
src/stateestimation/Predictor.cpp
src/stateestimation/PTAMWrapper.cpp
src/stateestimation/MapView.cpp
src/stateestimation/EstimationNode.cpp
src/stateestimation/PTAM/ATANCamera.cc
src/stateestimation/PTAM/Bundle.cc
src/stateestimation/PTAM/HomographyInit.cc
src/stateestimation/PTAM/KeyFrame.cc
src/stateestimation/PTAM/Map.cc
src/stateestimation/PTAM/MapMaker.cc
src/stateestimation/PTAM/MapPoint.cc
src/stateestimation/PTAM/MiniPatch.cc
src/stateestimation/PTAM/PatchFinder.cc
src/stateestimation/PTAM/Relocaliser.cc
src/stateestimation/PTAM/ShiTomasi.cc
src/stateestimation/PTAM/SmallBlurryImage.cc
src/stateestimation/PTAM/Tracker.cc
)
set(STATEESTIMATION_HEADER_FILES
src/stateestimation/GLWindow2.h
src/stateestimation/GLWindowMenu.h
src/stateestimation/MouseKeyHandler.h
src/HelperFunctions.h
src/stateestimation/DroneKalmanFilter.h
src/stateestimation/Predictor.h
src/stateestimation/PTAMWrapper.h
src/stateestimation/MapView.h
src/stateestimation/EstimationNode.h
src/stateestimation/PTAM/ATANCamera.h
src/stateestimation/PTAM/Bundle.h
src/stateestimation/PTAM/customFixes.h
src/stateestimation/PTAM/HomographyInit.h
src/stateestimation/PTAM/KeyFrame.h
src/stateestimation/PTAM/LevelHelpers.h
src/stateestimation/PTAM/Map.h
src/stateestimation/PTAM/MapMaker.h
src/stateestimation/PTAM/MapPoint.h
src/stateestimation/PTAM/MEstimator.h
src/stateestimation/PTAM/MiniPatch.h
src/stateestimation/PTAM/OpenGL.h
src/stateestimation/PTAM/PatchFinder.h
src/stateestimation/PTAM/Relocaliser.h
src/stateestimation/PTAM/settingsCustom.h
src/stateestimation/PTAM/ShiTomasi.h
src/stateestimation/PTAM/SmallBlurryImage.h
src/stateestimation/PTAM/SmallMatrixOpts.h
src/stateestimation/PTAM/TrackerData.h
src/stateestimation/PTAM/Tracker.h
src/stateestimation/PTAM/VideoSource.h
)

# set required libs and headers
include_directories(
${PROJECT_SOURCE_DIR}/thirdparty/TooN/include
${PROJECT_SOURCE_DIR}/thirdparty/libcvd/include
${PROJECT_SOURCE_DIR}/thirdparty/gvars3/include
)

link_directories(
${PROJECT_SOURCE_DIR}/thirdparty/libcvd/lib
${PROJECT_SOURCE_DIR}/thirdparty/gvars3/lib
)
set(PTAM_LIBRARIES GL glut cvd GVars3 blas lapack cblas)
add_definitions(-DKF_REPROJ)

# build!
rosbuild_add_executable(drone_stateestimation ${STATEESTIMATION_SOURCE_FILES} ${STATEESTIMATION_HEADER_FILES})
rosbuild_add_compile_flags(drone_stateestimation -D_LINUX -D_REENTRANT -Wall -O3 -march=nocona -msse3)
target_link_libraries(drone_stateestimation ${PTAM_LIBRARIES})



# ------------------------- autopilot & KI -----------------------------------------
# set header ans source files
set(AUTOPILOT_SOURCE_FILES
src/autopilot/main_autopilot.cpp
src/autopilot/ControlNode.cpp
src/autopilot/DroneController.cpp
src/autopilot/KI/KILand.cpp
src/autopilot/KI/KIAutoInit.cpp
src/autopilot/KI/KIFlyTo.cpp
)
set(AUTOPILOT_HEADER_FILES
src/autopilot/ControlNode.h
src/autopilot/DroneController.h
src/autopilot/KI/KILand.h
src/autopilot/KI/KIAutoInit.h
src/autopilot/KI/KIFlyTo.h
src/autopilot/KI/KIProcedure.h
)

# build!
rosbuild_add_executable(drone_autopilot ${AUTOPILOT_SOURCE_FILES} ${AUTOPILOT_HEADER_FILES})



# ---------------------------- GUI --------------------------------------------------
# set header ans source files
set(GUI_SOURCE_FILES
src/UINode/main_GUI.cpp
src/UINode/tum_ardrone_gui.cpp
src/UINode/RosThread.cpp
src/UINode/PingThread.cpp
)

set(GUI_HEADER_FILES
src/UINode/tum_ardrone_gui.h
src/UINode/RosThread.h
src/UINode/PingThread.h
)

# *.ui
set(GUI_UI_FILES
src/UINode/tum_ardrone_gui.ui
)

# *.qrc
set(GUI_RESOURCE_FILES
)

# do QT stuff
ADD_DEFINITIONS( -Wall )
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
QT4_ADD_RESOURCES(GUI_RESOURCE_FILES_CPP ${GUI_RESOURCE_FILES})
QT4_WRAP_UI(GUI_UI_FILES_HPP ${GUI_UI_FILES})
QT4_WRAP_CPP(GUI_HEADER_FILES_HPP ${GUI_HEADER_FILES})
include_directories(${CMAKE_CURRENT_BINARY_DIR})

# build!
rosbuild_add_executable(drone_gui ${GUI_SOURCE_FILES} ${GUI_RESOURCE_FILES_CPP} ${GUI_UI_FILES_HPP} ${GUI_HEADER_FILES_HPP})
target_link_libraries(drone_gui ${QT_LIBRARIES} cvd)




# ---------------------------- Messages & Services --------------------------------------------------
#uncomment if you have defined messages
rosbuild_genmsg()
#uncomment if you have defined services
rosbuild_gensrv()
 
Old 03-21-2014, 01:48 PM   #4
Tonystark
LQ Newbie
 
Registered: Jul 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
Update :

I followed this link

http://icl.cs.utk.edu/lapack-forum/v....php?f=2&t=253

And changed the order of library links from

blas lapack


to

lapack blas

but the error still persists. Though this time, its a new error

undefined reference to `_gfortran_st_write_done'

Any help or clue from this?
 
Old 03-23-2014, 09:29 AM   #5
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,577

Rep: Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816
probably you need to add -lgfortran at the end
 
1 members found this post helpful.
Old 03-24-2014, 01:17 AM   #6
Tonystark
LQ Newbie
 
Registered: Jul 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
Earlier I had included gfortran before lapack. Now I tried adding it in the end and it worked. Thanks!
 
  


Reply

Tags
executables, lib, ubuntu 12.04, vmware


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Run an executable file ( created from Qt) post installation (linux/redhat). udaypratapyati Linux - Newbie 2 02-26-2011 01:19 AM
Running an executable file from a user created interface krisykc Linux - General 3 03-15-2007 01:54 PM
Make newly created file executable Black Chaos Linux - General 3 08-03-2006 10:53 AM
every file is created executable oopsnic Fedora 4 08-15-2005 02:38 AM
Linux Executable File Help (created from a .c file) MattG1981 Linux - Newbie 7 06-06-2004 04:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration