G'day all,
I'm using the latest FIXES_2.2 branch of FPC and lazarus svn from about 10 minutes ago. I usually compile lazarus from SVN, then compile again with make idepkg
to get my packages included. It's worked for me thus far, but now I want to cross compile I can't figure out how to go about it.
I'm cross compiling from linux-i386 to darwin-i386 / darwin-powerpc and win32-i386. All these I have working, and I can even cross compile lazarus itself to run on these platforms. When I want to use lazbuild to build my application I get this...
brad at bkmac:~/devel/fpc/Projects/Pascal/SIDE$ ../../../lazarus/lazbuild --os=darwin --cpu=powerpc --ws=carbon BST.lpr
TLazPackageGraph.CheckIfPackageNeedsCompilation No state file for tv 0.0 [TExternalToolList.Run] CmdLine="/opt/cross/bin/ppc386 -B -MObjFPC -Sgi -O1 -Tdarwin -gl -vewnhi -l -Fu../packager/units/powerpc-darwin/ -Fu. -FUlib/powerpc-darwin/ tv.pas" WorkDir="/home/brad/devel/fpc/lazarus/TreeView/"
TOutputFilter.Execute :TProcessUTF8
Hint: Start of reading config file /home/brad/.fpc.cfg Hint: End of reading config file /home/brad/.fpc.cfg Free Pascal Compiler version 2.2.3 [2008/10/01] for i386 Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Darwin for i386
Compiling tv.pas
Compiling directorytreeview.pas
directorytreeview.pas(47,5) Note: Private field "TDirectoryTreeview.OldNode" is never used Assembling directorytreeview
PPU Loading /home/brad/devel/fpc/lazarus/packager/units/powerpc-darwin/lazaruspackageintf.ppu PPU is compiled for another processor
Fatal: Can't find unit LazarusPackageIntf used by tv TExternalToolList.Run Exception: /home/brad/devel/fpc/lazarus/TreeView/directorytreeview.pas(1,1) Fatal: Can't find unit LazarusPackageIntf used by tv ERROR: tool reported error
Now the first thing I spot is lazbuild is ignoring the --cpu flag and trying to compile with an i386 compiler. This will work in this instance as I have units for darwin in i386 and ppc, but it's still wrong. I had the same problem trying to compile lazarus from within lazarus. The only way I could get it to use a ppc compiler was to do a...
make OS_TARGET=darwin CPU_TARGET=powerpc LCL_PLATFORM=carbon all
...in my lazarus directory.
Can anyone offer any insight as to why I can't cross compile lazarus with my packages?
Regards,
Brad
