Hi.
I have a freshly installed Linux Mint 17 - 64bit, where I am struggling to get cross compilation to work.
I have installed the latest stable version (2.6.4 and 1.2.6) of Fpc, Fpcsrc, and Lazarus from the .debs.
Default compiling works as expected, no problem.
I then followed the cross compilation Wiki, made the scripts for i386-linux-ld and i386-linux-as, and after installing gcc-multilib I was able to do the "sudo make all CPU_TARGET=i386" and "sudo make crossinstall CPU_TARGET=i386"
Compilation and installation without any problems.
And then, it should be "That's it" according to the Wiki.
BUT apparently that's not it.
I open Lazarus, and want to check if it works:
Project > Options > Compiler Options > Config and Target, sets the target to Linux and the CPU family to i386, and presses test, and gets this:
WARNING: library search path does not exist: /opt/gnome/lib
WARNING: unit search path does not exist: /usr/share/lazarus/1.2.6/lcl/units/i386-linux/gtk2
WARNING: unit search path does not exist: /usr/share/lazarus/1.2.6/lcl/units/i386-linux
WARNING: unit search path does not exist: /usr/share/lazarus/1.2.6/components/lazutils/lib/i386-linux
ERROR: compiled FPC unit not found: system.ppu
ERROR: compiled FPC unit not found: sysutils.ppu
ERROR: compiled FPC unit not found: classes.ppu
ERROR: compiled FPC unit not found: avl_tree.ppu
ERROR: compiled FPC unit not found: zstream.ppu
Then I try the "Test cross compiler" example in the cross compilation Wiki:
program test;
begin
writeln('DATE ',{$i %DATE%});
writeln('FPCTARGET ',{$i %FPCTARGET%});
writeln('FPCTARGETCPU ',{$i %FPCTARGETCPU%});
writeln('FPCTARGETOS ',{$i %FPCTARGETOS%});
writeln('FPCVERSION ',{$i %FPCVERSION%});
end.
"fpc -TLinux -Px86_64 test.pas" works as expected, but
"fpc -TLinux -Pi386 test.pas" ends up with this error:
Error: ppc386 can't be executed, error message: Failed to execute "ppc386", error code: 127
I have a feeling that the parts that follows after the laconic "That's it", namely the "Edit your /etc/fpc.cfg file if needed." could as well cover:
"Then you just have to do some mumbo-jumbo"
So what am missing?
Regards
Christian