Recent

Author Topic: FPC 3.0.4 on OSX 10.5.8 PPC does not build ppcppc64 (?)  (Read 6586 times)

effed3s

  • Newbie
  • Posts: 3
FPC 3.0.4 on OSX 10.5.8 PPC does not build ppcppc64 (?)
« on: May 05, 2018, 03:43:31 pm »
Hello
   i build fpc-3.0.4 using fpc-3.0.2 on osx-10.5.8 on a powermac G5 (in the long time effort to keep alive the big alu tower)
fpc 3.0.2 is 32 and 64 bit version (build form source),  but 3.0.4 only the ppcppc was builded.
simply stated: why? someone could explain how make process work for fpc? comparing makefiles form 3.0.2 and 3.0.4 does not reveal amy substantial differences.
tnks
Greetings


jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: FPC 3.0.4 on OSX 10.5.8 PPC does not build ppcppc64 (?)
« Reply #2 on: May 06, 2018, 08:18:30 pm »
The reason you only get a 32 bit PowerPC compiler is that when building FPC, by default you will always build a version for the same host architecture and host operating system as the starting compiler. The default compiler on Mac OS X/ppc is always the 32 bit ppcppc compiler.

To build a PowerPC 64 bit cross-compiler, add CPU_TARGET=powerpc64 to your make command. To build a PowerPC 64 bit native compiler (which is rather useless, because it will use more memory and be slower than a PowerPC 32 -> 64 bit cross-compiler), add FPC=ppcppc64 CPU_SOURCE=powerpc64 to your make command (the CPU_SOURCE is needed because the ppcppc64 is a cross-compiler, and the makefiles do not select appropriate defaults in that case).

effed3s

  • Newbie
  • Posts: 3
Re: FPC 3.0.4 on OSX 10.5.8 PPC does not build ppcppc64 (?)
« Reply #3 on: May 07, 2018, 03:13:00 pm »
thanks for reply
@jwdietrich
 i will try cross compiling on intel mac, when i can setup all the things correctly.

@Jonas Maebe
ok, so ppcppc is the standard. Remain the (little)fact that fpc302 (and fpc264, fpc262) get compiled from source as 32 and 64 bit. Probably the make-files specify this, and not from 304. this is not a BIG problem, only i try to understand better the building stages.

Anyway testing fpc304 on 10.5.8 G5/DP/2ghz give this results:
utils/digest output/powerpc-darwin/log
Total = 6982 (20:6962)
Total number of compilations = 4289 (9:4280)
Successfully compiled = 3207
Successfully failed = 1073
Compilation failures = 6
Compilation that did not fail while they should = 3
Total number of runs = 2693 (11:2682)
Successful runs = 2682
Failed runs = 11
Number units compiled = 134
Number program that should not be run = 377
Number of skipped tests = 366
Number of skipped graph tests = 10
Number of skipped interactive tests = 31
Number of skipped known bug tests = 6
Number of skipped tests for other versions = 4
Number of skipped tests for other cpus = 229
Number of skipped tests for other targets = 86

Appear good to me.





Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: FPC 3.0.4 on OSX 10.5.8 PPC does not build ppcppc64 (?)
« Reply #4 on: May 20, 2018, 03:05:28 pm »
@Jonas Maebe
ok, so ppcppc is the standard. Remain the (little)fact that fpc302 (and fpc264, fpc262) get compiled from source as 32 and 64 bit. Probably the make-files specify this, and not from 304.
That is incorrect. The FPC top-level makefile's "make all" target has always only built the same architecture as that of the starting compiler, and the default starting compiler on Mac OS X/PowerPC as shipped by us has always been 32 bit PowerPC (it could become PowerPC64 if you overwrote/override the "fpc" binary with a PowerPC64 version that you compiled yourself, but in that case you would only get a 64 bit version after "make all").

bergquelle

  • Newbie
  • Posts: 4
Re: FPC 3.0.4 on OSX 10.5.8 PPC does not build ppcppc64 (?)
« Reply #5 on: September 30, 2018, 09:19:43 am »
   i build fpc-3.0.4 using fpc-3.0.2 on osx-10.5.8 on a powermac G5 (in the long time effort to keep alive the big alu tower)
