This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
--- Khem Raj <khem@mvista.com> wrote: > EJS wrote: > > Hi all, > > > > I am not sure that this is a cross compiling > issue, > > but if it isn't hopefully someone can point me in > the > > right direction. > > > > I have an application that I am trying to cross > > compile, source: i686-cygwin > > target:i686-unknown-linux. > > BINUTILS_DIR=binutils-2.15 > > GCC_DIR=gcc-3.4.4 > > GLIBC_DIR=glibc-2.3.5 > > LINUX_DIR=linux-2.6.8 > > > LINUX_SANITIZED_HEADER_DIR=linux-libc-headers-2.6.11. > > GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.3.5 > > > > The problem that I am having is that ld does not > seem > > to find some of the X11 libs that it should. > > When I execute this: > > g++ -o mythbrowser main.o webpage.o tabview.o > > moc_webpage.o moc_tabview.o > -L/usr/lib/qt-3.3/lib > > > -L/opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-unknown-linux-gnu/i686-unknown-linux-gnu/usr/X11R6/lib > > > -L/opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-unknown-linux-gnu/i686-unknown-linux-gnu/usr/lib > > -lmyth-0.18.1 -L/opt/kde3/lib -lkhtml -lqt-mt > -lXext > > -lX11 -lm > > > > I get a bunch of warnings that look like this: > > > /opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-unknown-linux-gnu/lib/gcc/i686-unknown-linux-gnu/3.4.4/../../../../i686-unknown-linux-gnu/bin/ld: > > warning: libXrender.so.1, needed by > > > /opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-unknown-linux-gnu/i686-unknown-linux-gnu/usr/lib/libmyth-0.18.1.so, > > not found (try using -rpath or -rpath-link) > > > > Which eventually turn into errors. > > The problem is that libXrender.so.1 definitely > exists > > in one of the library paths specified: > > > > ls -l > > > /opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-unknown-linux-gnu/i686-unknown-linux-gnu/usr/X11R6/lib/libXrender* > > -rw-r--r-- 1 mythtv mkgroup-l-d 38144 Jan 29 > 21:54 > > libXrender.a > > lrwxrwxrwx 1 mythtv mkgroup-l-d 19 Jan 29 > 21:54 > > libXrender.so -> libXrender.so.1.2.2 > > lrwxrwxrwx 1 mythtv mkgroup-l-d 19 Jan 29 > 21:54 > > libXrender.so.1 -> libXrender.so.1.2.2 > > -rwxr-xr-x 1 mythtv mkgroup-l-d 29636 Jan 29 > 21:54 > > libXrender.so.1.2.2 > > > > I tried addding -rpath and/or -rpath-link to the > > compile but the results were the same (ie the lib > is > > not found). > > > > I was able to resolve the problem for one library > by > > adding it the compile string explictly e.g.: > > g++ -o mythbrowser main.o webpage.o tabview.o > > moc_webpage.o moc_tabview.o > -L/usr/lib/qt-3.3/lib > > > -L/opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-unknown-linux-gnu/i686-unknown-linux-gnu/usr/X11R6/lib > > > -L/opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-unknown-linux-gnu/i686-unknown-linux-gnu/usr/lib > > -lmyth-0.18.1 -L/opt/kde3/lib -lkhtml -lqt-mt > -lXext > > -lX11 -lm -lXrender > > > > but this is really not a workable strategy because > > there are so many X11 libs. > > > > Any ideas. > > > > Thanks, > > J > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > protection around > > http://mail.yahoo.com > > > > ------ > > Want more information? See the CrossGCC FAQ, > http://www.objsw.com/CrossGCC/ > > Want to unsubscribe? Send a note to > crossgcc-unsubscribe@sourceware.org > > > > > I think -rpath <DIR> is best way to go it should > work if it does not > alternatively you can use LD_RUN_PATH and > LD_LIBRARY_PATH environment > variables. > btw. what does the DT_NEEDED entries show for > libmyth-0.18.1.so > > -- > Khem Raj <khem@mvista.com> > MontaVista Software, Inc. > www.mvista.com > Khem, Thanks for your response. I should have mentioned that I had already tried setting LD_LIBRARY_PATH, LD_RUN_PATH, -rpath, and -rpath-link. None of these things had any different affect. ld still cannot seem to find the libraries. I dont know exactly the right way to get the DT_NEEDED libs for the file (especially as I dont have a cross-compiled ldd). I ran: $ objdump.exe -x libmyth-0.18.1.so |grep NEEDED NEEDED liblirc_client.so.0 NEEDED libfreetype.so.6 NEEDED libmp3lame.so.0 NEEDED libasound.so.2 NEEDED libraw1394.so.8 NEEDED libiec61883.so.0 NEEDED libavc1394.so.0 NEEDED libXinerama.so.1 NEEDED libXv.so.1 NEEDED libXxf86vm.so.1 NEEDED libqt-mt.so.3 NEEDED libXext.so.6 NEEDED libX11.so.6 NEEDED libXrender.so.1 NEEDED libXrandr.so.2 NEEDED libXcursor.so.1 NEEDED libXft.so.2 NEEDED libSM.so.6 NEEDED libICE.so.6 NEEDED libpthread.so.0 NEEDED libstdc++.so.6 NEEDED libm.so.6 NEEDED libgcc_s.so.1 NEEDED libc.so.6 I assume this is what you were looking for. Thanks again, J __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.org
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |