Sign in Join

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

Mailing lists / fpc-pascal / 2007-08

Installation/Compilation of FPC for Darwin 8.0 (x86)

7 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Werner Bochtler

Maybe a stupid problem:

I have a running installation of Darwin 8.0 (x86) in a virtual machine (vmware). Can anyone give me some hints how to install the current snapshot of FPC in this environment. I was not able to locate a working FPC 2.0 binary for Darwin (x86) to compile the current compiler sources.

Many thanks in advance,
Werner

Jonas Maebe
to Werner Bochtler
Werner Bochtler wrote 6 lines
I have a running installation of Darwin 8.0 (x86) in a virtual machine (vmware). Can anyone give me some hints how to install the current snapshot of FPC in this environment. I was not able to locate a working FPC 2.0 binary for Darwin (x86) to compile the current compiler sources.

ftp://ftpmaster.freepascal.org/fpc/beta/2.1.4/source/ fpc-2.1.4.universal-darwin.bootstrap.tar.bz2

Jonas

Werner Bochtler
to Jonas Maebe
Show quoted text 17 lines
On 24 Aug 2007, at 08:31, Werner Bochtler wrote: > I have a running installation of Darwin 8.0 (x86) in a virtual machine > (vmware). Can anyone give me some hints how to install the current > snapshot of FPC in this environment. I was not able to locate a working > FPC 2.0 binary for Darwin (x86) to compile the current compiler sources. ftp://ftpmaster.freepascal.org/fpc/beta/2.1.4/source/fpc-2.1.4.universal-darwin.bootstrap.tar.bz2 Jonas _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Many thanks for this link.

Unfortunately 'ppcuniversal -h' raises the following error message on my darwin 8.0.1 x86 machine:

/bin/ppcuniversal: Bad executable (or shared library)

Any ideas what's going wrong?

Many thanks in advance,
Werner

Jonas Maebe
to Werner Bochtler
Werner Bochtler wrote 9 lines
Many thanks for this link. Unfortunately 'ppcuniversal -h' raises the following error message on my darwin 8.0.1 x86 machine: /bin/ppcuniversal: Bad executable (or shared library) Any ideas what's going wrong?

Maybe plain darwin doesn't support universal binaries (although that would be strange, since multi-arch support is a basic feature of the mach-o format). If you have lipo available, you can try to use it to extract the i386 binary.

Jonas

Werner Bochtler
to Jonas Maebe
Show quoted text 16 lines
On 27 Aug 2007, at 08:35, Werner Bochtler wrote: > Many thanks for this link. > > Unfortunately 'ppcuniversal -h' raises the following error message on my > darwin 8.0.1 x86 machine: > > /bin/ppcuniversal: Bad executable (or shared library) > > Any ideas what's going wrong? Maybe plain darwin doesn't support universal binaries (although that would be strange, since multi-arch support is a basic feature of the mach-o format). If you have lipo available, you can try to use it to extract the i386 binary.

Hi Jonas,

I have extracted the i386 binary as recommended:

lipo ppcuniversal -extract i386 -output ppc386

Unfortunately <ppc386 -h> gives the same error message :-(

/bin/ppc386: Bad executable (or shared library)

Best regards,
Werner

Werner Bochtler
to Jonas Maebe
You probably need a newer version of darwin/x86: http://lists.apple.com/archives/darwin-x86/2007/Jul/msg00015.html

I have updated the kernel, clib and gcc:

-> Darwin Kernel Version 8.9.0: root:xnu-792.17.14/BUILD/obj/RELEASE_I386

The problem is the same:
/bin/ppcuniversal: Bad executable (or shared library)

----

Therefore I have tried to build a new compiler via cross compilation (linux -> darwin):

1. I have downloaded odcctools from
<http://biolpc22.york.ac.uk/pub/linux-mac-cross/>

2. I have unpacked odcctools-20060413-gcc-5247-bin.tar.bz2

3. I have included the folder /opt/mac/bin to the search path

4. I have tried to compile fpc as follows:

make OS_TARGET=darwin all BINUTILSPREFIX=i686-apple-darwin8- OPT="-Xd -Fl$HOME/odcctools/opt/mac/lib"

The following files are reported as missing:

libc.dylib
crt1.o

After copying these files from the darwin machine to the linux machine I was able to built fpc.

Unfortunately the generated ppc386 still does not work on the darwin machine.

'file ppc386' gives "ppc386: Mach-0 executable i386"

but

'ppc386 -h' gives "Illegal instruction"

Any ideas what's going wrong here?

Has anyone ever make FPC running on a pure darwin (not Mac OS X!) installation?

Many thanks in advance,

Werner