Compiling FPC for SPARC

classic Classic list List threaded Threaded
54 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Compiling FPC for SPARC

Mark Morgan Lloyd-5
First, is this the best list to discuss this?

I've got rather agressive filtering in my mailing list gateway. If anybody tries
to send any attachments etc. to me please use markMLl.fpc2 .AT. telemetry .DOT.
co .DOT. uk.


I admit readily to being a beginner as far as FPC is concerned, and
inexperienced at Open Source development (SVN etc.) in general- SVN etc.

On an i386-linux system I've installed the FPC binaries in
/usr/local/fpc-2.0.2.i386 and the sources off ~/pascal/src (hence
~/pascal/src/fpc/compiler etc.) and can compile using "make cycle" to the point
where I can run the new fpc against hello.pp and get something that runs.
Questions at this stage:

*  Are there further validation tests available?
*  How can I build an installation bundle to move to a virgin machine?
*  What's the approved directory structure for an FPC binary+source tree
   for further work on e.g. Lazarus?

Moving to a SPARC (v8, 32-bit) system I installed the binaries in
/usr/local/fpc-2.0.0.sparc and the 2.0.2 sources similarly off ~/pascal/src.
Similarly running "make cycle" brought up a fairly obvious typo hence

0 2>markMLl@pye-dev-04:~/pascal/src/fpc/compiler/sparc$ diff -u cpupara.pas~
cpupara.pas
--- cpupara.pas~        2005-12-04 21:24:03.000000000 +0000
+++ cpupara.pas 2006-07-31 13:37:20.000000000 +0000
@@ -175,7 +175,7 @@
              begin
                p.funcretloc[side].loc:=LOC_REGISTER;
                { high }
-               if (side=callerside) (po_inline in p.procoptions) then
+               if (side=callerside) or (po_inline in p.procoptions) then
                 
p.funcretloc[side].register64.reghi:=NR_FUNCTION_RESULT64_HIGH_REG
                else
                 
p.funcretloc[side].register64.reghi:=NR_FUNCTION_RETURN64_HIGH_REG;

Hope that's the appropriate kind of diff, sorry about any wrap.


Fixing the above and starting over, make runs up to

make[5]: Leaving directory `/home/markMLl/pascal/src/fpc/rtl/linux'
make[4]: Leaving directory `/home/markMLl/pascal/src/fpc/rtl'
make -C ../rtl 'OPT=' all
make[4]: Entering directory `/home/markMLl/pascal/src/fpc/rtl'
make -C linux all
make[5]: Entering directory `/home/markMLl/pascal/src/fpc/rtl/linux'
as -o ../../rtl/units/sparc-linux/prt0.o sparc/prt0.as
as -o ../../rtl/units/sparc-linux/dllprt0.o sparc/dllprt0.as
as -o ../../rtl/units/sparc-linux/cprt0.o sparc/cprt0.as
as -o ../../rtl/units/sparc-linux/gprt0.o sparc/gprt0.as
/home/markMLl/pascal/src/fpc/compiler/ppc2 -Fi../inc -Fi../sparc -Fi../unix
-Fisparc -FE. -FU../../rtl/units
/sparc-linux -dsparc -Us -Sg system.pp
Free Pascal Compiler version 2.0.2 [2006/07/31] for sparc
Copyright (c) 1993-2005 by Florian Klaempfl
Target OS: Linux for SPARC
Compiling system.pp
sparc.inc(60,3)  msg nr 1018
An unhandled exception occurred at $0002EB9C :
EInvalidPointer : Invalid pointer operation
  $0002EB9C
  $0002C84C
  $0007217C
  $0004A4C0
  $000407DC
  $000103B0
