Sign in Join

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

Mailing lists / fpc-pascal / 2007-05

i386-darwin -> powerpc-darwin crash

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Vincent Snijders

Hi,

I tried to create powerpc units for the lcl on an intelmac, but the compiler crashes. Is this a known issue?

Vincent

Schindlers-iMac:~/src/lazarus/lcl fpcfan$ make CPU_TARGET=powerpc FPC=~/fpc/bin/fpc
/bin/rm -f units/powerpc-darwin/alllclunits.ppu
/bin/mkdir -p units/powerpc-darwin
/Users/fpcfan/fpc/bin/fpc -gl -Fu. -Funonwin32 -Fuforms -Fuwidgetset -Fiinclude -FE. -FUunits/powerpc-darwin -dpowerpc alllclunits.pp Free Pascal Compiler version 2.1.5 [2007/05/09] for powerpc Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Darwin for PowerPC
Compiling alllclunits.pp
Fatal: Compilation aborted
An unhandled exception occurred at $0004A35C :
EListError : List count too large (252444672)
$0004A35C

Error: /Users/fpcfan/fpc/bin/ppcppc returned an error exitcode (normal if you did not specify a source file to be compiled) make: *** [alllclunits.ppu] Error 1

Jonas Maebe
to Vincent Snijders
Vincent Snijders wrote
I tried to create powerpc units for the lcl on an intelmac, but the compiler crashes. Is this a known issue?

The compiler is trying to use RTL/packages units compiled by a native ppc compiler (most likely the ones globally installed on the system). Those cannot be used by a little->big endian cross compiler. Try instead something like this:

make OPT="-n -Fu~/fpcinst/usr/local/lib/fpc/2.1.4/units/powerpc- darwin/* -O2 -vei -ap" FPC=~/fpcinst/usr/local/lib/fpc/2.1.4/ppcppc clean all

(-n to prevent the compiler loading the global config files)

Jonas

PS: note that if you're doing this on mischi's iMac, it won't work when linking:
/usr/bin/powerpc-darwin-ld: warning /sw/lib//libglib-1.2.0.dylib cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded)
/usr/bin/powerpc-darwin-ld: warning /sw/lib//libgdk-1.2.0.dylib cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded)
/usr/bin/powerpc-darwin-ld: warning /sw/lib//libgtk-1.2.0.dylib cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded)
/usr/bin/powerpc-darwin-ld: warning /sw/lib//libgdk_pixbuf.dylib cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded)

(i.e., only the i386 versions of those libraries are installed on the system)

Vincent Snijders
to Jonas Maebe
Jonas Maebe wrote 13 lines
On 09 May 2007, at 19:59, Vincent Snijders wrote: > I tried to create powerpc units for the lcl on an intelmac, but the > compiler crashes. Is this a known issue? The compiler is trying to use RTL/packages units compiled by a native ppc compiler (most likely the ones globally installed on the system). Those cannot be used by a little->big endian cross compiler. Try instead something like this: make OPT="-n -Fu~/fpcinst/usr/local/lib/fpc/2.1.4/units/powerpc-darwin/* -O2 -vei -ap" FPC=~/fpcinst/usr/local/lib/fpc/2.1.4/ppcppc clean all

Thanks for guiding me in the right direction. What actually happened is that I created a native powerpc compiler (because I had set crossinstall=1 on the make all command) and used that native compiler to create my units. Now I am using the ppcrossppc (renamed to ppcppc) and things are working.

Show quoted text 6 lines
PS: note that if you're doing this on mischi's iMac, it won't work when linking: /usr/bin/powerpc-darwin-ld: warning /sw/lib//libglib-1.2.0.dylib cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded)

That is not a problem, because I only provide lcl and related compiled units. This should be enough for people who have the right libraries to cross compile their applications. It does mean of course, I cannot test it.

Vincent