Forum > Linux PDAs

FPC/Lazarus on Linux/386, cross compiling for Linux/ARM (Raspberry)

(1/1)

soitjes:
Hello,

I'm trying to set up a FPC/Lazarus environment on Ubuntu so that I can cross compile for the raspberry.  It's based on this wiki article : http://wiki.lazarus.freepascal.org/Setup_Cross_Compile_For_ARM, although I used the most recent versions of the packages.

 I got pretty far in the procedure, but when building the lazarus environment for Linux/Arm I get this message :

Compiling resource /home/soitjes/.lazarus/units/arm-linux/nogui/lazarus.or
Linking /home/soitjes/.lazarus/bin/arm-linux/lazarus
/usr/local/bin/arm-linux-ld: cannot find -lpthread
/usr/local/bin/arm-linux-ld: cannot find -ldl
/usr/local/bin/arm-linux-ld: cannot find -lc
lazarus.pp(128,42) Error: Error while linking
lazarus.pp(128,42) Fatal: There were 1 errors compiling module, stopping
TMessagesView.CollectLineParts WARNING: 18<>14 SrcLine=lazarus.pp(128,42) Fatal: There were 1 errors compiling module, stopping

I have set the LCL Widget type to "NoGUI", otherwise the list of missing files is much longer.

Does anyboy know which files the linker can't find ?  I copied all the library files from /lib, /lib/arm-linux-gnueabihf and /usr/lib to my Ubuntu machine.

Thanks,

Soitjes.

DirkS:
If you want to cross-compile from i386 to arm you don't need to

What you need is an FPC native compiler (i386), cross-compiler ( i386 to arm) and a native (i386) Lazarus.

Create a project in Lazarus and set it to compile for arm-linux. Packages used in your project will be automatically built on demand.

HTH
Dirk.

Navigation

[0] Message Index

Go to full version