The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
Can't locate object method "fetchrow_array" Error rawat_me01 Shell Programming and Scripting 1 06-03-2009 10:07 AM
bash: "undefined variable" and pipe nagaidhlig Shell Programming and Scripting 6 02-18-2008 10:47 AM
Getting error "Undefined symbol: .u_strlen_2_6" nachiketv AIX 0 06-05-2006 09:16 AM
dbx error ("Executable contains object file compiled on ...") Sabari Nath S High Level Programming 0 08-04-2005 05:03 PM
Error : "No data written to object that was write locked" nileshkarania UNIX for Dummies Questions & Answers 1 06-07-2003 11:29 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-24-2006
marcus121 marcus121 is offline
Registered User
  
 

Join Date: Apr 2006
Location: Massachusetts
Posts: 34
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
  #2 (permalink)  
Old 04-24-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
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.
  #3 (permalink)  
Old 04-24-2006
marcus121 marcus121 is offline
Registered User
  
 

Join Date: Apr 2006
Location: Massachusetts
Posts: 34
gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)
  #4 (permalink)  
Old 04-24-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
Unless you've complex a complex list of objects and have something out of order -
I give up.
  #5 (permalink)  
Old 04-24-2006
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
Read the linux fstat manpage. Note the required includes. Add in the required includes that you're missing. Try it again.
  #6 (permalink)  
Old 04-24-2006
marcus121 marcus121 is offline
Registered User
  
 

Join Date: Apr 2006
Location: Massachusetts
Posts: 34
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
Closed Thread

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:56 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0