0

I migrated to 64-bit Ubuntu, and now I can't compile my extension. On 32-bit it works just fine. Someone know what is a problem? Thank you. I've got this error report.

        $ make
        g++ -shared -o extension.so main.o -lphpcpp -lpqxx -lpq -fPIC
        /usr/bin/ld: //usr/local/lib/libpqxx.a(connection_base.o): 
relocation R_X86_64_32 against `_ZN4pqxx17broken_connectionD1Ev'
    can not be used when making a shared object; recompile with -fPIC
        //usr/local/lib/libpqxx.a: error adding symbols: Bad value
        collect2: error: ld returned 1 exit status
        make: *** [extension.so] Error 1
Aldos
  • 193
  • 2
  • 12
  • I solved it on my own. http://jaytaylor.com/blog/2010/10/06/howto-fix-fpic-errors/ – Aldos Sep 09 '14 at 11:17
  • You could mention the solution and the link in the answer. But the commented link is not working. – Amol M Kulkarni May 12 '15 at 06:16
  • Sorry man, link worked but times they are changing, and now i'm no longer using PHP-CPP framework. But if someone have same problem, i mean recompile libpqxx with -fPIC was solution. – Aldos May 22 '15 at 10:49

0 Answers0