[fpc-devel] MacOS Mojave beta - crt1.o not installed to /usr/lib
Michael Ring
mail at michael-ring.org
Sun Jul 1 22:52:00 CEST 2018
I only adjusted -Fl to match the current version installed, having a
wrong issue there did not change the build behaviour. The change
necessary was to include
-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/
otherwise fpcmake will not compile.
Cross-Compiling did however not work, the makefile of fpcmake does seem
to support FPCOPT but somehow the parameter does not get forwarded to
the makefile:
/Library/Developer/CommandLineTools/usr/bin/make -C utils/fpcm bootstrap
FPC=/Users/ring/devel/fpc-arm/compiler/ppcrossarm
FPCFPMAKE=/Users/ring/devel/fpc-arm/compiler/ppc RELEASE=1 'OPT='
results in:
/Users/ring/devel/fpc-arm/compiler/ppc fpcmake.pp -n
-Fu/Users/ring/devel/fpc-arm/rtl/units/x86_64-darwin
-FU/Users/ring/devel/fpc-arm/utils/fpcm/units/x86_64-darwin
ld: file not found: /usr/lib/crt1.10.5.o
An error occurred while linking
I could make crosscompiling work by doing this (Use OPT instead of FPCOPT)
make clean buildbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm
SUBARCH=$SUBARCH CROSSOPT="$CROSSOPT" BINUTILSPREFIX=arm-none-eabi-
OPT="-XR/Library/Developer/CommandLineTools//SDKs/MacOSX.sdk/"
I hope that hardcoding the path
/Library/Developer/CommandLineTools//SDKs/MacOSX.sdk/ in FPC will solve
this.....
Thank you,
Michael
Am 01.07.18 um 22:34 schrieb Jonas Maebe:
> On 01/07/18 22:18, Michael Ring wrote:
>>
>> make clean buildbase CPU_TARGET=x86_64 INSTALL_PREFIX=$HOME/3.1.1
>> FPCOPT="-XR/Library/Developer/CommandLineTools//SDKs/MacOSX.sdk/"
>>
>> and patching my /etc/fpc.cfg to include:
>>
>> #ifdef cpui386
>> -XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/
>> -Fl/Library/Developer/CommandLineTools/usr/lib/clang/10.0.0
>> #endif
>> #ifdef cpux86_64
>> -XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/
>> -Fl/Library/Developer/CommandLineTools/usr/lib/clang/10.0.0
>> #endif
>>
>> both actions were needed for a successful compile...
>
> What errors do you get if you don't include the -Fl option?
>
>> Is there a better way to make compiles work on Mojave?
>
> The -XR above seems to be the correct way to handle this change. We
> could also hard code that search path in the compiler in addition to
> /usr/lib
>
>
> Jonas
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
More information about the fpc-devel
mailing list