Results 1 to 3 of 3

Thread: Error when compiling with x86-64

  1. #1
    Join Date
    Jan 2006
    Location
    USA
    Posts
    6
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Question Error when compiling with x86-64

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Error when compiling with x86-64

    Quote Originally Posted by atm
    /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?

  3. The following user says thank you to jacek for this useful post:

    atm (28th July 2006)

  4. #3
    Join Date
    Jan 2006
    Location
    USA
    Posts
    6
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Error when compiling with x86-64

    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!

Similar Threads

  1. Replies: 7
    Last Post: 1st August 2006, 21:15
  2. Compiling custom Qt3 Widgets Gives warning in VC++6 Compiler
    By sunil.thaha in forum Qt Programming
    Replies: 4
    Last Post: 9th June 2006, 12:44
  3. Replies: 10
    Last Post: 28th April 2006, 15:48
  4. qmake_image_collection.cpp gives me a compiling error
    By vfernandez in forum Qt Programming
    Replies: 2
    Last Post: 31st January 2006, 01:42
  5. compiling a qt project under win32
    By elcuco in forum Qt Programming
    Replies: 2
    Last Post: 19th January 2006, 07:43

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.