Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 06-14-2012, 02:53 PM   #1
LQ Newbie
Registered: Jun 2012
Posts: 6

Rep: Reputation: Disabled
Anyone good with Makefiles?

I have been using linux as a scientist for many years, and I sort of vaguely understand how install scripts and Makefiles work, though I am embarassed to say I have never done a proper study of them.

I am installing some scientific software from source, and I have a problem where the


flag is not recognized. Here is an example of an error that comes up in the output:

/bin/bash ../../libtool --mode=link g++  -g -O2   -o DllPlugInTester -ldl DllPlugInTester.o CommandLineParser.o ../../src/cppunit/ 
g++ -g -O2 -o .libs/DllPlugInTester DllPlugInTester.o CommandLineParser.o  -ldl ../../src/cppunit/.libs/ -Wl,--rpath -Wl,/media/shared/research/software/ScienceTools-v9r27p1-fssc-20120410/external/x86_64-unknown-linux-gnu-libc2.13-20/lib
../../src/cppunit/.libs/ undefined reference to `dlsym'
../../src/cppunit/.libs/ undefined reference to `dlopen'
../../src/cppunit/.libs/ undefined reference to `dlclose'
collect2: ld returned 1 exit status
make[10]: *** [DllPlugInTester] Error 1
make[10]: Leaving directory `/media/shared/research/software/ScienceTools-v9r27p1-fssc-20120410/external/cppunit/src/DllPlugInTester'
make[9]: *** [all-recursive] Error 1
Now I have gone into the directory where the offending "g++ ..." command is executed, and if I add the -ldl flag to the END of that compile statement, everything works. The problem is, I have NO CLUE how to get that done in the script, so that it doesn't throw this error and stop. Perhaps an alternative would be to have it stop exiting for errors? I am not sure how to do that either. I will attach the makefile, as soon as I figure out how...

Thank you!
Attached Files
File Type: txt Makefile.txt (2.6 KB, 9 views)

Last edited by emmiesix; 06-14-2012 at 03:12 PM.
Old 06-14-2012, 03:08 PM   #2
Didier Spaier
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,121

Rep: Reputation: Disabled
To attach your Makefile, edit your post, click the "Go Advanced" button, then click the paperclip icon, click "Browse", select your file then click "Upload".

LQ is a bit picky about file types allowed, so append ".txt" to its name in order to make it recognized as a text file.

Oh and I almost forgot: welcome to LQ

Last edited by Didier Spaier; 06-14-2012 at 03:10 PM. Reason: typo corrected
Old 06-14-2012, 03:14 PM   #3
LQ Newbie
Registered: Jun 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks, it is now attached!

The thing I find so confusing about makefiles is all the variables that I don't see defined anywhere... where do they get their values?
Old 06-14-2012, 03:35 PM   #4
LQ Newbie
Registered: Jun 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Ok, the board ate my reply.

I just wanted to report that I have found that the attached makefile simply calls many other (100s) of makefiles.

The good news is that I figured out how to alter the particular one causing the error above and now it goes smoothly. The bad news is that there are HUNDREDS of makefiles!

So, I guess I need to work at the automake stage to figure out how to fix this? Yikes...


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
Makefiles... ejohns85 Programming 4 07-11-2011 06:50 AM
makefiles... DEF. Programming 2 04-20-2009 01:46 PM
Makefiles deveshs Linux - Software 2 05-02-2005 05:26 AM
Makefiles and Me dpottinger Linux - Newbie 5 07-24-2004 11:14 PM
MAKEFILEs shinpadsmt Linux - Newbie 3 02-21-2004 02:52 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:42 AM.

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