An unhandled exception occurred at $00000030 :
An unhandled exception occurred at $000FF00B :
An unhandled exception occurred at $000FF003 :
..
An unhandled exception occurred at $000FF003 :
An unhandled exception occurred at $000FF003 :
An unhandled exception occurred at $000FF003 :
make[5]: *** [system.ppu] Illegal instruction
make[5]: Leaving directory `/home/markMLl/pascal/src/fpc/rtl/linux'
make[4]: *** [linux_all] Error 2


I propose to hold off any more tinkering for a few hours pending any light that
anybody can throw on this, or suggested ways forwards.

Is there an archive of the 2.0.0 sources somewhere that I can run the 2.0.0
SPARC compiler against as a check?

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Peter Vreman
At 17:06 31-7-2006, you wrote:

>First, is this the best list to discuss this?
>
>I've got rather agressive filtering in my mailing list gateway. If
>anybody tries
>to send any attachments etc. to me please use markMLl.fpc2 .AT.
>telemetry .DOT.
>co .DOT. uk.
>
>
>I admit readily to being a beginner as far as FPC is concerned, and
>inexperienced at Open Source development (SVN etc.) in general- SVN etc.
>
>On an i386-linux system I've installed the FPC binaries in
>/usr/local/fpc-2.0.2.i386 and the sources off ~/pascal/src (hence
>~/pascal/src/fpc/compiler etc.) and can compile using "make cycle"
>to the point
>where I can run the new fpc against hello.pp and get something that runs.
>Questions at this stage:
>
>*  Are there further validation tests available?

There is a testsuite available in SVN (or fpc.zip) under fpc/trunk/tests

>*  How can I build an installation bundle to move to a virgin machine?

in the toplevel fpc/ type 'make zipinstall'

>*  What's the approved directory structure for an FPC binary+source tree
>    for further work on e.g. Lazarus?



>Moving to a SPARC (v8, 32-bit) system I installed the binaries in
>/usr/local/fpc-2.0.0.sparc and the 2.0.2 sources similarly off ~/pascal/src.
>Similarly running "make cycle" brought up a fairly obvious typo hence
>
>0 2>markMLl@pye-dev-04:~/pascal/src/fpc/compiler/sparc$ diff -u cpupara.pas~
>cpupara.pas
>--- cpupara.pas~        2005-12-04 21:24:03.000000000 +0000
>+++ cpupara.pas 2006-07-31 13:37:20.000000000 +0000
>@@ -175,7 +175,7 @@
>               begin
>                 p.funcretloc[side].loc:=LOC_REGISTER;
>                 { high }
>-               if (side=callerside) (po_inline in p.procoptions) then
>+               if (side=callerside) or (po_inline in p.procoptions) then

This already fixed in current SVN.




>Fixing the above and starting over, make runs up to
>
>make[5]: Leaving directory `/home/markMLl/pascal/src/fpc/rtl/linux'
>make[4]: Leaving directory `/home/markMLl/pascal/src/fpc/rtl'
>make -C ../rtl 'OPT=' all
>make[4]: Entering directory `/home/markMLl/pascal/src/fpc/rtl'
>make -C linux all
>make[5]: Entering directory `/home/markMLl/pascal/src/fpc/rtl/linux'
>as -o ../../rtl/units/sparc-linux/prt0.o sparc/prt0.as
>as -o ../../rtl/units/sparc-linux/dllprt0.o sparc/dllprt0.as
>as -o ../../rtl/units/sparc-linux/cprt0.o sparc/cprt0.as
>as -o ../../rtl/units/sparc-linux/gprt0.o sparc/gprt0.as
>/home/markMLl/pascal/src/fpc/compiler/ppc2 -Fi../inc -Fi../sparc -Fi../unix
>-Fisparc -FE. -FU../../rtl/units
>/sparc-linux -dsparc -Us -Sg system.pp
>Free Pascal Compiler version 2.0.2 [2006/07/31] for sparc
>Copyright (c) 1993-2005 by Florian Klaempfl
>Target OS: Linux for SPARC
>Compiling system.pp
>sparc.inc(60,3)  msg nr 1018
>An unhandled exception occurred at $0002EB9C :
>EInvalidPointer : Invalid pointer operation
>   $0002EB9C
>   $0002C84C
>   $0007217C
>   $0004A4C0
>   $000407DC
>   $000103B0
>An unhandled exception occurred at $00000030 :
>An unhandled exception occurred at $000FF00B :
>An unhandled exception occurred at $000FF003 :
>..
>An unhandled exception occurred at $000FF003 :
>An unhandled exception occurred at $000FF003 :
>An unhandled exception occurred at $000FF003 :
>make[5]: *** [system.ppu] Illegal instruction
>make[5]: Leaving directory `/home/markMLl/pascal/src/fpc/rtl/linux'
>make[4]: *** [linux_all] Error 2

