LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-26-2006, 07:54 AM   #1
tatchan
LQ Newbie
 
Registered: Dec 2006
Posts: 4

Rep: Reputation: 0
Stopped due to shared library event - Failed to read a valid object file...


Hi all,
This have been my headache for a week. Did anybody ever face this?
I use Kdevelop and Eclipse to run a C++ project which uses xerces-c shared library ( an XML parser from Apache). For both IDEs, the Build is perfectly ok, but it cannot run and debug gives the errors:

in Eclipse:
....
A syntax error in expression, near `-console'.
Failed to read a valid object file image from memory.
Stopped due to shared library event
[Thread debugging using libthread_db enabled]
warning: Lowest section in /usr/lib/libicudata.so.34 is .hash at 000000b4
[New Thread -1225189680 (LWP 434]
Stopped due to shared library event
[Switching to Thread -1225189680 (LWP 434]
...

in Kdevelop:
...
(gdb) break /home/son/work_space/nicemona03/src/nicemona.cpp:41
Breakpoint 1 at 0x8078a20: file /home/son/work_space/nicemona03/src/nicemona.cpp, line 41.
(gdb) run
Failed to read a valid object file image from memory.

(gdb) backtrace
Stopped due to shared library event
#0 0xb7f0ac70 in _dl_debug_state () from /lib/ld-linux.so.2
#1 0xb7eff6f6 in dl_main () from /lib/ld-linux.so.2
....

It seems to me that the shared library ( which is xerces-c.so.27) was well recognized at the Build time but was unable to locate at run time. I already used several versions but got the same problem. Btw, I use SUSE 10.2.
 
Old 12-27-2006, 01:23 AM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
It looks like this might be a gdb (gdb 6.5) and/or kernel (2.6.18 - 2.6.20) issue:

http://www.mail-archive.com/debian-b...msg283695.html

https://launchpad.net/distros/ubuntu....20/+bug/74691

Last edited by paulsm4; 12-27-2006 at 01:24 AM.
 
Old 12-27-2006, 03:16 PM   #3
tatchan
LQ Newbie
 
Registered: Dec 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks alot for your reply.
My SUSE 10.2 has gdb version 6.5 and kernel 2.6.18 -> that may cause problem as they said.
So I've try: SUSE 10.1 with gdb 6.4 and kernel 2.6.16; SUSE 10.0 with gdb 5.5 or so, and kernel 2.6.13;
Result: the same.
I also worked around by using ar creating and using static library of xerces-c (from the *.o files which are generated from building shared library). And it still says "Stopped due to shared library event"

I'm i a desperate situation. Did anybody ever use xerces-c in SUSE???
 
Old 01-16-2007, 02:13 PM   #4
allelopath
Member
 
Registered: Jan 2003
Location: New Mexico
Distribution: SuSE 9.2 Professional, OpenSuSE 10.1 64 bit, Open SuSE 10.2, Debian Etch
Posts: 535

Rep: Reputation: 30
Any luck in fixing this?

I am having a similar problem with Eclipse/photran in Debian Etch, which came with kernel 2.6.18-3-686 and gdb 6.4.90.dsfg-1
When I debug, it says this:

No symbol "new" in current context.
No source file named mainsw.f.
Failed to read a valid object file image from memory.
Stopped due to shared library event
No source file named mainsw.f.
Stopped due to shared library event

but then sometimes it runs, but doesn't stop at my breakpoints.
mainsw.f is the source file with the PROGRAM statement.

Doing an 'ldd <my-executable> shows this:
linux-gate.so.1 => (0xffffe000)
libimf.so => /opt/intel/fc/9.0/lib/libimf.so (0xb7db1000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7d79000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7c48000)
/lib/ld-linux.so.2 (0xb7f90000)

The last entry in the bug at the launchpad.net link provided by paulsm4 indicates that kernel 2.6.20 fixes the problem.

Last edited by allelopath; 01-16-2007 at 02:30 PM.
 
  


Reply


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
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 06:47 AM
unable to step through function in shared object library using gdb markhod Programming 2 01-03-2009 03:00 AM
Shared object library that uses another shared object library Nightfox Programming 1 02-15-2006 11:00 PM
error while loading shared libraries: libdb-4.1.so: cannot open shared object file putquery8581 Linux - Software 1 10-01-2004 08:03 AM
shared object library won't load (libstdc++) sleepylight Linux - General 4 04-27-2004 05:24 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration