steven.borley wrote:
Adriaan,
I posted this (see below) to the gpc list yesterday, but it never appeared (I don't know why), so my apologies for the direct approach.
I was hoping you could help my in using the MacOSX update. It looks like I have a linker problem. Possibly because you've used XCode v2.0 tools in generating the library files??
No -- and there is no such thing like "XCode v2.0 tools". Apple's marketing department acts as if it invented the "gcc" compiler, the "as" assembler and the "ld" linker as part of XCode, but that is far from the truth. Apple's gcc compiler and as assembler are hacked versions of software of the Free Software Foundation (http://www.gnu.org/).
And ... you must sign a non-disclosure agreement to use them, since they are part of "Tiger" - very amusing.
Is there any way around this other than recompiling from source myself? I don't wish to use the cctools you've supplied for fear they'll break my v1.5 XCode Tools installation.
To the best of my knowledge they won't (and you can always reinstall the so-called XCode tools).
Any suggestions?
Maybe I used a "too new" assembler and linker to build the binaries ? Has someone else experienced the same problem ? Did installing the latest cctools from my website solve the problem ?
Regards, Steven
Begin forwarded message:
From: steven.borley steven.borley@virgin.net Date: 15 February 2005 18:56:56 GMT To: gpc@gnu.de Subject: Re: Update for Mac OS X
Adriaan,
Thank you for the Mac OS X update.
However, I'm having problems using it.
I have upgraded from gpc332d1 to gpc343d6, upgraded GPC Interfaces to 1.07 (from D to E) from the microbizz site. I did not take the cctools as I reasoned that I have the most up-to-date version already from Apple (November 2004 gcc 3.3 Updater).
Obviously not (see below).
Trying to compile my simple Hello World program I get...
[mirror-doors:~/src/pascal/hello] steven% gpc hello.pas /usr/bin/ld: /Developer/Pascal/gpc343d6/lib/gcc/powerpc-apple-darwin7/3.4.3/ libgpc.a(error.o) r_type field of relocation entry 709 in section (__TEXT,__text) invalid /usr/bin/ld: /Developer/Pascal/gpc343d6/lib/gcc/powerpc-apple-darwin7/3.4.3/ libgpc.a(error.o) stray relocation PPC_RELOC_PAIR entry (710) in section (__TEXT,__text) /usr/bin/ld: /Developer/Pascal/gpc343d6/lib/gcc/powerpc-apple-darwin7/3.4.3/ libgpc.a(error.o) r_type field of relocation entry 711 in section (__TEXT,__text) invalid /usr/bin/ld: /Developer/Pascal/gpc343d6/lib/gcc/powerpc-apple-darwin7/3.4.3/ libgpc.a(error.o) stray relocation PPC_RELOC_PAIR entry (712) in section (__TEXT,__text)
[...snip... another 300 lines or so...]
/usr/bin/ld: /Developer/Pascal/gpc343d6/lib/gcc/powerpc-apple-darwin7/3.4.3/ libgcc.a(_moddi3.o) r_type field of relocation entry 0 in section (__TEXT,__eh_frame) invalid /usr/bin/ld: /Developer/Pascal/gpc343d6/lib/gcc/powerpc-apple-darwin7/3.4.3/ libgcc.a(_moddi3.o) stray relocation PPC_RELOC_PAIR entry (1) in section (__TEXT,__eh_frame) collect2: ld returned 1 exit status
What am I doing wrong?
Is this because the cctools on microbizz are actually newer than the official Apple release (i.e. not-pre-release). If so what do these newer tools do for me? I was reluctant to upgrade as Pascal is only a small part of my compiling work and I could find no release notes or mention of this update on the Apple Developer Connect site. Also, if these tools are from XCode 2.0 pre-release, will they break my XCode v1.5 installation?
More info:
Max OSX 10.3.8
XCode Tools v1.5
[mirror-doors:~/src/pascal/hello] steven% ld -v Apple Computer, Inc. version cctools-525.1.obj~8
Ah, that version is much older than the "Apple Computer, Inc. version cctools-528.5~obj" on my website.
hello.pas contains program hello; var i : integer; begin for i := 1 to 5 do writeln('Hello, World!'); end.
Regards, Steven
Regards,
Adriaan van Os
Adriaan,
Thanks for the reply.
On 16 Feb 2005, at 19:51, Adriaan van Os wrote:
steven.borley wrote:
Adriaan,
I posted this (see below) to the gpc list yesterday, but it never appeared (I don't know why), so my apologies for the direct approach.
Thank you for posting this for me.
I was hoping you could help my in using the MacOSX update. It looks like I have a linker problem. Possibly because you've used XCode v2.0 tools in generating the library files??
No -- and there is no such thing like "XCode v2.0 tools". Apple's marketing department acts as if it invented the "gcc" compiler, the "as" assembler and the "ld" linker as part of XCode, but that is far from the truth. Apple's gcc compiler and as assembler are hacked versions of software of the Free Software Foundation (http://www.gnu.org/).
Obvious touched a sore point there, Adriaan. Only meant to say that I was worried that I'd have an incompatibility problem using bits from different packages. I'm not an expert on what constitutes the XCode package and which bits of it come in the cctool package (and now I'm now not even sure if cctools can be considered 'part of' XCode).
And ... you must sign a non-disclosure agreement to use them, since they are part of "Tiger" - very amusing.
And $500 to be a 'Select' member so you can get Tiger, don't forget (unless you know something I don't).
There's a exclusion in the T*Cs for third part stuff etc., like the GPL, in the agreement, but I get your point.
Is there any way around this other than recompiling from source myself? I don't wish to use the cctools you've supplied for fear they'll break my v1.5 XCode Tools installation.
They have not broken XCode :-) See below.
To the best of my knowledge they won't (and you can always reinstall the so-called XCode tools).
I took the plunge and install the cctools from your website.
The problem with gpc is now no more. It all compiles and links without a hitch.
Also, my fear that it would break XCode was unfounded it seems. I've been able to compile and link several C and Objective-C programs both from within XCode and from the command line without issue.
Should I check anything else to confirm XCode and GCC is all okay? Or am I just paranoid?
Any suggestions?
Maybe I used a "too new" assembler and linker to build the binaries ? Has someone else experienced the same problem ? Did installing the latest cctools from my website solve the problem ?
I think perhaps you ought to have just used the version that's available from the Apple Site, rather than force a dependence on such a new version of cctools.
However, it all seems okay for me at the moment. And there's no way I could have build the Mac OS X version of GPC from scratch, so I'm much indebted to you. Thank you, Adriaan.
Regards, Steven
Begin forwarded message:
From: steven.borley steven.borley@virgin.net Date: 15 February 2005 18:56:56 GMT To: gpc@gnu.de Subject: Re: Update for Mac OS X
Adriaan,
Thank you for the Mac OS X update.
However, I'm having problems using it.
I have upgraded from gpc332d1 to gpc343d6, upgraded GPC Interfaces to 1.07 (from D to E) from the microbizz site. I did not take the cctools as I reasoned that I have the most up-to-date version already from Apple (November 2004 gcc 3.3 Updater).
Obviously not (see below).
Trying to compile my simple Hello World program I get...
[mirror-doors:~/src/pascal/hello] steven% gpc hello.pas /usr/bin/ld: /Developer/Pascal/gpc343d6/lib/gcc/powerpc-apple-darwin7/3.4.3/ libgpc.a(error.o) r_type field of relocation entry 709 in section (__TEXT,__text) invalid /usr/bin/ld: /Developer/Pascal/gpc343d6/lib/gcc/powerpc-apple-darwin7/3.4.3/ libgpc.a(error.o) stray relocation PPC_RELOC_PAIR entry (710) in section (__TEXT,__text) /usr/bin/ld: /Developer/Pascal/gpc343d6/lib/gcc/powerpc-apple-darwin7/3.4.3/ libgpc.a(error.o) r_type field of relocation entry 711 in section (__TEXT,__text) invalid /usr/bin/ld: /Developer/Pascal/gpc343d6/lib/gcc/powerpc-apple-darwin7/3.4.3/ libgpc.a(error.o) stray relocation PPC_RELOC_PAIR entry (712) in section (__TEXT,__text)
[...snip... another 300 lines or so...]
/usr/bin/ld: /Developer/Pascal/gpc343d6/lib/gcc/powerpc-apple-darwin7/3.4.3/ libgcc.a(_moddi3.o) r_type field of relocation entry 0 in section (__TEXT,__eh_frame) invalid /usr/bin/ld: /Developer/Pascal/gpc343d6/lib/gcc/powerpc-apple-darwin7/3.4.3/ libgcc.a(_moddi3.o) stray relocation PPC_RELOC_PAIR entry (1) in section (__TEXT,__eh_frame) collect2: ld returned 1 exit status
What am I doing wrong?
Is this because the cctools on microbizz are actually newer than the official Apple release (i.e. not-pre-release). If so what do these newer tools do for me? I was reluctant to upgrade as Pascal is only a small part of my compiling work and I could find no release notes or mention of this update on the Apple Developer Connect site. Also, if these tools are from XCode 2.0 pre-release, will they break my XCode v1.5 installation?
More info:
Max OSX 10.3.8
XCode Tools v1.5
[mirror-doors:~/src/pascal/hello] steven% ld -v Apple Computer, Inc. version cctools-525.1.obj~8
Ah, that version is much older than the "Apple Computer, Inc. version cctools-528.5~obj" on my website.
hello.pas contains program hello; var i : integer; begin for i := 1 to 5 do writeln('Hello, World!'); end.
Regards, Steven
Regards,
Adriaan van Os
Regards, Steven
steven.borley wrote:
Obvious touched a sore point there, Adriaan. Only meant to say that I was worried that I'd have an incompatibility problem using bits from different packages. I'm not an expert on what constitutes the XCode package and which bits of it come in the cctool package (and now I'm now not even sure if cctools can be considered 'part of' XCode).
I understand.
And ... you must sign a non-disclosure agreement to use them, since they are part of "Tiger" - very amusing.
And $500 to be a 'Select' member so you can get Tiger, don't forget (unless you know something I don't).
The most interesting part of Tiger is 64-bit applications. Since these 64-bit applications will be non-GUI for a long time to come, you can as well test them with 64-bit Darwin and download that from http://www.opensource.apple.com/darwinsource/ including the gcc compiler needed. The assembler you installed, already supports 64-bit.
I think perhaps you ought to have just used the version that's available from the Apple Site, rather than force a dependence on such a new version of cctools.
Yes, if I find the time, I will build a new binary package. Thanks for reporting this.
Regards,
Adriaan van Os
I wrote:
I think perhaps you ought to have just used the version that's available from the Apple Site, rather than force a dependence on such a new version of cctools.
Yes, if I find the time, I will build a new binary package. Thanks for reporting this.
I tried that now, but it turns out that using an older version of cctools for the binary package doesn't help. The real problem is that the version of cctools that Apple distributes with XCode 1.5 is too old for the gcc-3.4 backend that we are using now for gpc on Mac OS X. The XCode 1.5 distribution is still based on gcc-3.3, an older version of gcc. I assume Apple is too busy with "Tiger" to bother updating its XCode distribution.
I will keep the gpc binary package as is, to be used with the new assembler and linker.
Regards,
Adriaan van Os