Forum > Other OS

[SOLVED] FPC 3.3.1 - /usr/lib/ missing

(1/2) > >>

I tried to compile a new Lazarus project on macOS and met with /usr/lib/ missing.

I thought I'd tracked down the problem to the latest Xcode 10.3 and the fpc.cfg file as the paths therein no longer matched what was in fpc.cfg. So, I generated a new fpc.cfg file with fpcmkcfg.

Thereafter I met with the "fcllaz.pas(11,3) Fatal: Cannot find db used by fcllaz of package FCL" error.

Watching my life ebb away, I decided to delete all the FPC (3.0.4 and 3.3.1) source and binaries, the fpc.cfg file, .config files, .lazarus files, Lazarus 2.1 source and binaries and start again.

I installed the official FPC 3.0.4 source and binaries. I installed the official Lazarus 2.04 binary. Life was good again.

I downloaded Lazarus trunk source and compiled it for Cocoa x86_64. Life was still good.

On a roll, I downloaded FPC trunk and tried to compile with: make clean all, only to be met with:

--- Quote ---/Applications/ compiler
/bin/mkdir -p x86_64/units/x86_64-darwin
/bin/mkdir -p x86_64/bin/x86_64-darwin
/usr/local/bin/ppcx64 -Ur -Xs -O2 -n -Fux86_64 -Fusystems -Fu/usr/local/share/fpcsrc/fpc-3.3.1/rtl/units/x86_64-darwin -Fix86_64 -FEx86_64/bin/x86_64-darwin -FUx86_64/units/x86_64-darwin -dRELEASE    -dx86_64 -dGDB -dBROWSERLOG -Fux86 pp.pas
ld: file not found: /usr/lib/crt1.10.5.o  <<<<<<<<<<<<<<<<<<<<<<<<<
An error occurred while linking
pp.pas(263,36) Error: Error while linking
pp.pas(263,36) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted

--- End quote ---

Defeat grabbed from the jaws of success.

I still suspect Xcode 10.3. I hadn't updated any Lazarus or FPC source/binary in several weeks. But I had updated Xcode and compiling a project with Lazarus 2.1 now emits the following (non fatal) error:

--- Quote ---Error: ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)

--- End quote ---

Curiously, compiling with Lazarus 2.0.4 doesn't show the above error.

Anyway, any ideas on the mystery /usr/lib/crt1.10.5?

Jonas Maebe:

Great, my life has meaning again :)

make OPT="-WM10.8" clean all, solved the issue


So near, yet so far...

How to now get rid of the 146 linking errors like:

--- Quote ---Error: ld: warning: object file (/usr/local/lib/fpc/3.3.1/units/x86_64-darwin/chm/fasthtmlparser.o) was built for newer OSX version (10.8) than being linked (10.5)

--- End quote ---

when compiling a program with Lazarus.

On a wing and a prayer, compiling  FPC 3.3.1 by going into the subdirectories (compiler, rtl, packages, utils) and running:

make clean all OPT="-WM10.5"

and finally running make install from the top directory has resolved all the issues.


[0] Message Index

[#] Next page

Go to full version