[unixODBC-support] Library (.so) using unixODBC built with -fPIC crashes at execute.c (line 138)

Nick Gorham nick.gorham at easysoft.com
Mon Nov 29 13:44:14 GMT 2004

Tony Lewis wrote:

> Library (.so) using unixODBC built with -fPIC crashes at execute.c 
> (line 138):
> I am trying to build a .so that uses unixODBC and I can get it to work 
> on our 32 bit machines.  However my 64 bit machine (x86_64) demands 
> that I use the option -fPIC otherwise I get the error:
> relocation R_X86_64_32 can not be used when making a shared object; 
> recompile with -fPIC
> Whenever I compile with -fPIC (on 32 bit or 64 bit), the code crashes 
> at execute.c, line 138.  That line of code is:
> if ( CC_is_readonly(self->hdbc) && STMT_UPDATE(self)) {

When you first configured, what compiler options did it find, I would 
have expected/hoped that it added -fPIC anyway ?

When you changed to add -fPIC, did you do it with a clean set of code, 
just how did you add the -fPIC ?

I am not sure for x86_64, but to compile on 64bit solaris using sun's 
compiler there are a few extra flags to add as well.


More information about the unixODBC-support mailing list