Can't verify this atm. my sparc linux is not connected anymore.


>I propose to hold off any more tinkering for a few hours pending any
>light that
>anybody can throw on this, or suggested ways forwards.
>
>Is there an archive of the 2.0.0 sources somewhere that I can run the 2.0.0
>SPARC compiler against as a check?

See the testsuite. You can even run it remotely through ssh/rsh from
another platform with a cross compiler installed.


Peter

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Tomas Hajny
Peter Vreman wrote:
> At 17:06 31-7-2006, you wrote:
>>First, is this the best list to discuss this?

Yes for basic questions like "how to do this or that". When discussing
more complex stuff like "is this the right way for fixing problem XYZ
which popped up on SPARC", or "attached diff should fix problem ABC",
fpc-devel would be probably more appropriate.


 .
 .
>>I admit readily to being a beginner as far as FPC is concerned, and
>>inexperienced at Open Source development (SVN etc.) in general- SVN etc.

Basic hints for working with our SVN repository can be found in our Wiki
(http://www.freepascal.org/wiki/index.php/SVN_Migration).


 .
 .
>>I propose to hold off any more tinkering for a few hours pending any
>>light that
>>anybody can throw on this, or suggested ways forwards.

I propose to check with the 2.0.4-rc2 sources. You can get these from
ftp://ftp.freepascal.org/pub/fpc/beta/2.0.4-rc2/source/, or directly
_using_SVN_ (not WWW browser) from
http://svn.freepascal.org/svn/fpcbuild/tags/release_2_0_4_rc2/ (or the
most up to date sources from the fixes branch available via SVN from
http://svn.freepascal.org/svn/fpcbuild/branches/fixes_2_0/ (or
http://svn.freepascal.org/svn/fpc/branches/fixes_2_0/ for just the main
part without docs and stuff necessary for release building).


>>Is there an archive of the 2.0.0 sources somewhere that I can run the
>> 2.0.0
>>SPARC compiler against as a check?

Yes, there is. The initial revision in SVN should correspond to 2.0.0 (we
used CVS before) - you can use SVN to checkout revision 1 of the fpc
repository. In addition,
ftp://ftpmaster.freepascal.org/pub/fpc/dist/source-2.0.0/ is available
too.

Tomas

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Mark Morgan Lloyd-5
In reply to this post by Peter Vreman
Peter Vreman wrote:

> >*  Are there further validation tests available?
>
> There is a testsuite available in SVN (or fpc.zip) under fpc/trunk/tests

Thanks. Got fpc/tests from the source which I presume is what you're referring
to.

> >*  How can I build an installation bundle to move to a virgin machine?
>
> in the toplevel fpc/ type 'make zipinstall'

Thanks, I see it. I think it needs a static libncurses.a, working on it.

> >Similarly running "make cycle" brought up a fairly obvious typo hence

> This already fixed in current SVN.

Thanks for that :-)

> >make[4]: *** [linux_all] Error 2
>
> Can't verify this atm. my sparc linux is not connected anymore.

Mine is, and I'm trying to sort this out in company time since we want the
option of moving off x86. I think I can put a few days work into it before too
many eyebrows are raised, so I crave the community's indulgence.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Mark Morgan Lloyd-5
In reply to this post by Tomas Hajny
Tomas Hajny wrote:

Thanks Tomas, all good stuff :-)

I'll be back.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Mark Morgan Lloyd-5
I'm hoping to be able to sit down tomorrow and read more documentation, but for
the moment here's where I'm at.

