LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 06-18-2011, 02:12 PM   #1
hDUQUE
Member
 
Registered: Jan 2007
Posts: 76

Rep: Reputation: 15
relocation R_386_GOTOFF against undefined symbol


hello guys,
i am getting this error when compiling:

Code:
/usr/bin/ld: .libs/completeGroupProcess.o: relocation R_386_GOTOFF against undefined symbol `sqlite_callback(void*, int, char**, char**)' can not be used when making a shared object
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libLoadData.la] Error 1

i have fc14, g++


Code:
g++ --version
g++ (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
i googled and found a solved bug:

http://bugs.gentoo.org/258072


but really, it is not clear (for me) what to do :-(

does any one of you guys knows whats going on ?

thanks in advance,

hector
 
Old 06-19-2011, 06:47 PM   #2
hDUQUE
Member
 
Registered: Jan 2007
Posts: 76

Original Poster
Rep: Reputation: 15
i have updated gclibs, c++, binutils, and the error is still happening ...
any ideas guys ? ... what to update ??
regards
hector
 
Old 06-19-2011, 08:30 PM   #3
hDUQUE
Member
 
Registered: Jan 2007
Posts: 76

Original Poster
Rep: Reputation: 15
i use these flags for compiling:

LDFLAGS = -Wl, -rpath, $(libdir), -g, -Xlinker, -zmuldefs

i also have tried -fPIC

comments are wellcome,,,
 
Old 06-19-2011, 08:52 PM   #4
hDUQUE
Member
 
Registered: Jan 2007
Posts: 76

Original Poster
Rep: Reputation: 15
i am trying to use sqlite3 api, which is a pure C library, included from a c++ appl.

in fact, a call like this:

rc = sqlite3_exec(db, "insert... ", sqlite_callback, 0, zErrMsg);

tries to use a callback like this:

static int sqlite_callback(void *NotUsed, int argc, char **argv, char **azColName)


i have found out that when avoiding the keyword "static", the reported error disapears ... i mean:

int sqlite_callback(void *NotUsed, int argc, char **argv, char **azColName)

i am not sure, yet, if it will works.

does somebody knows whats going on ?

must i move this thread to another forum ?
howto ?
 
Old 06-21-2011, 04:41 PM   #5
hDUQUE
Member
 
Registered: Jan 2007
Posts: 76

Original Poster
Rep: Reputation: 15
avoid static ...
 
  


Reply



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
relocation error: mount: undefined symbol: blkid_known_fstype sybabe Linux - Newbie 1 08-29-2009 11:56 PM
snmpd: relocation error snmpd:undefined symbol: lastAddrAge Strike2000 Slackware 0 02-11-2008 04:45 AM
relocation error in libgdk-1.2.so.0. Undefined symbol: g_source_add big_manel Linux - Software 1 02-13-2006 08:06 PM
dcgui-qt: relocation error: /usr/lib/libqt-mt.so.3: undefined symbol: glXGetConfig akqw Linux - Software 0 10-05-2003 10:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 05:01 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration