Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2024-01

Issue compiling under MacOS

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Thompson

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20240107/6281549d/attachment.htm>

Reply by email

Michael Thompson
to Michael Thompson
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.

Cheers

Mike

Michael Thompson wrote 52 lines
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20240107/2b719927/attachment.htm>

Reply by email

Mattias Gaertner
to Michael Thompson
Michael Thompson wrote 6 lines
> 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

Show quoted text 61 lines
Cheers Mike On Sun, 7 Jan 2024 at 17:47, Michael Thompson 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 > > >

Reply by email

Michael Thompson
to Mattias Gaertner
Does your fpc.cfg contain -XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/

Many thanks, this was the resolution.

Cheers

Mike

On Sun, 7 Jan 2024 at 18:45, Mattias Gaertner via lazarus <

Show quoted text 104 lines
wrote: 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 > 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 >> >> >> > > -- _______________________________________________ lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20240109/8fd01c9a/attachment.htm>

Reply by email