*  I can build i386 2.0.2 and appear to get something working out of it using
make cycle or make zipinstall. "Working" in this context is that it will
generate a runnable program from hello.pp and that the fp IDE appears OK.

*  If I run the tests (make full) on i386 2.0.2 I get a UML (User Mode Linux on
2.4.32) kernel crash on testfpuc.pp. I'll try and check this out on a "real"
system presently, I've found UML to be pretty robust but knowing the effort
that's going into FPC on i386 I'd suspect a kernel problem first.

*  On SPARC, I can build the 2.0.0 sources using the 2.0.0 compiler using make
cycle or make zipinstall. All tests complete although I've not gone into the
exact results of each yet.

More tomorrow.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Jonas Maebe-2

On 2 aug 2006, at 00:47, Mark Morgan Lloyd wrote:

> *  If I run the tests (make full) on i386 2.0.2 I get a UML (User  
> Mode Linux on
> 2.4.32) kernel crash on testfpuc.pp. I'll try and check this out on  
> a "real"
> system presently, I've found UML to be pretty robust but knowing  
> the effort
> that's going into FPC on i386 I'd suspect a kernel problem first.

Not only that, but a kernel crash always means something is wrong in  
the kernel. No matter how badly a program is written, the (Linux)  
kernel should never crash (UML or otherwise).


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Mark Morgan Lloyd-5
Jonas Maebe wrote:

>
> On 2 aug 2006, at 00:47, Mark Morgan Lloyd wrote:
>
> > *  If I run the tests (make full) on i386 2.0.2 I get a UML (User
> > Mode Linux on
> > 2.4.32) kernel crash on testfpuc.pp. I'll try and check this out on
> > a "real"
> > system presently, I've found UML to be pretty robust but knowing
> > the effort
> > that's going into FPC on i386 I'd suspect a kernel problem first.
>
> Not only that, but a kernel crash always means something is wrong in
> the kernel. No matter how badly a program is written, the (Linux)
> kernel should never crash (UML or otherwise).

Yes, agreed. I might re-test as I get to understand things better.

However my interest is in the SPARC side of things at present and I hope I'll be
forgiven for not following this one up.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Jonas Maebe-2

On 2 aug 2006, at 10:20, Mark Morgan Lloyd wrote:

>> Not only that, but a kernel crash always means something is wrong in
>> the kernel. No matter how badly a program is written, the (Linux)
>> kernel should never crash (UML or otherwise).
>
> Yes, agreed. I might re-test as I get to understand things better.
>
> However my interest is in the SPARC side of things at present and I  
> hope I'll be
> forgiven for not following this one up.

No problem, UML debugging is not really something we care deeply  
about either :)


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Mark Morgan Lloyd-5
In reply to this post by Tomas Hajny
Tomas Hajny wrote:

> I propose to check with the 2.0.4-rc2 sources. You can get these from
> ftp://ftp.freepascal.org/pub/fpc/beta/2.0.4-rc2/source/,

That builds (make cycle) OK on/for linux-i386 using FPC 2.0.2, but on
linux-sparc using FPC 2.0.0 I get:

