Recent

Author Topic: Error: -macosx_version_min has been renamed to -macos_version_min  (Read 10061 times)

pascalmustdie

  • Newbie
  • Posts: 2
Hello everyone:
i get this error on mac:
Error: -macosx_version_min has been renamed to -macos_version_min
what now?
« Last Edit: November 08, 2023, 12:30:55 pm by pascalmustdie »

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Error: -macosx_version_min has been renamed to -macos_version_min
« Reply #1 on: November 09, 2023, 12:13:26 am »
Without at least a hint about what version of FPC and MacOS you are using, no one can possibly help you.

David
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

pascalmustdie

  • Newbie
  • Posts: 2
Re: Error: -macosx_version_min has been renamed to -macos_version_min
« Reply #2 on: November 09, 2023, 10:23:21 am »
This is the newest Version, downloaded from here:

https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%202.2.6/

I have used this to install free pascal:
https://formulae.brew.sh/formula/fpc

the direct installation was broken too
https://formulae.brew.sh/formula/fpc

the brew installation fixed the compiler at least

The compiler is working.
I can use terminal to compile.

Xcode is up to date.

The same procedure worked on windows11, i dont want to use 2 computers,.....but this all is very annyoing!



dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Error: -macosx_version_min has been renamed to -macos_version_min
« Reply #3 on: November 09, 2023, 11:16:39 pm »
Hmm, I googled for the error message you are getting and had several hits. It appears to be xcode related, people are seeing it using the Intel Fortran Compiler, an Ada compiler and gcc. So, bit worrying.

Its not a FPC problem.

You probably want to check to see what version of XCode you have, people report that it gets updated and tthats when this problem occurs.

Actually not a gcc bug - This is due to Xcode 15 using a new linker. The build scripts for some apps using gcc need to be changed to either use the old linker or some other change for the linker. I would answer but this has been closed (wrongly as there is enough info to know exactly the issue) –
mmmmmm
Oct 9 at 9:06


https://apple.stackexchange.com/questions/464922/weird-message-macos-14-macosx-version-min-has-been-renamed-to-macos-versio

You might try reversing that auto update to xcode - really beyond me.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Koenijn

  • Newbie
  • Posts: 3
Re: Error: -macosx_version_min has been renamed to -macos_version_min
« Reply #4 on: December 02, 2023, 09:40:11 pm »
Good evening everybody,

I've been away from coding a long time, but since i came up with an idea i really want to build, i'm working to pick it up again.
For what i have in mind, a friend of mine convinced me to use Free Pascal + Lazarus and i think it's a good advice.
So that being said, i'm hoping that my following question doesn't sound really stupid (my question also has quite a long introduction..):

I've got a Mac mini (2018) Intel Core I7 with Ventura 13.5.2.
I downloaded and installed Xcode 15.0.1 (the wiki.freepascal-page says it's optional?)
After this i installed Lazarus 3.99, FPC 3.2.2 and FPC-src 3.2.2

When i run Lazarus IDE and try to run a very simple program i get the same error as mentioned in this thread (-macosx_version_min has been renamed to -macos_version_min) and also a warning 'Id: warning: -multiply_defined is obsolete' + a window which says 'execution aborted' (or something like that, in dutch the message is 'uitvoering afgebroken', as far as i know in english it will be execution aborted).

I read this thread and it seems there is no straight-forward-solution for this at the moment? I also checked https://gcc.gnu.org/bugzilla//show_bug.cgi?id=110624 but i wasn't able to figure out what to do with it.
Or - taking in account that i'm lacking a bunch of knowledge on this - did i misunderstood something completely?

I hope somebody has an answer and can help me forward on this. 

Thanks in advance,

Koenijn

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Error: -macosx_version_min has been renamed to -macos_version_min
« Reply #5 on: December 03, 2023, 12:41:39 am »
XCode and "the xcode command line tools" are not the same thing. Have you installed the xcode command line tools ?

(no idea if it relates your problem, its just you wording set off alarm bells)

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Koenijn

  • Newbie
  • Posts: 3
Re: Error: -macosx_version_min has been renamed to -macos_version_min
« Reply #6 on: December 03, 2023, 01:28:52 am »
Good evening Davo,

I guess it is (as in: relates to my problem). I installed Xcode from the App store, but when i entered xcode-select --install in the terminal i got the following message: xcode-select: error: command line tools are already installed, use "Software Update" in System Settings to install updates

And after trying xcodebuild -license accept i get the message xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

So correct me if i'm wrong: by installing Xcode and getting the message xcode-select: error: command line tools are already installed, use "Software Update" in System Settings to install updates i didn't install the actual 'xcode command line tools'? It's a different thing?

If so, this is a bit confusing, but i hope to get this working.

Again, thanks in advance,

Koenijn


dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Error: -macosx_version_min has been renamed to -macos_version_min
« Reply #7 on: December 03, 2023, 09:06:18 am »
Good evening Davo,

I guess it is (as in: relates to my problem). I installed Xcode from the App store, but when i entered xcode-select --install in the terminal i got the following message: xcode-select: error: command line tools are already installed, use "Software Update" in System Settings to install updates

And after trying xcodebuild -license accept i get the message xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

So correct me if i'm wrong: by installing Xcode and getting the message xcode-select: error: command line tools are already installed, use "Software Update" in System Settings to install updates i didn't install the actual 'xcode command line tools'? It's a different thing?

If so, this is a bit confusing, but i hope to get this working.

Again, thanks in advance,

Koenijn

The way I understand it (and thats pretty dodgy) if you just install the command line tools, no license agreement must be accepted. But if you install all of XCode, then none of it is usable unless you have completed that acceptance. So, I suggest you have another crack at accepting the agreement, or cleaning out and starting again ?

On my Mac, I was careful to only install the command line tools. So, I have not played in that space. Must be some one here who has.

I guess you saw this https://wiki.freepascal.org/Xcode and https://wiki.freepascal.org/Installing_Lazarus_on_macOS#Step_2:_Xcode_Command_Line_Tools

Both, I suspect written by Trev, far more knowledgeable with Mac stuff than I.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Koenijn

  • Newbie
  • Posts: 3
Re: Error: -macosx_version_min has been renamed to -macos_version_min
« Reply #8 on: December 03, 2023, 06:03:37 pm »
The way I understand it (and thats pretty dodgy) if you just install the command line tools, no license agreement must be accepted. But if you install all of XCode, then none of it is usable unless you have completed that acceptance. So, I suggest you have another crack at accepting the agreement, or cleaning out and starting again ?

On my Mac, I was careful to only install the command line tools. So, I have not played in that space. Must be some one here who has.

I guess you saw this https://wiki.freepascal.org/Xcode and https://wiki.freepascal.org/Installing_Lazarus_on_macOS#Step_2:_Xcode_Command_Line_Tools

Both, I suspect written by Trev, far more knowledgeable with Mac stuff than I.

Davo

Guess i'm going to clean out and start again. Think i'm getting the picture what you mean.

Thank you!

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1263
Re: Error: -macosx_version_min has been renamed to -macos_version_min
« Reply #9 on: January 07, 2024, 09:44:06 am »
G'day,

Has there been any resolution?   I've just purchased a mac-mini, and I've run into exactly the same issue.

Update: I'm using fpc 3.2.2, Laz 3.0.  Using the installs from sourceforge, not building from source.
Update2: I think I see.  I'm using the latest MacOS 14.2.1.  That requires XCode 15, which has changed something to do with the linker.  Looks like some build scripts need to be updated.  I'll shout out on the mailing list.

Cheers

Mike
« Last Edit: January 07, 2024, 10:16:21 am by Mike.Cornflake »
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1263
Re: Error: -macosx_version_min has been renamed to -macos_version_min
« Reply #10 on: January 08, 2024, 11:25:43 pm »
:-)   Resolution has been found.