fpc 3.0.2 is 32 and 64 bit version (build form source),  but 3.0.4 only the ppcppc was builded.

Hello,

i know this post is a few month old, just found it and registered to reply. i'm in the process of resurrecting my old G4 (MDD), also @ 10.5.8. I would be very interested in Your FPC/Lazarus build for the PowerPC. In my case, 32 Bit is sufficient. Would You mind sharing Your build? Thank You very much!

Best regards,

Christof

mischi

  • Full Member
  • ***
  • Posts: 170
Re: FPC 3.0.4 on OSX 10.5.8 PPC does not build ppcppc64 (?)
« Reply #6 on: September 30, 2018, 11:54:35 am »
Directly available for powerpc-darwin in https://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/ are:

2.6.4, 3.0.0, and 3.0.2.
Version 3.0.4 has not been built. If you really need this, you have to build it from sources. I did not test it recently, but the general rule is to use the previous version as bootstrap compiler, iow. for 3.0.4 you need version 2.6.4. Version 3.0.0 and 3.0.2 may work, but no guarantee.

This is the short version of "How to build fpc with a bootstrap compiler". For more explanations see the FreePascal wiki.

The only thing needed for bootstrapping is the compiler binary, iow. the binary "ppcppc". Place the binary somewhere on the disk and cd into the source directory. The following command will build the compiler, with rtl and all packages:

Code: Text  [Select][+][-]
  1. make all OPT="-ap" CPU_TARGET=powerpc OS_TARGET=darwin PP=PATH_TO_YOUR_BOOTSTRAP/ppcppc

On the powerpc, this will take quite some time.

Actually, I am just clearing up two G4 PowerMacs. One 800 MHz Quicksilver and one Dual 867 MHz Mirror Drive Door. Except for the power supply of the MDD, all parts are functional. Do you need something?

MiSchi

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: FPC 3.0.4 on OSX 10.5.8 PPC does not build ppcppc64 (?)
« Reply #7 on: September 30, 2018, 12:22:01 pm »
Directly available for powerpc-darwin in https://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/ are:

2.6.4, 3.0.0, and 3.0.2.
Version 3.0.4 has not been built.
I don't understand why you say this. There is a "3.0.4" folder in that folder, which contains FPC 3.0.4 for PowerPC.

Edit: ah, no. For some reason it has not been uploaded to sourceforge.  You can download it from the regular mirrors though: https://www.freepascal.org/down/powerpc/macosx-netherlands.var

Edit 2: I've uploaded the PowerPC version to sourceforge.
« Last Edit: September 30, 2018, 12:29:59 pm by Jonas Maebe »

mischi

  • Full Member
  • ***
  • Posts: 170
Re: FPC 3.0.4 on OSX 10.5.8 PPC does not build ppcppc64 (?)
« Reply #8 on: September 30, 2018, 01:38:32 pm »
Thanks Jonas.

bergquelle

  • Newbie
  • Posts: 4
Re: FPC 3.0.4 on OSX 10.5.8 PPC does not build ppcppc64 (?)
« Reply #9 on: October 01, 2018, 10:05:07 am »
Edit 2: I've uploaded the PowerPC version to sourceforge.

Great! Many Thanks! Will try to carve some time out of my schedule this evening to try it.

Best Regards,

Christof

bergquelle

  • Newbie
  • Posts: 4
Re: FPC 3.0.4 on OSX 10.5.8 PPC does not build ppcppc64 (?)
« Reply #10 on: October 01, 2018, 10:08:54 am »
MDD, all parts are functional. Do you need something?

Many thanks for this kind offer (and Your explanations). At the moment my MDD is working properly, with maxed out RAM at 2GB and 1 hard disk for data and one SSD (via a PATA-->SATA adapter for ridiculous low 3 Euros). The SSD works absolutly great, the performance increase was incredible.

bergquelle

  • Newbie
  • Posts: 4
Re: FPC 3.0.4 on OSX 10.5.8 PPC does not build ppcppc64 (?)
« Reply #11 on: October 02, 2018, 09:05:11 am »
Quick Update: a few very short samples compiled and run properly on the MDD, so no obvious signs of trouble.

Best Regards,

Christof

 

TinyPortal © 2005-2018