> Hi, > > I'm trying to build the FLTK 1.3.0 with --enable-shared option under Centos > 5.4 x86_64 and meet the following error. > > > === making src === > g++ -L. -L/usr/lib64 -Wl,-soname,libfltk.so.1.3 -lXext -lXft -lfontconfig > -lXinerama -lpthread -ldl -lm -lX11 -shared -fPIC -o libfltk.so.1.3 ... > /usr/bin/ld: Fl.o: relocation R_X86_64_32 against `a local symbol' can not be > used when making a shared object; recompile with -fPIC > Fl.o: could not read symbols: Bad value > collect2: ld returned 1 exit status > > Does anyone have ideas?
I suspect the problem is how the gcc 4.4 is built. For example, we have a version built with the following flags, on Centos 5 x64. $ gcc -v Using built-in specs. Target: x86_64-redhat-linux Configured with: ../gcc-4.4.2/configure --enable-languages=c,c++ --prefix=/opt/gcc44 --disable-shared --with-pic --host=x86_64-redhat-linux --build=x86_64-redhat-linux --with-gmp=/opt/gcc44 --with-mpfr=/opt/gcc44 Thread model: posix gcc version 4.4.2 (GCC) Note the "--disable-shared" flag. If gcc is built with "--disable-shared" then it can't build 64-bit shared libs unless you also add the flag "--with-pic" Run "gcc -v" on your gcc. If you are missing the "-with-pic" flag, then you'll need to either re-build gcc or use the system gcc to build FLTK shared libs. Bob _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

