[Lazarus] Issue compiling under MacOS
Mattias Gaertner
nc-gaertnma at netcologne.de
Sun Jan 7 11:45:28 CET 2024
On 07.01.24 10:50, Michael Thompson via lazarus wrote:
>> Adding -ld_classic as per
> https://stackoverflow.com/questions/77153800/xcode-15-c-compilation-errors
> got me nowhere.
>
> Well, to be correct, it got me past the " ld: library 'c' not found" error,
> but introduced me to a "ld: framework not found Cocoa" error.
You must install XCode and do
sudo xcode-select --install
sudo xcodebuild -license accept
Does your fpc.cfg contain
-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/
?
Mattias
> Cheers
>
> Mike
>
> On Sun, 7 Jan 2024 at 17:47, Michael Thompson <mike.cornflake at gmail.com>
> wrote:
>
>> G'day,
>>
>> Apologies for this. I've just bought a MacMini specifically for Laz
>> development, and I'm stuck with an issue that seems be plaguing several
>> other projects. The apologies are because I'm new to Mac, I might not be
>> reporting this correctly - and the info to resolve may be on the web, our
>> forum or this mailing list, but I'm not finding it.
>>
>> if I run the build script direct, I get the following output:
>> mike at Mikes-Mac-mini uBee512Launcher % ./ppaslink.sh
>> ld: warning: -multiply_defined is obsolete
>> -macosx_version_min has been renamed to -macos_version_min
>> ld: warning: ignoring duplicate libraries: '-lc'
>> ld: library 'c' not found
>> An error occurred while linking
>>
>> This is exactly the build error I'm getting from within Lazarus, when I
>> try to build my Project.
>>
>> I've tried hand editing the .sh file and removing entries from the .res
>> file (so I could give you more insight into what might need changing), but
>> I don't know what I'm doing, and I never got a workable project. Adding
>> -ld_classic as per
>> https://stackoverflow.com/questions/77153800/xcode-15-c-compilation-errors
>> got me nowhere.
>>
>> Searching for these linker errors gets me a whole slew of recent posts
>> from other projects saying that build scripts need to be updated for a new
>> linker in XCode 15 (which is why I started poking around with the
>> ppaslink.sh script).
>>
>> I'm not sure how to install the 'c' library (on linux I'd be apt'ing round
>> about now)
>>
>> I'm using XCode Command Line Tools 15.1 / macOS 14.2.
>> I'm unable to revert to any XCode Command Lines from the 14.x range "your
>> OS is too new".
>> My Mac Mini is Intel based.
>>
>> I've tried this with and without XCode installed (seems to be a separate
>> product)
>>
>> I've also bumped an identical post on the forum:
>>
>> https://forum.lazarus.freepascal.org/index.php/topic,65153.msg501604/topicseen.html#new
>>
>> Help :-(
>>
>> Mike
>>
>>
>>
>
>
More information about the lazarus
mailing list