edit fpc.cfg to include
Code: [Select]
-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/
I haven't investigated in more detail, but it may be that the fpc.cfg "brew" fpc package contains this mod, but the official fpc download for macos does not.  Or maybe this was a result of my installation order.  I installed fpc first, then command line tools...   Yeah, that seems a more likely culprit.

Update:  With this line in the fpc.cfg, the Project will now successfully compile and link.  The errors reported in the original post are still present, but they don't prevent linking.  It turns out my issue was an additional error, which was preventing linking.

Before the -XR directive added to fpc.cfg, in addition to the errors reported by OP, I was seeing:
Code: [Select]
ld: library 'c' not found
 An error occurred while linking

After the directive was added, the project successfully compiled and linked

Code: [Select]
Compile Project, Target: /Users/mike/Documents/uBee512Launcher/uBee512Launcher: Success, Errors: 1, Warnings: 3
Warning: ld: warning: -multiply_defined is obsolete
Error: -macosx_version_min has been renamed to -macos_version_min
Warning: ld: warning: ignoring duplicate libraries: '-lc'
Warning: ld: warning: no platform load command found in '/Users/mike/Documents/uBee512Launcher/lib/x86_64-darwin/uBee512Launcher.or', assuming: macOS
« Last Edit: January 08, 2024, 11:38:41 pm by Mike.Cornflake »
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

wittbo

  • Full Member
  • ***
  • Posts: 151
Re: Error: -macosx_version_min has been renamed to -macos_version_min
« Reply #11 on: April 26, 2024, 04:21:05 pm »
Thanks a lot for this solution. I can confirm it.

I tested it on a Mac Studio with macos 14.4.1 M1 Max and on a MacBook Air with macos 14.4.1 M2 processor.
-wittbo-
MBAir M2 with MacOS 14.4.1 / Lazarus  3.2.2
MacStudio M1 Max with MacOS 14.4.1 / Lazarus 3.2.2

reinhardt1053

  • New Member
  • *
  • Posts: 14
    • encompass
Re: Error: -macosx_version_min has been renamed to -macos_version_min
« Reply #12 on: August 17, 2024, 04:46:35 pm »
Is there a way to get rid of the error "Error: -macosx_version_min has been renamed to -macos_version_min"? It compiles and link properly but the red error message is misleading.

madref

  • Hero Member
  • *****
  • Posts: 1080
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Error: -macosx_version_min has been renamed to -macos_version_min
« Reply #13 on: August 17, 2024, 06:55:01 pm »
Code: [Select]
-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/This does not solve the problem on my Intel MacBook Pro
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Main Platform:
--------------
Mac OS X Sonoma 14.7
Lazarus 3.99 (Lazarus 3.99 (rev main_3_99-2668-g6b352d830e) FPC 3.3.1 x86_64-darwin-cocoa)

Windows 10 Pro
Lazarus 3.99 (rev cbfd80ce39)

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Error: -macosx_version_min has been renamed to -macos_version_min
« Reply #14 on: September 17, 2024, 12:05:05 pm »
Is there a way to get rid of the error "Error: -macosx_version_min has been renamed to -macos_version_min"? It compiles and link properly but the red error message is misleading.

Did you ever find a solution to this issue? Thankfully, despite being shown as an error, it doesn't prevent building and linking, but it's annoying, nonetheless ;)
"It builds... ship it!"

 

TinyPortal © 2005-2018