1

I am trying to build FreeType for GD module of PHP. Well, I was able to built it successfully for 32 bit centos but i am getting an error on x86_64.

Freetype :

LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include" ./configure --prefix=/usr/local/ --enable-shared && make && make install

Bzip :

make && make install PREFIX=/usr/local

Error while compiling freetype:

/usr/bin/ld: /usr/local/lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC

/usr/local/lib/libbz2.a: could not read symbols: Bad value collect2: ld returned 1 exit status

make: * [/setups/freetype-2.4.10/objs/libfreetype.la] Error 1

Jigar
  • 3,256
  • 1
  • 30
  • 51

1 Answers1

1

I was able to solve this by re-compiling bzip with -fPIC. I Edited Makefile. Changed the line CC=gcc to CC=gcc -fPIC

Jigar
  • 3,256
  • 1
  • 30
  • 51