Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2009-04

Compilation error using FPC 2.2.2 on iMac PowerPC...

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Hi all,
I'm using FreePascal 2.2.2, from 12th April 2009
snapshot to compile my app on a PowerPC iMac running Mac OS X 10.3.9. All my units compile fine, but it fails during the linking phase with the error listed below...

Linking ./YoYo70-powerpc
/usr/bin/ld:
/usr/local/lib/fpc/2.2.2/units/powerpc-darwin/paszlib/zinflate.o stray relocation PPC_RELOC_PAIR entry (36) in section (__TEXT,__text) An error occurred while linking
Error: Error while linking
Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted
Error: /usr/local/bin/ppcppc returned an error exitcode (normal if you did not specify a source file to be compiled)

Does anyone have any suggestions as to how i can get around this problem? What is a "stray relocation" for future reference?

Also I was hoping to be able to build FPC from SVN, but the only SVN *.dmg file I found on the internet, would not install correctly on 10.3.9. Does anyone have a link that they know works on 10.3.9? I have XCode installed in case I need to build anything.

I copied a SVN version of the the code from my Intel MacBook to the iMac and tried to build it from scratch but it give the following errors... system.pp:126894:Complex expression. Absolute segment assumed. system.pp:126899:Complex expression. Absolute segment assumed. system.pp:126904:Complex expression. Absolute segment assumed. system.pp:126911:unknown section attribute: debug
system.pp:217537:unknown section attribute: debug
Error: Error while assembling exitcode 1
Fatal: There were 2 errors compiling module, stopping Fatal: Compilation aborted
Error: /usr/local/bin/ppcppc returned an error exitcode (normal if you did not specify a source file to be compiled)
make[7]: *** [system.ppu] Error 1
make[6]: *** [darwin_all] Error 2
make[5]: *** [rtl] Error 2
make[4]: *** [next] Error 2
make[3]: *** [ppc1] Error 2
make[2]: *** [cycle] Error 2
make[1]: *** [compiler_cycle] Error 2
make: *** [build-stamp.powerpc-darwin] Error 2

Actually there are LOADS of "system.pp:126894:Complex expression. Absolute segment assumed." like messages before build stops. That same SVN code compiles without any issues on the Intel MacBook and you don't get the "Absolute segment assumed" messages either.

Would I be right in thinking that if I can get fpc and the rest of the rtl compiling under 10.3.9, that my app shoud then compile correctly?

Thanks,

Dominique.

Reply by email

Jonas Maebe
to Unknown author

On 13 Apr 2009, at 20:36, <

Show quoted text 22 lines
wrote: I'm using FreePascal 2.2.2, from 12th April 2009 snapshot to compile my app on a PowerPC iMac running Mac OS X 10.3.9. All my units compile fine, but it fails during the linking phase with the error listed below... Linking ./YoYo70-powerpc /usr/bin/ld: /usr/local/lib/fpc/2.2.2/units/powerpc-darwin/paszlib/zinflate.o stray relocation PPC_RELOC_PAIR entry (36) in section (__TEXT,__text) An error occurred while linking Error: Error while linking Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted Error: /usr/local/bin/ppcppc returned an error exitcode (normal if you did not specify a source file to be compiled) Does anyone have any suggestions as to how i can get around this problem?

Which Xcode version do you have installed on the iMac? And why are you compiling on a 10.3.9 machine? (although it should still work) You can very easily cross-compile a program for another Mac OS X version on Mac OS X: http://wiki.freepascal.org/OS_X_Programming_Tips#Compiling_under_10.5_for_10.4_and_below (have a look under /Developer/SDKs to see the names of other SDKs, and note that the 10.3.9 SDK is not installed by default by Xcode 3.x, so you may have to run the installer again and explicitly mark its checkbox).

What is a "stray relocation" for future reference?

This cannot be explained without going into detail about how linkers work, and the specifics of the PowerPC architecture. I don't have time for that right now.

Also I was hoping to be able to build FPC from SVN, but the only SVN *.dmg file I found on the internet, would not install correctly on 10.3.9.

What does "would not install correctly" mean? Please, always mention the specifics.

Show quoted text 7 lines
Does anyone have a link that they know works on 10.3.9? I have XCode installed in case I need to build anything. I copied a SVN version of the the code from my Intel MacBook to the iMac and tried to build it from scratch but it give the following errors... system.pp:126894:Complex expression. Absolute segment assumed.

That problem should have been fixed in 2.2.2: http://bugs.freepascal.org/view.php?id=10541

I'm not sure why you would nevertheless get such errors, unless you are trying to compile using DWARF debug information (which was not yet properly supported by Xcode 1.5).

Jonas

Reply by email