PDA

View Full Version : Error when compiling with x86-64



atm
28th July 2006, 16:32
Hi all,

I am trying to compile QT on RHEL 4. I could not find any QT 4 RPMS, so I decided to just compile it.

I get the following error:

g++ -m64 -Wl,-rpath,/usr/local/Trolltech/Qt-4.1.4/lib -Wl,-rpath,/usr/local/Trolltech/Qt-4.1.4/lib -shared -Wl,-soname,libQtOpenGL_debug.so.4 -o libQtOpenGL_debug.so.4.1.4 .obj/debug-shared/qgl.o .obj/debug-shared/qglcolormap.o .obj/debug-shared/qpaintengine_opengl.o .obj/debug-shared/qglpixelbuffer.o .obj/debug-shared/qgl_x11.o .obj/debug-shared/qglpixelbuffer_x11.o .obj/debug-shared/moc_qgl.o-L/home/andrew/qt-x11-opensource-src-4.1.4/lib -L/usr/X11R6/lib64 -lGLU -lGL -lXi -lXrender -lXrandr -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lm -lQtGui_debug -lQtCore_debug -lpthread -ldl

/usr/bin/ld: /usr/X11R6/lib64/libGL.a(glapi.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/X11R6/lib64/libGL.a: could not read symbols: Bad value

What is the solution to fix the compile error? Or are there easy RPMs I can download?

Thank you,

-ATM

jacek
28th July 2006, 16:43
/usr/bin/ld: /usr/X11R6/lib64/libGL.a(glapi.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/X11R6/lib64/libGL.a: could not read symbols: Bad value
It looks like linker doesn't like that libGL is a static library. Do you have its shared equivalent?

atm
28th July 2006, 17:41
Ah yes, I browsed around the library folders and found that the /usr/X11R6/lib64/libGL.so was a broken symlink. Fixed the symlink and it works.

Thanks!