[fpc-devel] Problems with building x86_64 on darwin
Jonas Maebe
jonas.maebe at elis.ugent.be
Mon Nov 25 21:56:04 CET 2013
On 25 Nov 2013, at 21:28, Andrew Brunner wrote:
> I've got darwin Mac OS 10.9 running fpc 2.6.2 installed and compiling from the downloads section of the site.
> I'm trying with no success to get 2.7.1 to compile ppcx64 with /usr/local/bin/fpc ->/usr/local/lib/fpc/2.6.2/ppcx64
First of all, reinstall FPC so that /usr/local/bin/fpc is valid again. "fpc" is an independent program and can never be a symbolic link to a compiler binary. It supports parameters that the compiler binaries do not support. You cannot overwrite it with a symbolic link.
> --------- FPC BUILD PROBLEMS------------
> Trying to build my svn/fpc/trunk version
>
> make all OPT="-O-" DEBUG=1 OS_TARGET=darwin CPU_TARGET=x86_64 PP=/usr/local/lib/fpc/2.6.2/ppcx64
>
> /usr/local/lib/fpc/2.6.2/ppcx64 -dNOMOUSE -Ur -dFPC_USE_LIBC -gl -Ur -Xs -O2 -n -Fi../inc -Fi../i386 -Fi../unix -Fi../bsd -Fi../bsd/i386 -Fi../darwin/i386 -FE. -FU/Developer/FPC/rtl/units/i386-darwin -O- -di386 -dDEBUG -dRELEASE -Us -Sg ../bsd/system.pp
> system.inc(171,4) Fatal: Can't open include file "x86_64.inc"
> Fatal: Compilation aborted
> make[5]: *** [system.ppu]
>
> ------------Lazarus Build Problems------------
That's because ppcx64 on Mac OS X is an i386->x86-64 cross-compiler and the Makefiles are not designed for bootstrapping with cross-compilers. You can work around it by adding CPU_SOURCE=x86_64, but you can just as well build a new cross-compiler.
> Trying to build my svn/lazarus/trunk verison
>
> Much compiles but linking fails towards the end with error:
>
> Compiling resource ../units/x86_64-darwin/nogui/lazbuild.or
> Linking ../lazbuild
> Undefined symbols for architecture x86_64:
> "_LSOpenCFURLRef", referenced from:
> _LCLINTF_OPENURL$ANSISTRING$$BOOLEAN in lclintf.o
> ld: symbol(s) not found for architecture x86_64
> An error occurred while linking
> lazbuild.lpr(1629) Error: Error while linking
> lazbuild.lpr(1629) Fatal: There were 1 errors compiling module, stopping
> Fatal: Compilation aborted
> make[2]: *** [lazbuild] Error 1
> make[1]: *** [lazbuilder] Error 2
> make: *** [lazbuild] Error 2
>
> Any thoughts would be greatly appreciated.
Lazarus cannot yet be compiled for x86-64 on Mac OS X (except if you compile it for GTK or Qt, possibly). Unless you are editing files that are larger than 1.5GB, it's unlikely you'd notice any difference either.
Jonas
More information about the fpc-devel
mailing list