Forum > macOS / Mac OS X

Missing LibC when trying to build FPC

(1/2) > >>

I have fpcbuild-3.2.2 installed in a directory and I'm trying to build it. 

To do the build, from ~/fpcbuild-3.2.2 I typed:    make IDE=1 all
(Note: it doesn't work if I remove the IDE=1 either)

Things mostly work ok, until the end, where I'm getting this error:

ld: library not found for -lc
An error occurred while linking
pp.pas(252,36) Error: Error while linking
pp.pas(252,36) Fatal: There were 1 errors compiling module, stopping

Any ideas?  I'm on macOS 12.1 on intel.

How did you install FPC?


--- Quote from: trev on December 29, 2021, 03:30:08 am ---How did you install FPC?

--- End quote ---

Through Homebrew:

brew install fpc-laz fpc-src-laz

I suspected you hadn't used the official installer(s). Other users have had problems when using Homebrew.

So you have a choice, you can try fixing the errors one-by-one or remove the current installation (I assume Homebrew has a way to do this?) and use the official installers.

You mention trying to make the FPC text IDE - as far as I'm aware this is not supported (and is unlikely to work) under macOS.

The preferred IDE option is the Lazarus IDE which also provides GUI controls and components but can equally be used for pure-FPC command line applications. I generally use Lazarus for GUI applications and the vi text editor for pure-FPC ones.

If you decide to install just FPC using the official installers, see the Wiki article Installing the Free Pascal Compiler on macOS.

If you decide to install the Lazarus IDE and FPC using the official installers, see the Wiki artcile Installing Lazarus on macOS.

The Wiki contains a lot of useful macOS information and code - see The Mac Portal.

Thanks- I'll uninstall via home-brew and reinstall via the official packages.


[0] Message Index

[#] Next page

Go to full version