Bin gerade durch zufall über folgende File gestolpert und dies mal versucht.
How to create the fpc_crosswin32 deb
This deb was only tested under linux.
The base directory is $BuildRoot. Default value is ~/freepascal
To change it use for example:
[]$ export BuildRoot=/home/user/freepascal
First get the FPC sources and the binutils.
For example:
[]$ cd <lazarusdir>/tools/install/cross_unix/
[]$ ./create_linux_cross_win32_deb.sh downloadbinutils downloadfpc buildbinutils
This will download the FPC svn to ~/freepascal/fpc, its install files to
~/freepascal/install and the binutils to ~/freepascal/binutils.
Create the fpc deb and install it:
[]$ cd <lazarusdir>/tools/install
[]$ ./create_fpc_deb.sh fpc ~/freepascal/fpc
[]$ sudo dpkg -i fpc-<version>.i386.rpm
Then build the fpc_crosswin32 deb and install it:
[]$ cd <lazarusdir>/tools/install/cross_unix/
[]$ ./create_linux_cross_win32_deb.sh buildcrossfpc buildcrosswin32deb
[]$ sudo dpkg -i fpc_crosswin32-<version>.i386.rpm
Now you can cross compile from linux to win32.
Bis zu dem Punkt
Code: Alles auswählen
./create_linux_cross_win32_deb.sh downloadbinutils downloadfpc buildbinutils
Lief auch alles suber.
nur wenn ich denne den Befehl
Code: Alles auswählen
maik81ftl@Maik81ftl:/opt/lazarus/tools/install$ ./create_fpc_deb.sh fpc ~/freepascal/fpc
Code: Alles auswählen
+ set -e
+ Usage='Usage: [OS_TARGET=xxx] [CPU_TARGET=xxx] [BINUTILSPREFIX=xxx] ./create_fpc_deb.sh fpc|fpc-src [notemp] <FPCSrcDir> [release]'
+ TmpDir=
+ '[' -z '' ']'
+ TmpDir=/home/maik81ftl/tmp
+ TmpDir=/home/maik81ftl/tmp/fpc_patchdir
+ PackageName=
+ '[' fpc = fpc ']'
+ PackageName=fpc
+ '[' fpc = fpc-src ']'
+ '[' xfpc = x ']'
+ shift
+ WithTempDir=yes
+ '[' x/home/maik81ftl/freepascal/fpc = xnotemp ']'
+ FPCSrcDir=/home/maik81ftl/freepascal/fpc
+ '[' x/home/maik81ftl/freepascal/fpc = x ']'
++ echo /home/maik81ftl/freepascal/fpc
+ FPCSrcDir=/home/maik81ftl/freepascal/fpc
+ shift
+ FPCRelease=
+ '[' x = x ']'
++ date +%y%m%d
+ FPCRelease=110715
+ '[' '!' -d /home/maik81ftl/freepascal/fpc/compiler ']'
+ ./check_fpc_dependencies.sh
+ set -e
+ echo Testing fpc ...
Testing fpc ...
+ TmpDir=
+ '[' -z '' ']'
+ TmpDir=/home/maik81ftl/tmp
+ TmpDir=/home/maik81ftl/tmp/fpc
+ rm -rf /home/maik81ftl/tmp/fpc
+ mkdir -p /home/maik81ftl/tmp/fpc
+ TestPas=/home/maik81ftl/tmp/fpc/test.pas
+ echo 'program test;'
+ echo '{$linklib gpm}'
+ echo '{$linklib ncurses}'
+ echo 'begin end.'
+ '[' x = x ']'
+ fpc /home/maik81ftl/tmp/fpc/test.pas
Free Pascal Compiler version 2.4.4-1 [2011/05/23] for x86_64
Copyright (c) 1993-2010 by Florian Klaempfl
Target OS: Linux for x86-64
Compiling /home/maik81ftl/tmp/fpc/test.pas
Linking /home/maik81ftl/tmp/fpc/test
/usr/bin/ld: link.res: No such file: No such file or directory
test.pas(4,7) Error: Error while linking
test.pas(4,7) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode (normal if you did not specify a source file to be compiled)
maik81ftl@Maik81ftl:/opt/lazarus/tools/install$
Kann sich da jemand von euch einen Reim darauf machen? Ich vermude mal den Fehler bei folgender Zeile
Code: Alles auswählen
/usr/bin/ld: link.res: No such file: No such file or directory