[fpc-pascal] OSX x86_64 make problem
jonas.maebe at elis.ugent.be
Fri Jan 16 23:06:54 CET 2015
On 16/01/15 22:08, Anthony Walter wrote:
> Details: The problem I am having is that even on a 64bit Mac, the "make
> all" command builds i386-darwin. When I try to "make crossinstall
> OS_TARGET=darwin CPU_TARGET=x86_64
> INSTALL_PREFIX=/Users/macuser/Development/Base/fpc" the make command
> returns success, but no ppcx64 is ever created.
It will install a file called ppcrossx64. My own build script renames it
to ppcx64 after "make install" (and before building the installer
package). The reason the default is ppcrossx64, is because otherwise
inside the compiler dir the built native compiler would overwrite the
built cross-compiler, and installing both into the same prefix would not
be possible either.
However, there is no reason on Darwin to use different name for native
and for cross-compilers (you can combine both into a fat binary, if you
absolutely want two versions), and always using the same name makes it
easier for scripts to call the compiler using a fixed name.
> When I compile with 'fpc -Px86_64 hello.pas' i get the error:
> Fatal: Compilation aborted
> Error: /usr/local/bin/ppcx64 returned an error exitcode
> macuser at macpc~/Development/Base/test$ /bin/sh: x86_64-darwin-as: command
> not found
> Which tells fpc fell back to the 2.6.4 complier
That error says that some program cannot find a cross-assembler, which
is a message emitted by a compiler binary (not by the "fpc" utility).
That message is not specific to either FPC 2.6.4 or to 3.x.
It suggests that the compiler is not using the default /etc/fpc.cfg
configuration file, or an otherwise custom fpc.cfg file that does not
contain the necessary ifdefs to prevents a cross-compiling prefix from
being added to the assembler and linker when targeting Darwin (any
architecture) from a Darwin (any architecture) system.
More information about the fpc-pascal