I installed the x86 version of the Mac OS X kernel (Darwin 7.2.1) on a PC and I am now trying to build GPC-20050331 with gcc-3.3.6 for i686-apple-darwin. I checked that the C compiler bootstraps. The Pascal build stops at heap.pas:38 with the message error.gpi must be recompiled. An rts makefile problem ?
I can provide more information as needed.
Regards,
Adriaan van Os
Adriaan van Os wrote:
I installed the x86 version of the Mac OS X kernel (Darwin 7.2.1) on a PC and I am now trying to build GPC-20050331 with gcc-3.3.6 for i686-apple-darwin. I checked that the C compiler bootstraps. The Pascal build stops at heap.pas:38 with the message error.gpi must be recompiled. An rts makefile problem ?
Perhaps, though I thought this had been fixed in 20050331. Do you do a `make bootstrap'? (Just asking, because I haven't tested this.)
Anyway, are there any of those files in the build gcc/p/rts directory (at the beginning of the stage)?
*.o *.lo *.gpi *.gpd stamp-error-gpi
Or just try to remove those files and continue building.
Frank
Frank Heckenbach wrote:
Adriaan van Os wrote:
I installed the x86 version of the Mac OS X kernel (Darwin 7.2.1) on a PC and I am now trying to build GPC-20050331 with gcc-3.3.6 for i686-apple-darwin. I checked that the C compiler bootstraps. The Pascal build stops at heap.pas:38 with the message error.gpi must be recompiled. An rts makefile problem ?
Perhaps, though I thought this had been fixed in 20050331. Do you do a `make bootstrap'? (Just asking, because I haven't tested this.)
No, I bootstrapped an FSF GCC-3.3.6 C compiler first. However, I remember I then typed "make -j3" to build GPC. Could the -j3 have been the problem ?
Anyway, are there any of those files in the build gcc/p/rts directory (at the beginning of the stage)?
*.o *.lo *.gpi *.gpd stamp-error-gpi
Or just try to remove those files and continue building.
That works ! Great ! Seems like we have a working GPC compiler for Mac on Intel. This surpasses my expectations ! I will post the results of the testsuite.
Regards,
Adriaan van Os
Adriaan van Os wrote:
Frank Heckenbach wrote:
Adriaan van Os wrote:
I installed the x86 version of the Mac OS X kernel (Darwin 7.2.1) on a PC and I am now trying to build GPC-20050331 with gcc-3.3.6 for i686-apple-darwin. I checked that the C compiler bootstraps. The Pascal build stops at heap.pas:38 with the message error.gpi must be recompiled. An rts makefile problem ?
Perhaps, though I thought this had been fixed in 20050331. Do you do a `make bootstrap'? (Just asking, because I haven't tested this.)
No, I bootstrapped an FSF GCC-3.3.6 C compiler first. However, I remember I then typed "make -j3" to build GPC. Could the -j3 have been the problem ?
Yes, there was a recent report by Russell Whitaker about this (though it failed much earlier for him). Unfortunately, this is not fixed yet. For now, please don't use `-j' when building GPC.
Anyway, are there any of those files in the build gcc/p/rts directory (at the beginning of the stage)?
*.o *.lo *.gpi *.gpd stamp-error-gpi
Or just try to remove those files and continue building.
That works ! Great ! Seems like we have a working GPC compiler for Mac on Intel. This surpasses my expectations ! I will post the results of the testsuite.
Sounds good. (Though given that Darwin/* and */Intel worked before, there were reasonable chances. :-)
Frank
The results of the testsuite of gpc-20050331 with gcc-3.3.6 on i686-apple-darwin
UNSUPPORTED: agettext2test.pas UNSUPPORTED: agettexttest.pas UNSUPPORTED: aregextest.pas UNSUPPORTED: asmtest.pas resize: max chain len 31, new table size 8192 FAIL: emil9.pas FAIL: fjf1021d.pas FAIL: fjf1021h.pas FAIL: fjf1021i.pas FAIL: fjf1021j.pas FAIL: fjf1021k.pas UNSUPPORTED: fjf165a.pas FAIL: fjf219e.pas FAIL: fjf219f.pas FAIL: fjf219g.pas FAIL: fjf219h.pas FAIL: fjf512.pas FAIL: fjf558m.pas FAIL: fjf558n.pas FAIL: fjf558o.pas FAIL: fjf558p.pas FAIL: fproc.pas UNSUPPORTED: gmptest.pas FAIL: goto4.pas FAIL: goto5.pas FAIL: knuth3.pas UNSUPPORTED: longr2.pas FAIL: math.pas FAIL: mir047h.pas FAIL: nlgpp2.pas FAIL: nonloc2goto.pas FAIL: nonloc3goto.pas FAIL: nonlocgoto.pas FAIL: systemtest.pas FAIL: waldek8.pas
Using --longjmp-all-nonlocal-labels doesn't work around any of the above failures. Instead, it causes the following tests to fail also
FAIL: fjf1062a.pas FAIL: fjf1062b.pas FAIL: fjf988f.pas FAIL: fjf988j.pas FAIL: fjf988k.pas
Regards,
Adriaan van Os
Adriaan van Os wrote:
The results of the testsuite of gpc-20050331 with gcc-3.3.6 on i686-apple-darwin
The results look bad. However, it looks that Darwin uses -fPIC by default. On i386-linux with gcc-3.3.6 using -fPIC I also get multiple failures. With gcc-3.4.4 using -fPIC only one of those failure remain (asmtest.pas) and it is really problem with test program. So, maybe you should test with gcc-3.4.[34].
I wrote:
Adriaan van Os wrote:
The results of the testsuite of gpc-20050331 with gcc-3.3.6 on i686-apple-darwin
The results look bad. However, it looks that Darwin uses -fPIC by default. On i386-linux with gcc-3.3.6 using -fPIC I also get multiple failures. With gcc-3.4.4 using -fPIC only one of those failure remain (asmtest.pas) and it is really problem with test program. So, maybe you should test with gcc-3.4.[34].
On Linux this is due to binutils (assembler) bug, see:
(I tested with Debian binutils 2.12.90.0.1). According to GCC doc binutils 2.13.1 fixed the problem. I am not sure why gcc-3.4.4 do not have the same problem.
Waldek Hebisch wrote:
Adriaan van Os wrote:
The results of the testsuite of gpc-20050331 with gcc-3.3.6 on i686-apple-darwin
The results look bad. However, it looks that Darwin uses -fPIC by default. On i386-linux with gcc-3.3.6 using -fPIC I also get multiple failures. With gcc-3.4.4 using -fPIC only one of those failure remain (asmtest.pas) and it is really problem with test program. So, maybe you should test with gcc-3.4.[34].
I started with gcc-3.4.3, but there are multiple bootstrap problems with gcc-3.4.x on i686-apple-darwin (gcc-4.0 and gcc-3.3.x do bootstrap).
On Linux this is due to binutils (assembler) bug, see:
(I tested with Debian binutils 2.12.90.0.1). According to GCC doc binutils 2.13.1 fixed the problem. I am not sure why gcc-3.4.4 do not have the same problem.
Thanks for the suggestions. I will build more recent cctools and try again.
There may be more than one problem (although possibly there is a common cause).
1. (output is long list with real numbers) emil9.pas
2. Assembler fails with "Symbol Lx$pb already defined" fjf219x.pas goto4.pas knuth3.pas math.pas mir047h.pas nonloc2goto.pas nonloc3goto.pas nonlocgoto.pas waldek8.pas
3. Segfault nlgpp2.pas fproc.pas
4. Illegal instruction goto5.pas fjf558x.pas
Regards,
Adriaan van Os
Waldek Hebisch wrote:
Adriaan van Os wrote:
The results of the testsuite of gpc-20050331 with gcc-3.3.6 on i686-apple-darwin
The results look bad. However, it looks that Darwin uses -fPIC by default. On i386-linux with gcc-3.3.6 using -fPIC I also get multiple failures. With gcc-3.4.4 using -fPIC only one of those failure remain (asmtest.pas) and it is really problem with test program. So, maybe you should test with gcc-3.4.[34].
I started with gcc-3.4.3, but there are multiple bootstrap problems with gcc-3.4.x on i686-apple-darwin (gcc-4.0 and gcc-3.3.x do bootstrap).
On Linux this is due to binutils (assembler) bug, see:
(I tested with Debian binutils 2.12.90.0.1). According to GCC doc binutils 2.13.1 fixed the problem. I am not sure why gcc-3.4.4 do not have the same problem.
Thanks for the suggestions. I will build more recent cctools and try again.
There may be more than one problem (although possibly there is a common cause).
- (output is long list with real numbers)
emil9.pas
- Assembler fails with "Symbol Lx$pb already defined"
fjf219x.pas goto4.pas knuth3.pas math.pas mir047h.pas nonloc2goto.pas nonloc3goto.pas nonlocgoto.pas waldek8.pas
- Segfault
nlgpp2.pas fproc.pas
- Illegal instruction
goto5.pas fjf558x.pas
You were quite right about -fPIC. All the failures, except emil9.pas disappear with -fno-pic. However, many of the other tests fail with -fno-pic, because the option disables dynamic linking on Mac OS X. The PPC back-end has a workaround (-mdynamic-no-pic) but that doesn't seem to work for i686-apple-darwin.
Updating the linker and assembler to odcctools-20050327 had no effect on testsuite results.
So, I must either - find a backport of i686-apple-darwin PIC fixes - find a solution for gcc-3.4 bootstrap problems - wait for gcc-4.0 support.
Still, I am glad with the results so far.
Regards,
Adriaan van Os
Adriaan van Os wrote:
Waldek Hebisch wrote:
Adriaan van Os wrote:
- (output is long list with real numbers)
emil9.pas
- Assembler fails with "Symbol Lx$pb already defined"
fjf219x.pas goto4.pas knuth3.pas math.pas mir047h.pas nonloc2goto.pas nonloc3goto.pas nonlocgoto.pas waldek8.pas
- Segfault
nlgpp2.pas fproc.pas
- Illegal instruction
goto5.pas fjf558x.pas
You were quite right about -fPIC. All the failures, except emil9.pas disappear with -fno-pic. However, many of the other tests fail with -fno-pic, because the option disables dynamic linking on Mac OS X. The PPC back-end has a workaround (-mdynamic-no-pic) but that doesn't seem to work for i686-apple-darwin.
Updating the linker and assembler to odcctools-20050327 had no effect on testsuite results.
So, I must either
- find a backport of i686-apple-darwin PIC fixes
- find a solution for gcc-3.4 bootstrap problems
- wait for gcc-4.0 support.
I just tried to build 4.0 based cross-compiler targeting i686-apple-darwin. ATM this does not work, but was enough to check that problem 2. (duplicate labels in PIC code) is still present...