Target OS: Linux for SPARC
Compiling system.pp
..
rtti.inc(268,9) Warning: Comment level 2 found
ossysc.inc(192,14) Error: Identifier not found "syscall_nr_exit_group"
system.pp(271) Fatal: There were 1 errors compiling module, stopping
system.pp(271) Error: Compilation aborted
make[5]: *** [system.ppu] Error 1
make[5]: Leaving directory
`/home/markMLl/pascal/src/fpcbuild_2_0_4_rc2_exp/fpcsrc/rtl/linux'
make[4]: *** [linux_all] Error 2

I seem to have three choices:

i)   Find the file in the 2.0.2 sources that SPARC 2.0.0 couldn't compile, and
     see if there's some hack that will fix this.

ii)  Ditto for 2.0.4 sources (possibly easier since the compiler isn't bombing).

iii) Compile 2.0.2 on i386 to target SPARC, and see if that will compile the
     2.0.2 source.

My gut feeling is (iii), but any suggestions would be appreciated.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Peter Vreman
> Tomas Hajny wrote:
>
>> I propose to check with the 2.0.4-rc2 sources. You can get these from
>> ftp://ftp.freepascal.org/pub/fpc/beta/2.0.4-rc2/source/,
>
> That builds (make cycle) OK on/for linux-i386 using FPC 2.0.2, but on
> linux-sparc using FPC 2.0.0 I get:
>
> Target OS: Linux for SPARC
> Compiling system.pp
> ..
> rtti.inc(268,9) Warning: Comment level 2 found
> ossysc.inc(192,14) Error: Identifier not found "syscall_nr_exit_group"
> system.pp(271) Fatal: There were 1 errors compiling module, stopping
> system.pp(271) Error: Compilation aborted
> make[5]: *** [system.ppu] Error 1
> make[5]: Leaving directory
> `/home/markMLl/pascal/src/fpcbuild_2_0_4_rc2_exp/fpcsrc/rtl/linux'
> make[4]: *** [linux_all] Error 2
>
> I seem to have three choices:
>
> i)   Find the file in the 2.0.2 sources that SPARC 2.0.0 couldn't compile,
> and
>      see if there's some hack that will fix this.
>
> ii)  Ditto for 2.0.4 sources (possibly easier since the compiler isn't
> bombing).
>
> iii) Compile 2.0.2 on i386 to target SPARC, and see if that will compile
> the
>      2.0.2 source.
>
> My gut feeling is (iii), but any suggestions would be appreciated.

There is only one correct solution: Fix the building of the 2.0.4 by
looking up the correct syscall in the C headers.

Forget about old stable releases like 2.0.2, only work with current svn
(2.0.4 or 2.1.1).




_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Vincent Snijders
In reply to this post by Mark Morgan Lloyd-5
Mark Morgan Lloyd schreef:

