The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
bash: "undefined variable" and pipe nagaidhlig Shell Programming and Scripting 6 02-18-2008 06:47 AM
Can't locate object method "fetchrow_array" Error rawat_me01 Shell Programming and Scripting 0 05-23-2007 04:14 AM
Getting error "Undefined symbol: .u_strlen_2_6" nachiketv AIX 0 06-05-2006 06:16 AM
dbx error ("Executable contains object file compiled on ...") Sabari Nath S High Level Programming 0 08-04-2005 02:03 PM
Error : "No data written to object that was write locked" nileshkarania UNIX for Dummies Questions & Answers 1 06-07-2003 08:29 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-24-2006
Registered User
 

Join Date: Apr 2006
Location: Massachusetts
Posts: 9
Stumble this Post!
Exclamation shared object "undefined symbol: fstat" error

Didn't have this problem in AIX, but ported to Linux with GCC compiler and am now getting a runtime error:
tssutil: symbol lookup error: /work/agility/devel/bin/libagam.so: undefined symbol: fstat
I'm sure most of you know that fstat is an intrinsic function just like printf, memcpy, etc. When I do an "objdump -T" of the shared object, all the other intrinsic functions show "GLIBC_2.2.5" in the Dynamic Symbol Table, but fstat does not. Anyone know how to get past this problem? (I wanted to use fstat to get file size, so have a HORRIBLE workaround of seeking to SEEK_END to get the file size. I'd really rather do this right.) There must be a way to explicitly tell the linker or dynamic loader where to find the fstat object.
HELP! Any help would be appreciated. Muchas gracias.
~Marcus
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-24-2006
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 3,849
Stumble this Post!
Sometimes symbol lookup is deferred for various reasons.. I'm assuming you're compiling libagam.so

What version of gcc? The very latest version, 4.0.2, has problems.
Reply With Quote
  #3 (permalink)  
Old 04-24-2006
Registered User
 

Join Date: Apr 2006
Location: Massachusetts
Posts: 9
Stumble this Post!
gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)
Reply With Quote
  #4 (permalink)  
Old 04-24-2006
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 3,849
Stumble this Post!
Unless you've complex a complex list of objects and have something out of order -
I give up.
Reply With Quote
  #5 (permalink)  
Old 04-24-2006
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,449
Stumble this Post!
Read the linux fstat manpage. Note the required includes. Add in the required includes that you're missing. Try it again.
Reply With Quote
  #6 (permalink)  
Old 04-24-2006
Registered User
 

Join Date: Apr 2006
Location: Massachusetts
Posts: 9
Stumble this Post!
Unhappy #includes didn't make a difference

That's just preprocessing directives anyway. Good for prototyping and for the stat structure definition, etc., and could cause problems on compile if wrong headers were not included, but it does not affect linkage. Thanks for trying though. ~Marcus
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
linux

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:50 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0