[Mono-dev] libtool problem cross compiling

GrahamNewton graham.newton at peavey-eu.com
Mon Sep 22 04:00:18 EDT 2008

Thanks for that Casey very useful and has solved my problem.
I looked in my .la file and found this:
so all I had to do was define CROSS_COMPILE_PREFIX
Easy once you know how!
Thanks again.

casey.s.marshall wrote:
> On Fri, Sep 19, 2008 at 8:57 AM, GrahamNewton
> <graham.newton at peavey-eu.com> wrote:
>> Hello
>> I am trying to cross compile mono onto another x86 linux distribution and
>> I
>> am having a problem with libtool inserting wrong library paths.  An
>> example
>> is in mono/metadata where libtool converts the command line
>> /bin/sh ../../libtool --tag=CC   --mode=link 586-gcc  -g -O2
>> -fno-strict-aliasing -Wdeclaration-after-statement -g -Wall -Wunused
>> -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
>> -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual
>> -Wcast-align -Wwrite-strings -mno-tls-direct-seg-refs   -o pedump
>> pedump.o
>> libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
>> ../../libgc/libmonogc.la -pthread
>> -L/opt/montavista/pro/devkit/x86/586/target/usr/lib -lgthread-2.0
>> -lglib-2.0
>> -lm -ldl -lpthread -lm
>> to
>> 586-gcc -g -O2 -fno-strict-aliasing -Wdeclaration-after-statement -g
>> -Wall
>> -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
>> -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual
>> -Wcast-align -Wwrite-strings -mno-tls-direct-seg-refs -o pedump pedump.o
>> -pthread  ./.libs/libmonoruntime.a ../io-layer/.libs/libwapi.a
>> ../utils/.libs/libmonoutils.a ../../libgc/.libs/libmonogc.a
>> -L/opt/montavista/pro/devkit/x86/586/target/usr/lib
>> /usr/lib/libgthread-2.0.so /usr/lib/libglib-2.0.so -ldl -lpthread -lm
>> note the /usr/lib in front of libglib2.0 and libgthread-2.0 . The problem
>> is
>> something to do with the .0 extension to the lib filenamesas the other
>> lib
>> filenames have been handled correctly.
>> I am currently using libtool version 1.5.24 (1.1220.2.455 2007/06/24
>> 02:13:29) on openSUSE 10.
>> Does anyone know of any solutions to this problem or of a libtool version
>> that they know works.
> It's probably the libtool library files (the .la files) for your
> cross-compiled gthread and glib: they were probably configured to live
> in /usr, and so the .la file says that the .so is in /usr/lib, which
> is wrong when you're staging the files.
> This http://metastatic.org/text/libtool.html is an explanation of
> issues like this, and offers some workarounds.
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list

View this message in context: http://www.nabble.com/libtool-problem-cross-compiling-tp19574987p19603372.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

More information about the Mono-devel-list mailing list