You can't use this version of the application "Example.app" with this version of OS X.
You have OSX 10.10.5. The application requires OS X 10.13 or later.
the problem seems to be clang setting a minimum mac version in the data section of the output binary.
<key>LSMinimumSystemVersion</key>
<string>10.13</string>
Additionally, the dialog box you get from the Finder actually comes from the Info.plist
Can you go To Project -> Project Options and then click on the "Show Options" button at the bottom
Additionally, the dialog box you get from the Finder actually comes from the Info.plist
That was my first thought as well - but my app does not contain any LSMinimumSystemVersion in its plist file
First of all, make sure you're using -WM10.6 and not -VM10.6
Additionally, there's a bug in current Lazarus versions that makes it not show all linker errors.
Try executing the compilation command from a terminal window to see what the linker error is.
/Users/myname/MN/lazaruscoc64bit/fpc/bin/x86_64-darwin/fpc.sh
-MObjFPC
-Scghi
-CX
-O3
-Xs
-XX
-k-framework
-kCocoa
-l
-vewnhibq
-Fi/Volumes/DiskW/myprojects/myprogram/lib/x86_64-darwin
-Fi/Volumes/DiskW/shared-code/mylibrary
-Fu/Volumes/DiskW/shared-code/mylibrary
-Fu/Volumes/DiskW/shared-code/mylibrary/lib/x86_64-darwin
-Fu/Users/myname/MN/lazarus-components-cocoa64bit/VirtualTreeView-Lazarus-v5/Source/lib/x86_64-darwin-cocoa
-Fu/Users/myname/MN/lazaruscoc64bit/lazarus/components/turbopower_ipro/units/x86_64-darwin/cocoa
-Fu/Users/myname/MN/lazaruscoc64bit/lazarus/components/tachart/lib/x86_64-darwin/cocoa
-Fu/Users/myname/MN/lazarus-components-cocoa64bit/Indy10/Lib/lib/x86_64-darwin
-Fu/Users/myname/MN/lazaruscoc64bit/lazarus/components/printers/lib/x86_64-darwin/cocoa
-Fu/Users/myname/MN/lazaruscoc64bit/lazarus/components/ideintf/units/x86_64-darwin/cocoa
-Fu/Users/myname/MN/lazarus-components-cocoa64bit/lclextensions-0/lib/x86_64-darwin-cocoa
-Fu/Users/myname/MN/lazaruscoc64bit/lazarus/components/lazcontrols/lib/x86_64-darwin/cocoa
-Fu/Users/myname/MN/lazaruscoc64bit/lazarus/components/cairocanvas/lib/x86_64-darwin/cocoa
-Fu/Users/myname/MN/lazaruscoc64bit/lazarus/lcl/units/x86_64-darwin/cocoa
-Fu/Users/myname/MN/lazaruscoc64bit/lazarus/lcl/units/x86_64-darwin
-Fu/Users/myname/MN/lazaruscoc64bit/lazarus/components/lazutils/lib/x86_64-darwin
-Fu/Users/myname/MN/lazaruscoc64bit/lazarus/packager/units/x86_64-darwin
-Fu/Volumes/DiskW/myprojects/myprogram/
-FU/Volumes/DiskW/myprojects/myprogram/lib/x86_64-darwin/
-FE/Volumes/DiskW/myprojects/myprogram/compiled/myprogname.app/Contents/MacOS/
-o/Volumes/DiskW/myprojects/myprogram/compiled/myprogname.app/Contents/MacOS/myprogname
-Ur
-dLCL
-dLCLcocoa
-WM10.6
-O3
-g-
-Xs
Hint: (11030) Start of reading config file /Users/myname/MN/lazaruscoc64bit/fpc/bin/x86_64-darwin/fpc.cfg
Hint: (11031) End of reading config file /Users/myname/MN/lazaruscoc64bit/fpc/bin/x86_64-darwin/fpc.cfg
Free Pascal Compiler version 3.0.4-r37149 [2019/01/29] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
Fatal: (11004) No source file name in command line
Fatal: (1018) Compilation aborted
Error: /Users/myname/MN/lazaruscoc64bit/fpc/bin/x86_64-darwin/ppcx64 returned an error exitcode
Try adding the main source file of your project (probably xxx.lpr) at the end of the command line (including its full path).
ld: file not found: /usr/lib/crt1.10.6
An error ocurred while linking
Did you run the FPC 3.0.4a installer after upgrading to macOS 10.14?
was built for newer OSX version (10.13) than being linked (10.8 )
warning: URGENT: building for OSX, but linking against dylib (/usr/lib/libiconv.dylib) built for (unknown). Note: This will be an error in he future.
Apple likes to change everything around every blue moon. I try to keep up with that in the official FPC installers, but other tools may not do so. It _is_ a pain.QuoteDid you run the FPC 3.0.4a installer after upgrading to macOS 10.14?
I use FPCUpDeluxe to install my Lazarus/FPC combos ...
But I installed Lazarus/FPC more recently than since I updated to 10.14 / Mojave. (However, currently version is now 10.14.3)The only thing that matters is what I asked: did you install FPC using the FPC 3.0.4a installer since you updated to macOS 10.14? If not, please do so.
Is there documentation anywhere how I should fix fpc.cfg?No.
And is this an issue that should be reported to FPCUpDeluxe?I don't know. It depends on whether they want to support only building a new FPC version, or also completely configuring it.
I have no idea if the following is permissable/will-work-correctly (?), but If try to instead useThat is fine if you only want to support 10.8 and later. That version indeed does not require a custom crt*.o file.
Code: Pascal [Select]
-WM10.8
it seems to compile ... But with many warnings with main two types being:Please quote the exact errors, because a lot depends on which files these warnings are about.
1)
about different librariesQuotewas built for newer OSX version (10.13) than being linked (10.8 )
2)That is again because you have not used the FPC 3.0.4a installer to update your fpc.cfg for macOS 10.14
about dylibQuotewarning: URGENT: building for OSX, but linking against dylib (/usr/lib/libiconv.dylib) built for (unknown). Note: This will be an error in he future.
fpc.cfg is in /etc/fpc.cfg (/etc is the default directory for global configuration files on Unix-like systems).Quote
#ifdef cpui386
-Fl/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
#endif
#ifndef cpui386
#ifndef cpupowerpc
#ifndef cpupowerpc64
-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
#endif
#endif
#endif
Fpcupdeluxe tries to detect the OSX version of the system you are installing FPC.
ld: warning: object file (./MN/lazaruscoc64bit/lazarus/components/tachart/lib/x86_64-darwin/cocoa/tatransformations.o) was built for newer OSX version (10.13) than being linked (10.8 )
ld: warning: object file (./MN/lazaruscoc64bit/lazarus/components/tachart/lib/x86_64-darwin/cocoa/tachartteechart.o) was built for newer OSX version (10.13) than being linked (10.8 )
ld: warning: object file (./MN/lazaruscoc64bit/lazarus/components/tachart/lib/x86_64-darwin/cocoa/taseries.o) was built for newer OSX version (10.13) than being linked (10.8 )
ld: warning: object file (./MN/lazaruscoc64bit/fpc/units/x86_64-darwin/fcl-json/fpjson.o) was built for newer OSX version (10.13) than being linked (10.8 )
ld: warning: object file (./MN/lazaruscoc64bit/lazarus/components/turbopower_ipro/units/x86_64-darwin/cocoa/ipconst.o) was built for newer OSX version (10.13) than being linked (10.8 )
ld: warning: object file (./MN/lazaruscoc64bit/lazarus/components/tachart/lib/x86_64-darwin/cocoa/tachartutils.o) was built for newer OSX version (10.13) than being linked (10.8 )
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib//libiconv.dylib) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib//libc.dylib) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib//libobjc.dylib) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/System/Library/Frameworks//CoreFoundation.framework/CoreFoundation) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/System/Library/Frameworks//Foundation.framework/Foundation) built for (unknown). Note: This will be an error in the future.
Code: [Select]#ifdef cpui386
-Fl/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
#endif
#ifndef cpui386
#ifndef cpupowerpc
#ifndef cpupowerpc64
-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
#endif
#endif
#endif
Here are examples of the exact error messages I get when targeting 10.8 without having done any fpc.cfg changes yet:This seems to be FPCUpDeluxe-specific, as when targeting Darwin/x86-64, FPC normally compiles everything for macOS 10.6 when nothing is specified. In any case, it doesn't really matter, because the compiler does not generate different code when targeting macOS 10.13 than when targeting 10.8 (at this time).
...
First kind essentially the same for all (there is a lot) existing Lazarus compiled code:Quoteld: warning: object file (./MN/lazaruscoc64bit/lazarus/components/tachart/lib/x86_64-darwin/cocoa/tatransformations.o) was built for newer OSX version (10.13) than being linked (10.8 )
ld: warning: object file (./MN/lazaruscoc64bit/lazarus/components/tachart/lib/x86_64-darwin/cocoa/tachartteechart.o) was built for newer OSX version (10.13) than being linked (10.8 )
ld: warning: object file (./MN/lazaruscoc64bit/lazarus/components/tachart/lib/x86_64-darwin/cocoa/taseries.o) was built for newer OSX version (10.13) than being linked (10.8 )
ld: warning: object file (./MN/lazaruscoc64bit/fpc/units/x86_64-darwin/fcl-json/fpjson.o) was built for newer OSX version (10.13) than being linked (10.8 )
ld: warning: object file (./MN/lazaruscoc64bit/lazarus/components/turbopower_ipro/units/x86_64-darwin/cocoa/ipconst.o) was built for newer OSX version (10.13) than being linked (10.8 )
ld: warning: object file (./MN/lazaruscoc64bit/lazarus/components/tachart/lib/x86_64-darwin/cocoa/tachartutils.o) was built for newer OSX version (10.13) than being linked (10.8 )
Second kind (including it all here)That is because the used fpc.cfg does not contain the search paths added by the FPC 3.0.4a installer. Perhaps FPCUpDeluxe generates a .fpc.cfg file in your home directory that does not include the global /etc/fpc.cfg file.Quoteld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib//libiconv.dylib) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib//libc.dylib) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib//libobjc.dylib) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/System/Library/Frameworks//CoreFoundation.framework/CoreFoundation) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/System/Library/Frameworks//Foundation.framework/Foundation) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib
Fpcupdeluxe will perform an isolated install of FPC (and Lazarus).
It uses its own fpc.cfg, located in the install-directory.
And tries to make it work on as many systems as possible.
The global fpc.cfg will not be used, to prevent issues between different installs.
On all unix-like-systems, FPC is launched by a script.Okay.
The script:
# This script starts the fpc compiler installed by fpcup # and ignores any system-wide fpc.cfg files # Note: maintained by fpcup; do not edit directly, your edits will be lost. /installdir/"moredirs"/fpc -n @/installdir/"moredirs"/fpc.cfg "$@"
Fpcupdeluxe uses fpcmkcf to generate a config.Then I don't understand why it does not contain the -Fl/-XR lines when generated on macOS 10.14.
I have changed fpcupdeluxe not to use -WM10.14 for 10.14, but to use -WM10.8 on anything >=10.8Why do you force the target FPC version to be something different from the default? This makes support harder (as shown by this thread), and I'm not aware of any advantages. At most it hides issues caused by an incomplete fpc.cfg on macOS 10.14.
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib//libiconv.dylib) built for (unknown). Note: This will be an error in the future.
ld: malformed file
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib//libiconv.tbd:4:18: error: unknown enumerated scalar
platform: zippered
^~~~~~~~
file '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib//libiconv.tbd'
-FD/Library/Developer/CommandLineTools/usr/binseems to have done the trick.