This is the mail archive of the
crossgcc@sourceware.org
mailing list for the crossgcc project.
See the CrossGCC FAQ for lots
more information.
cross compiler disrupting xlib and gl links..
- From: Keith Kyzivat <kkyzivat at physiometrix dot com>
- To: crossgcc at sourceware dot org
- Date: Mon, 09 Jan 2006 23:08:45 -0500
- Subject: cross compiler disrupting xlib and gl links..
Ok, this started me off on this whole tangent of canadian crossing.
My problem:
when I use a native toolchain + pre-built qt 3.3.5 to compile and link a
simple x11 app, things work fine.
when I use a cross-compiled toolchain (same host & target as native
toolchain) + the same pre-built qt 3.3.5 to compile and link a simple
x11 app, I get quite a few undefined references to X11 symbols
(primarily openGL).
Output seems to indicate it can't find libGL.so.1, and others, but a
verification of the directory indicates that all the files are there,
and symlinks are correct.
build platform is i686 in this case (will be x86_64 later once I can
nail this down), with host and target also i686.
All the libraries are there for it to link to, specified with -L, but
alas it just doesn't seem to get it.
Is this an issue of magic gnu things happening if a compiler is native
and not cross-compiled?
eventual compile and link lines:
i686-unknown-linux-gnu-g++ -c -pipe -Wall -W -O2 -DQT_NO_DEBUG
-DQT_SHARED -DQT_THREAD_SUPPORT
-I/data/PSA5000/qt-builds/qt-x11/mkspecs/test-xlibcopy -I.
-I/data/PSA5000/qt-builds/qt-x11/include -I/usr/X11R6/include -o main.o
main.cpp
i686-unknown-linux-gnu-g++ -Wl,-rpath,/data/PSA5000/qt-builds/qt-x11/lib
-o helloworld-i18n-simple main.o -L/data/PSA5000/qt-builds/qt-x11/lib
-L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm
g++ output from link:
/home/kkyzivat/gcc-3.3.6-glibc-2.3.5/i686-unknown-linux-gnu/bin/../lib/gcc-lib/i686-unknown-linux-gnu/3.3.6/../../../../i686-unknown-linux-gnu/bin/ld:
warning: libGL.so.1, needed by
/data/PSA5000/qt-builds/qt-x11/lib/libqt-mt.so, not found (try using
-rpath or -rpath-link)
/home/kkyzivat/gcc-3.3.6-glibc-2.3.5/i686-unknown-linux-gnu/bin/../lib/gcc-lib/i686-unknown-linux-gnu/3.3.6/../../../../i686-unknown-linux-gnu/bin/ld:
warning: libXmu.so.6, needed by
/data/PSA5000/qt-builds/qt-x11/lib/libqt-mt.so, not found (try using
-rpath or -rpath-link)
/home/kkyzivat/gcc-3.3.6-glibc-2.3.5/i686-unknown-linux-gnu/bin/../lib/gcc-lib/i686-unknown-linux-gnu/3.3.6/../../../../i686-unknown-linux-gnu/bin/ld:
warning: libXrender.so.1, needed by
/data/PSA5000/qt-builds/qt-x11/lib/libqt-mt.so, not found (try using
-rpath or -rpath-link)
/home/kkyzivat/gcc-3.3.6-glibc-2.3.5/i686-unknown-linux-gnu/bin/../lib/gcc-lib/i686-unknown-linux-gnu/3.3.6/../../../../i686-unknown-linux-gnu/bin/ld:
warning: libXrandr.so.2, needed by
/data/PSA5000/qt-builds/qt-x11/lib/libqt-mt.so, not found (try using
-rpath or -rpath-link)
/home/kkyzivat/gcc-3.3.6-glibc-2.3.5/i686-unknown-linux-gnu/bin/../lib/gcc-lib/i686-unknown-linux-gnu/3.3.6/../../../../i686-unknown-linux-gnu/bin/ld:
warning: libXcursor.so.1, needed by
/data/PSA5000/qt-builds/qt-x11/lib/libqt-mt.so, not found (try using
-rpath or -rpath-link)
/home/kkyzivat/gcc-3.3.6-glibc-2.3.5/i686-unknown-linux-gnu/bin/../lib/gcc-lib/i686-unknown-linux-gnu/3.3.6/../../../../i686-unknown-linux-gnu/bin/ld:
warning: libXinerama.so.1, needed by
/data/PSA5000/qt-builds/qt-x11/lib/libqt-mt.so, not found (try using
-rpath or -rpath-link)
/home/kkyzivat/gcc-3.3.6-glibc-2.3.5/i686-unknown-linux-gnu/bin/../lib/gcc-lib/i686-unknown-linux-gnu/3.3.6/../../../../i686-unknown-linux-gnu/bin/ld:
warning: libXft.so.2, needed by
/data/PSA5000/qt-builds/qt-x11/lib/libqt-mt.so, not found (try using
-rpath or -rpath-link)
/home/kkyzivat/gcc-3.3.6-glibc-2.3.5/i686-unknown-linux-gnu/bin/../lib/gcc-lib/i686-unknown-linux-gnu/3.3.6/../../../../i686-unknown-linux-gnu/bin/ld:
warning: libfreetype.so.6, needed by
/data/PSA5000/qt-builds/qt-x11/lib/libqt-mt.so, not found (try using
-rpath or -rpath-link)
/home/kkyzivat/gcc-3.3.6-glibc-2.3.5/i686-unknown-linux-gnu/bin/../lib/gcc-lib/i686-unknown-linux-gnu/3.3.6/../../../../i686-unknown-linux-gnu/bin/ld:
warning: libfontconfig.so.1, needed by
/data/PSA5000/qt-builds/qt-x11/lib/libqt-mt.so, not found (try using
-rpath or -rpath-link)
/home/kkyzivat/gcc-3.3.6-glibc-2.3.5/i686-unknown-linux-gnu/bin/../lib/gcc-lib/i686-unknown-linux-gnu/3.3.6/../../../../i686-unknown-linux-gnu/bin/ld:
warning: libSM.so.6, needed by
/data/PSA5000/qt-builds/qt-x11/lib/libqt-mt.so, not found (try using
-rpath or -rpath-link)
/home/kkyzivat/gcc-3.3.6-glibc-2.3.5/i686-unknown-linux-gnu/bin/../lib/gcc-lib/i686-unknown-linux-gnu/3.3.6/../../../../i686-unknown-linux-gnu/bin/ld:
warning: libICE.so.6, needed by
/data/PSA5000/qt-builds/qt-x11/lib/libqt-mt.so, not found (try using
-rpath or -rpath-link)
/data/PSA5000/qt-builds/qt-x11/lib/libqt-mt.so: undefined reference to
`glXQueryServerString'
[... - chopped out repetitive stuff -- ]
`glColor3ub' `FT_Realloc' `glIndexi' `XftGlyphExtents' `glPixelStorei'
`XftCharIndex' `FcPatternAddInteger' `glBitmap' `SmcSaveYourselfDone'
`XftDrawSetClip' `XftDrawSetClipRectangles' `glPopAttrib' `glReadPixels'
`FT_Stream_GetShort' `FcPatternAddBool' `FcPatternGetBool' `XftInit'
`FT_Load_Glyph' `IceConnectionNumber' `SmcDeleteProperties'
`XRenderQueryExtension' `FT_Render_Glyph' `glXUseXFont' `glFlush'
`FcPatternDuplicate' `glListBase' `FT_Get_Char_Index' `FcCharSetHasChar'
`FT_Stream_ExitFrame' `glXQueryExtension' `FT_Set_Charmap'
`FT_Stream_GetLong' `FcPatternAddWeak' `FT_Stream_Seek'
`FcPatternGetDouble' `XftDrawGlyphs' `FcMatrixScale' `FcCharSetAddChar'
`XcursorLibraryLoadCursor' `IceProcessMessages' `XftDrawDestroy'
`glMatrixMode' `XftDrawCreateBitmap' `FcMatrixMultiply' `glNewList'
`FcPatternGetString' `XineramaIsActive' `XineramaQueryScreens'
`glViewport' `glXDestroyGLXPixmap' `FcPatternGetInteger' `FcFontSort'
`glDrawBuffer' `glXMakeCurrent' `XRenderComposite'
`glXQueryExtensionsString' `XRenderFindVisualFormat'
`XftDrawSetSubwindowMode' `FcPatternGetCharSet' `FcPatternCreate'
`XRRRootToScreen' `FcPatternAddString' `FcPatternDel' `glGetFloatv'
`FcPatternAddMatrix' `FcPatternAddDouble' `glRasterPos2i'
`glXChooseVisual' `XRRQueryExtension' `XftDrawCreateAlpha'
`XftListFonts' `SmcRequestSaveYourselfPhase2' `FcConfigSubstitute'
`FcPatternDestroy' `glGetIntegerv' `FcCharSetCount'
`FT_Stream_EnterFrame' `glPushAttrib' `glCallLists' `glXDestroyContext'
`glLoadIdentity' `glPopMatrix' `SmcInteractDone' `SmcCloseConnection'
`glXWaitX' `FcPatternAddCharSet' `glOrtho' `SmcSetProperties'
`glClearColor' `glRasterPos3d' `FT_Free' `glClearIndex'
`XftFontOpenPattern' `glEndList' `glXGetClientString' `XftLockFace'
`XRenderChangePicture' `glPushMatrix' `XineramaQueryExtension'
`XftDrawCreate' `FcPatternGetMatrix' `XmuLookupStandardColormap'
`FcCharSetCreate' `XftUnlockFace' `SmcOpenConnection' `FcMatrixShear'
`XRRSelectInput' `SmcInteractRequest' `XftInitFtLibrary' `glXIsDirect'
`glXSwapBuffers' `glXCreateContext' `XRRUpdateConfiguration'
`glXGetConfig' `XftFontMatch' `FT_Stream_Pos' `XftCharExists'
`XftFontClose' `FT_Alloc' `FcCharSetDestroy' `SmcGetIceConnection'
`FcFontSetDestroy' `glXCreateGLXPixmap'
[... -- ]
/data/PSA5000/qt-builds/qt-x11/lib/libqt-mt.so: undefined reference to
`XftDrawPicture'
collect2: ld returned 1 exit status
gmake: *** [helloworld-i18n-simple] Error 1
custom qt makespec - important (changed/added) lines for those
interested (modelled after linux-g++ mkspec):
PQMAKE_TCHAIN_PREFIX = i686-unknown-linux-gnu-
#PQMAKE_X11DIR =
/data/PSA5000/qt-builds/X11-libs-includes/i386-linux-XFree-4.3.0.1
PQMAKE_X11DIR = /usr/X11R6
QMAKE_CC = $${PQMAKE_TCHAIN_PREFIX}gcc
QMAKE_CXX = $${PQMAKE_TCHAIN_PREFIX}g++
QMAKE_INCDIR_X11 = $${PQMAKE_X11DIR}/include
QMAKE_LIBDIR_X11 = $${PQMAKE_X11DIR}/lib
MAKE_INCDIR_OPENGL = $${PQMAKE_X11DIR}/include
QMAKE_LIBDIR_OPENGL = $${PQMAKE_X11DIR}/lib
QMAKE_LINK = $${PQMAKE_TCHAIN_PREFIX}g++
QMAKE_LINK_SHLIB = $${PQMAKE_TCHAIN_PREFIX}g++
QMAKE_AR = $${PQMAKE_TCHAIN_PREFIX}ar cqs
QMAKE_STRIP = $${PQMAKE_TCHAIN_PREFIX}strip
~Keith Kyzivat
Embedded Linux Software Engineer
Hospira
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature