<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Thank you very much. <br>
<br>
I succeeded in building a new compiler from the SVN sources, <br>
and it runs successfully for the win32 target. <br>
<br>
C:\fpc_test>ppc386 pasform.pas<br>
Free Pascal Compiler version 2.7.1 [2013/07/24] for i386<br>
Copyright (c) 1993-2013 by Florian Klaempfl and others<br>
Target OS: Win32 for i386<br>
Compiling pasform.pas<br>
pasform.pas(746,8) Note: Local variable "CH" not used<br>
pasform.pas(1147,8) Note: Local variable "I" not used<br>
pasform.pas(1411,11) Note: Local variable "EINRUECKSAVE" not used<br>
pasform.pas(1405,8) Note: Local variable "EINRUECKS2" not used<br>
pasform.pas(1981,8) Note: Local variable "I" not used<br>
pasform.pas(118,5) Note: Local variable "INCSTATE" is assigned but
never used<br>
pasform.pas(121,5) Note: Local variable "KPINDEX" is assigned but
never used<br>
Linking pasform.exe<br>
2197 lines compiled, 0.1 sec, 48208 bytes code, 1220 bytes data<br>
7 note(s) issued<br>
<br>
and the program works as expected. <br>
<br>
Then I built the RTL for linux, which also worked successfully, as
far as I saw, <br>
but when compiling with -Tlinux, I now get the following message:
<br>
<br>
C:\fpc_test>ppc386 -Tlinux pasform.pas<br>
Free Pascal Compiler version 2.7.1 [2013/07/24] for i386<br>
Copyright (c) 1993-2013 by Florian Klaempfl and others<br>
Target OS: Linux for i386<br>
Compiling pasform.pas<br>
PPU Loading C:\fpc\rtl\units\i386-linux\system.ppu<br>
PPU Invalid Version 135<br>
Fatal: Can't find unit system used by PASFORM<br>
Fatal: Compilation aborted<br>
<br>
that is: the system.ppu seems to be found, but there is something
wrong<br>
with the version. <br>
<br>
When trying to build the RTL for OS/2 (running make in the os2
subdir of <br>
fpc/rtl), I get the following messages: <br>
<br>
C:\fpc\rtl\os2>make<br>
C:/lazarus/fpc/2.6.2/bin/i386-win32/gmkdir.exe -p
../../rtl/units/os2<br>
i386-os2-as -o ../../rtl/units/os2/prt0.o prt0.as<br>
process_begin: CreateProcess((null), i386-os2-as -o
../../rtl/units/os2/prt0.o p<br>
rt0.as, ...) failed.<br>
make (e=2): Das System kann die angegebene Datei nicht finden.<br>
make: *** [prt0.o] Error 2<br>
<br>
apparently, there is no i386-os2-as<br>
<br>
when I did the same thing in the linux subdir, it worked (but: see
above). <br>
<br>
Do I need a special ASSEMBLER to build the OS/2 RTL? <br>
<br>
Is it possible to download a pre-built OS/2 RTL? <br>
<br>
No need to invest much time in those questions: I already had some
<br>
insights in the techniques of cross-compiling ... and in any case
I'm now able <br>
to build a new compiler from the compiler sources.<br>
<br>
Kind regards<br>
<br>
Bernd<br>
<br>
<br>
<br>
Am 24.07.2013 14:19, schrieb Sven Barth:<br>
</div>
<blockquote cite="mid:51EFC63D.50203@googlemail.com" type="cite">Am
24.07.2013 14:12, schrieb Bernd Oppolzer:
<br>
<blockquote type="cite">Sorry, I'm sure, this is a very basic
question,
<br>
just to speed up things a little ...
<br>
<br>
when I run the compiler on Windows on my test sources,
<br>
everythings works fine.
<br>
<br>
Now I wanted to build executables for OS/2 and Linux-386,
<br>
just to learn more about cross-compile. But the installed
compiler-exe
<br>
(which came with Lazarus) only supports the win32 target.
<br>
<br>
The compiler message is as follows:
<br>
<br>
C:\fpc_test>ppc386 -Tos2 pasform.pas
<br>
Free Pascal Compiler version 2.6.2 [2013/06/09] for i386
<br>
Copyright (c) 1993-2012 by Florian Klaempfl and others
<br>
Target OS: OS/2
<br>
Compiling pasform.pas
<br>
Fatal: Can't find unit system used by PASFORM
<br>
Fatal: Compilation aborted
<br>
<br>
Same goes for -Tlinux
<br>
<br>
Of course, I have to build a new compiler. Or: do I misinterpret
<br>
the error message?
<br>
<br>
I downloaded the development tree using svn.
<br>
<br>
What is the easiest way to build a new compiler, and:
<br>
will it be possible to build a compiler that is able to build
<br>
different targets at the same time?
<br>
<br>
</blockquote>
The problem is not the compiler. Each compiler can compile for
each target of the supported platform. E.g. an i386-win32 compiler
can also compile for i386-os2 and i386-linux. It can not however
compile for e.g. x86_64-win64 or powerpc-linux.
<br>
What is not provided by default for other targets is the RTL (and
FCL and packages) which the compiler needs to compile programs.
These you need to create by yourself, but for this you'll also
need the according binutils and depending on the target platform
and your program also libraries from the platform (e.g. when you
compile for Linux systems). Cross compiling for different
combinations is described here:
<a class="moz-txt-link-freetext" href="http://wiki.freepascal.org/Cross_compiling">http://wiki.freepascal.org/Cross_compiling</a>
<br>
In the simplest cases the approach mentioned for Win32 -> Win64
is sufficient, but you should also take a look at the BuildFAQ:
<a class="moz-txt-link-freetext" href="http://wiki.freepascal.org/buildfaq">http://wiki.freepascal.org/buildfaq</a>
<br>
<br>
Regards,
<br>
Sven
<br>
_______________________________________________
<br>
fpc-devel maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.freepascal.org/mailman/listinfo/fpc-devel">http://lists.freepascal.org/mailman/listinfo/fpc-devel</a>
<br>
<br>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<title>Bernd Oppolzer</title>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-15">
<meta content="MSHTML 6.00.6000.21316" name="GENERATOR">
<style>@page Section1 {size: 595.3pt 841.8pt; margin: 70.85pt 70.85pt 2.0cm 70.85pt; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: blue; TEXT-DECORATION: underline
}
DIV.Section1 {
page: Section1
}
</style>
<div class="Section1">
<font face="Arial" size="1" color="#666666">
<span style="FONT-SIZE: 8pt; FONT-FAMILY: Arial">
—————————————————————<br>
<b>Oppolzer-Informatik<br>
</b>
Dipl. Inf. Bernd Oppolzer<br>
Bärenhofstraße 23<br>
70771 Leinfelden-Echterdingen<br>
—————————————————————<br>
Tel.: +49 711 2272522<br>
priv.: +49 711 7949590<br>
eMail: </span></font>
<font face="Arial" size="1" color="blue">
<span style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: Arial">
<a href="mailto:bernd.oppolzer@t-online.de">bernd.oppolzer@t-online.de</a><br>
</span>
</font>
<font face="Arial" size="1" color="#666666">
<span style="FONT-SIZE: 8pt; FONT-FAMILY: Arial">
—————————————————————<br>
Für Umsatzsteuerzwecke:<br>
SteuerNr.: 97 076 / 29921<br>
USt-ID-Nr.: DE 147 700 393<br>
—————————————————————<br>
</span></font>
<span style="FONT-SIZE: 8pt; COLOR: green; FONT-FAMILY: Arial">
Jubiläumsjahr 2013:<br>
30 Jahre Oppolzer-Informatik<br>
</span>
<br>
</div>
</div>
</body>
</html>