List:MySQL++« Previous MessageNext Message »
From:Adrian Cornish Date:October 14 2011 2:43pm
Subject:[PATCH] for 'can not be used when making a shared object; recompile
with -fPIC' error
View as plain text  
Warren,

I think I put flag in correct place.

This is to fix compile issue with 2696 on Fedora with gcc 4.6.1-9

usr/bin/ld: mysqlpp_cmdline.o: relocation R_X86_64_32 against
`.rodata.str1.1' can not be used when making a shared object;
recompile with -fPIC
mysqlpp_cmdline.o: could not read symbols: Bad value


Adrian

Index: mysql++.bkl
===================================================================
--- mysql++.bkl (revision 2696)
+++ mysql++.bkl (working copy)
@@ -129,7 +129,7 @@
         <depends>lib/ssqls.h</depends>
         <depends>lib/querydef.h</depends>

-        <cxxflags>@PTHREAD_CFLAGS@</cxxflags>
+        <cxxflags>@PTHREAD_CFLAGS@ -fPIC</cxxflags>
         <include>.</include>
         <ldflags>-l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@
@MYSQLPP_EXTRA_LIBS@</ldflags>
       </if>
Thread
[PATCH] for 'can not be used when making a shared object; recompilewith -fPIC' errorAdrian Cornish14 Oct
  • Re: [PATCH] for 'can not be used when making a shared object; recompilewith -fPIC' errorWarren Young16 Oct
    • Re: [PATCH] for 'can not be used when making a shared object;recompile with -fPIC' errorAdrian Cornish18 Oct
      • Re: [PATCH] for 'can not be used when making a shared object; recompile with -fPIC' errorWarren Young27 Oct