Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Linux Tools Project » Cannot rebuild opxml, undefined reference to dlopen(dosym and dlerror as well)
Cannot rebuild opxml, undefined reference to dlopen [message #650202] Sat, 22 January 2011 23:03 Go to next message
Ng Oon-Ee is currently offline Ng Oon-EeFriend
Messages: 7
Registered: August 2009
Junior Member
Hi all

In $oprofiledir/natives/linux/opxml, make returns the following

g++ -o opxml opxml.o stable.o oprofiledb.o symbol.o sample.o session.o samplefile.o imageheader.o opinfo.o xmlfmt.o xmlbuf.o xmltag.o sevent.o profileimage.o \
	-lop -lodb -loputil++ -loputil -lbfd -liberty
/usr/lib/libbfd.a(plugin.o): In function `try_load_plugin':
(.text+0x3f4): undefined reference to `dlopen'
/usr/lib/libbfd.a(plugin.o): In function `try_load_plugin':
(.text+0x417): undefined reference to `dlsym'
/usr/lib/libbfd.a(plugin.o): In function `try_load_plugin':
(.text+0x4a3): undefined reference to `dlerror'
collect2: ld returned 1 exit status
make: *** [opxml] Error 1


/usr/lib/libbfd.a exists and belongs to binutils. In my eclipse project I regularly use dlopen, dlsym, and dlclose, have not had a problem compiling said binaries/libraries or using them.

Would appreciate advise/suggestions on what could be wrong.
Re: Cannot rebuild opxml, undefined reference to dlopen [message #650256 is a reply to message #650202] Mon, 24 January 2011 00:28 Go to previous messageGo to next message
Ng Oon-Ee is currently offline Ng Oon-EeFriend
Messages: 7
Registered: August 2009
Junior Member
After searching more, I added -ldl to the Makefile (before -lbfd, though technically I'm sure it should be separated into LDFLAGS or similar) and it compiled.
Re: Cannot rebuild opxml, undefined reference to dlopen [message #650426 is a reply to message #650256] Mon, 24 January 2011 19:38 Go to previous messageGo to next message
Severin Gehwolf is currently offline Severin GehwolfFriend
Messages: 40
Registered: June 2010
Member
Hi,

May I ask which Linux distribution you are using?

Thanks,
Severin
Re: Cannot rebuild opxml, undefined reference to dlopen [message #650443 is a reply to message #650426] Mon, 24 January 2011 22:35 Go to previous messageGo to next message
Ng Oon-Ee is currently offline Ng Oon-EeFriend
Messages: 7
Registered: August 2009
Junior Member
Arch Linux - 64bit
Re: Cannot rebuild opxml, undefined reference to dlopen [message #650771 is a reply to message #650443] Wed, 26 January 2011 13:32 Go to previous messageGo to next message
Severin Gehwolf is currently offline Severin GehwolfFriend
Messages: 40
Registered: June 2010
Member
Thanks for sharing! The oprofile plug-in works without a problem now? I'm interested in feedback on distributions we don't usually test our plug-ins with. Thanks, again.

--Severin
Re: Cannot rebuild opxml, undefined reference to dlopen [message #650795 is a reply to message #650771] Wed, 26 January 2011 15:33 Go to previous messageGo to next message
Ng Oon-Ee is currently offline Ng Oon-EeFriend
Messages: 7
Registered: August 2009
Junior Member
Well, due to busy-ness I haven't actually got around to USING it on my project yet, but yes it does compile fine, I can run the executable.
Re: Cannot rebuild opxml, undefined reference to dlopen [message #651030 is a reply to message #650795] Thu, 27 January 2011 14:12 Go to previous message
Severin Gehwolf is currently offline Severin GehwolfFriend
Messages: 40
Registered: June 2010
Member
OK, Thanks.
Previous Topic:Please announce lack of Linux Man Page in Helios LOUDER
Next Topic:importing files as links
Goto Forum:
  


Current Time: Tue Mar 19 02:52:59 GMT 2024

Powered by FUDForum. Page generated in 0.02123 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top