Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-07

Cross-compiling without target libs

7 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Henry Vermaak
to Kjow

2010/7/18 Kjow :

Hi all, Is it possible to cross compile for arm without having target libs?

Have you tried passing the --allow-shlib-undefined option to the linker?

Henry

Reply by email

Kjow
to Henry Vermaak

2010/7/18 Henry Vermaak :

Have you tried passing the --allow-shlib-undefined option to the linker? Henry

Thank you,

it partially worked. I had some errors with some target libs, so adding --allow-shlib-undefined to arm-linux-ld options, all worked (the other option is -L/path/to/target/libs).
If I use --allow-shlib-undefined only, I get linking errors (e.g. /home/kjow/lazarus/fpc/binutils/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread )

Is it possible without all target libs?

Regards,
Kjow

Reply by email

Henry Vermaak
to Kjow
Kjow wrote 15 lines
2010/7/18 Henry Vermaak : > Have you tried passing the --allow-shlib-undefined option to the linker? > > Henry Thank you, it partially worked. I had some errors with some target libs, so adding --allow-shlib-undefined to arm-linux-ld options, all worked (the other option is -L/path/to/target/libs). If I use --allow-shlib-undefined only, I get linking errors (e.g. /home/kjow/lazarus/fpc/binutils/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread ) Is it possible without all target libs?

I don't know. You'll have to remove the -lxxxxx options from the linker, otherwise it will try and find the libraries. This is obviously not very safe (plain dangerous, really). Why don't you just copy all the libs from the target device onto your build machine?

Henry

Reply by email

Kjow
to Henry Vermaak

2010/7/19 Henry Vermaak :

Show quoted text 6 lines
I don't know. ?You'll have to remove the -lxxxxx options from the linker, otherwise it will try and find the libraries. ?This is obviously not very safe (plain dangerous, really). ?Why don't you just copy all the libs from the target device onto your build machine? Henry

It can't link without -Lxxxxx option, so I need both -Lxxxxx and --allow-shlib-undefined options
I'm already using tha target libs grabbed from device, but (I don't know why) these have stopped to work with the linker (there were a lot of reference errors with the same lazarus revision and the same target libs I had from time ago).

Now, with both options ( -Lxxxxx and --allow-shlib-undefined ) it works.

If it were possible to link without target libs, it would be very nice (no problems, with grabbing, copying, etc.)

Regards,
Kjow

Reply by email