> Tomas Hajny wrote:
>
>> I propose to check with the 2.0.4-rc2 sources. You can get these from
>> ftp://ftp.freepascal.org/pub/fpc/beta/2.0.4-rc2/source/,
>
> That builds (make cycle) OK on/for linux-i386 using FPC 2.0.2, but on
> linux-sparc using FPC 2.0.0 I get:
>
> Target OS: Linux for SPARC
> Compiling system.pp
> ..
> rtti.inc(268,9) Warning: Comment level 2 found
> ossysc.inc(192,14) Error: Identifier not found "syscall_nr_exit_group"
> system.pp(271) Fatal: There were 1 errors compiling module, stopping
> system.pp(271) Error: Compilation aborted
> make[5]: *** [system.ppu] Error 1
> make[5]: Leaving directory
> `/home/markMLl/pascal/src/fpcbuild_2_0_4_rc2_exp/fpcsrc/rtl/linux'
> make[4]: *** [linux_all] Error 2
>
> I seem to have three choices:
>
> i)   Find the file in the 2.0.2 sources that SPARC 2.0.0 couldn't compile, and
>      see if there's some hack that will fix this.
>
> ii)  Ditto for 2.0.4 sources (possibly easier since the compiler isn't bombing).
>
> iii) Compile 2.0.2 on i386 to target SPARC, and see if that will compile the
>      2.0.2 source.
>
> My gut feeling is (iii), but any suggestions would be appreciated.
>

Look up the syscall_nr_exit_group (the number for exit_group syscall) for sparc and
add it to rtl/linux/sparc/sysnr.inc and try to compile again.

This syscall was not used in fpc 2.0.2, but was added afterwards. You might find
more of those.

Vincent
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Mark Morgan Lloyd-5
In reply to this post by Peter Vreman
Peter Vreman wrote:

> There is only one correct solution: Fix the building of the 2.0.4 by
> looking up the correct syscall in the C headers.
>
> Forget about old stable releases like 2.0.2, only work with current svn
> (2.0.4 or 2.1.1).

The only thing that bothers me here is that while this is the correct solution
it might not be possible. With the major caveat that I'm a beginner at this but
I've demonstrated that 2.0.0 can't compile 2.0.2, and I suspect that once I've
fixed the missing syscall I still might be left with something that the existing
compiler can't process :-(

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Jonas Maebe-2

On 3 aug 2006, at 11:11, Mark Morgan Lloyd wrote:

>> Forget about old stable releases like 2.0.2, only work with  
>> current svn
>> (2.0.4 or 2.1.1).
>
> The only thing that bothers me here is that while this is the  
> correct solution
> it might not be possible. With the major caveat that I'm a beginner  
> at this but
> I've demonstrated that 2.0.0 can't compile 2.0.2, and I suspect  
> that once I've
> fixed the missing syscall I still might be left with something that  
> the existing
> compiler can't process :-(

This is not a case of something the existing compiler cannot process,  
but a platform-specific include file which was not updated while  
others were. The SPARC exit_group syscall is 188 according to
   http://lxr.linux.no/source/include/asm-sparc/unistd.h#L207

But yes, it's possible you'll find a few more things like this before  
everything compiles, since the SPARC/Linux port has not been  
maintained for a while.


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Mark Morgan Lloyd-5
In reply to this post by Vincent Snijders
Vincent Snijders wrote:

> Look up the syscall_nr_exit_group (the number for exit_group syscall) for sparc and
> add it to rtl/linux/sparc/sysnr.inc and try to compile again.
>
> This syscall was not used in fpc 2.0.2, but was added afterwards. You might find
> more of those.

Thanks. I'll follow that up as the main thrust but I think I'll backtrack first
and check compilation on an i386 without UML in case I was doing something
really dumb. If I can get that working it gives me at least the possibility of a
2.0.2 cross-compiler, so that I could work on 2.0.4 with something more recent
than a 2.0.0 compiler.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Peter Vreman
> Vincent Snijders wrote:
>
>> Look up the syscall_nr_exit_group (the number for exit_group syscall)
>> for sparc and
>> add it to rtl/linux/sparc/sysnr.inc and try to compile again.
>>
>> This syscall was not used in fpc 2.0.2, but was added afterwards. You
>> might find
>> more of those.
>
> Thanks. I'll follow that up as the main thrust but I think I'll backtrack
> first
> and check compilation on an i386 without UML in case I was doing something
> really dumb. If I can get that working it gives me at least the
> possibility of a
> 2.0.2 cross-compiler, so that I could work on 2.0.4 with something more
> recent
> than a 2.0.0 compiler.

2.0.4 (and also the current 2.1.1) can still be build by 2.0.0.



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Mark Morgan Lloyd-5
In reply to this post by Jonas Maebe-2
Jonas Maebe wrote:

> > The only thing that bothers me here is that while this is the
> > correct solution
> > it might not be possible. With the major caveat that I'm a beginner
> > at this but
> > I've demonstrated that 2.0.0 can't compile 2.0.2, and I suspect
> > that once I've
> > fixed the missing syscall I still might be left with something that
> > the existing
> > compiler can't process :-(
>
> This is not a case of something the existing compiler cannot process,
> but a platform-specific include file which was not updated while
> others were. The SPARC exit_group syscall is 188 according to
>    http://lxr.linux.no/source/include/asm-sparc/unistd.h#L207
>
> But yes, it's possible you'll find a few more things like this before
> everything compiles, since the SPARC/Linux port has not been
> maintained for a while.

Working on it. I know that this particular problem is not related to a compiler
problem, but I've already (I think) demonstrated that the 2.0.0 compiler on
SPARC has problems with the 2.0.2 sources. I've got a horrid feeling that once
the missing stuff is fixed I'll hit the same problem :-(

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Vincent Snijders
Mark Morgan Lloyd schreef:

> Jonas Maebe wrote:
>
>>> The only thing that bothers me here is that while this is the
>>> correct solution
>>> it might not be possible. With the major caveat that I'm a beginner
>>> at this but
>>> I've demonstrated that 2.0.0 can't compile 2.0.2, and I suspect
>>> that once I've
>>> fixed the missing syscall I still might be left with something that
>>> the existing
>>> compiler can't process :-(
>> This is not a case of something the existing compiler cannot process,
>> but a platform-specific include file which was not updated while
>> others were. The SPARC exit_group syscall is 188 according to
>>    http://lxr.linux.no/source/include/asm-sparc/unistd.h#L207
>>
>> But yes, it's possible you'll find a few more things like this before
>> everything compiles, since the SPARC/Linux port has not been
>> maintained for a while.
>
> Working on it. I know that this particular problem is not related to a compiler
> problem, but I've already (I think) demonstrated that the 2.0.0 compiler on
> SPARC has problems with the 2.0.2 sources. I've got a horrid feeling that once
> the missing stuff is fixed I'll hit the same problem :-(
>

Such problem will need to be fixed anyway, maybe with some ifdefs in the RTL. So it
is a good thing you find them, as long as you fix them in the latest source.

Vincent
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Tomas Hajny
In reply to this post by Mark Morgan Lloyd-5
Mark Morgan Lloyd wrote:

> Jonas Maebe wrote:
>
>> > The only thing that bothers me here is that while this is the
>> > correct solution
>> > it might not be possible. With the major caveat that I'm a beginner
>> > at this but
>> > I've demonstrated that 2.0.0 can't compile 2.0.2, and I suspect
>> > that once I've
>> > fixed the missing syscall I still might be left with something that
>> > the existing
>> > compiler can't process :-(
>>
>> This is not a case of something the existing compiler cannot process,
>> but a platform-specific include file which was not updated while
>> others were. The SPARC exit_group syscall is 188 according to
>>    http://lxr.linux.no/source/include/asm-sparc/unistd.h#L207
>>
>> But yes, it's possible you'll find a few more things like this before
>> everything compiles, since the SPARC/Linux port has not been
>> maintained for a while.
>
> Working on it. I know that this particular problem is not related to a
> compiler
> problem, but I've already (I think) demonstrated that the 2.0.0 compiler
> on
> SPARC has problems with the 2.0.2 sources. I've got a horrid feeling that
> once
> the missing stuff is fixed I'll hit the same problem :-(

Even if you hit the same problem with 2.0.4, you should still better try
it with the latest available compiler (e.g. 2.0.4-rc2 or snapshot compiled
from the current SVN sources) and try to fix possibly existing issues in
that one (either directly yourself or by discussing with other people who
can provide more insight in the technical details) rather than trying to
create non-existing 2.0.2 SPARC compiler, because the problem might still
exist in 2.0.2, but could be e.g. resolved in 2.0.4 or the current 2.1.1
sources. Trying to fix the history usually doesn't work very well, you
know. ;-)

Tomas

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling FPC for SPARC

Mark Morgan Lloyd-5
In reply to this post by Peter Vreman
Peter Vreman wrote:

> 2.0.4 (and also the current 2.1.1) can still be build by 2.0.0.

Sure- on an Intel platform.

Running on i386- I've just had another session and can confirm that 2.0.2 can
build both its own sources and those of 2.0.4, so my earlier problem was
definitely something to do with the User Mode Linux kernel. I'll investigate
that at some indeterminate point in the future if I have to (UML is useful once
you're used to having it).

On SPARC- specifically, a 32-bit SPARCstation- trying to compile 2.0.2 using
2.0.0 results in an exception. I've just checked that again and can confirm
that. However it occurs to me that it could possibly be the same problem as in
the 2.0.4 source but for some reason the error handling is bombing.

Whatever, I'll move onto the 2.0.4 source as suggested and see if I can do
anything useful there. I'll also investigate building a cross-compiler.

I'm hoping to have a couple of newer machines in a few days courtesy of a
certain hardware manufacturer who is interested in keeping open source projects
going.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
123