[Lazarus] OSX 64 bit Cocoa + Catalina Installer

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] OSX 64 bit Cocoa + Catalina Installer

Free Pascal - Lazarus mailing list
>On my other Catalina Mac I cannot install LLDB FPDebug.  I get the
>following error when I rebuild the IDE with fpdebug and laz...fplldb
>packages:
>
>    Build IDE: Exit code 2, Errors: 3
>    Error: ld: framework not found Cocoa
>    make[2]: *** [lazarus] Error 1
>    make[1]: *** [idepkg] Error 2
>    Error: make: *** [idepkg] Error 2
>    An error occurred while linking
>    Error: Error while linking
>
>code 11.1 is installed so I assume the Cocoa Framework (only needed for
>Programming or for Macos too?) is installed too.   Please advise.

I should add that this Mac OS system had a previous 32 bit version of Laz on it that I removed.  The Mac OS system Laz 64 runs fine on never had Laz 32 installed. So was a legacy config left behind from Laz 32 that is mucking things up?

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer

Free Pascal - Lazarus mailing list
On 25/10/2019 15:25, Dan Star via lazarus wrote:

>> On my other Catalina Mac I cannot install LLDB FPDebug.  I get the
>> following error when I rebuild the IDE with fpdebug and laz...fplldb
>> packages:
>>
>>    Build IDE: Exit code 2, Errors: 3
>>    Error: ld: framework not found Cocoa
>>    make[2]: *** [lazarus] Error 1
>>    make[1]: *** [idepkg] Error 2
>>    Error: make: *** [idepkg] Error 2
>>    An error occurred while linking
>>    Error: Error while linking
>>
>> code 11.1 is installed so I assume the Cocoa Framework (only needed
>> for Programming or for Macos too?) is installed too. Please advise.
>
> I should add that this Mac OS system had a previous 32 bit version of
> Laz on it that I removed.  The Mac OS system Laz 64 runs fine on never
> had Laz 32 installed. So was a legacy config left behind from Laz 32
> that is mucking things up?
>
Unfortunately I don't have to much experience in the Mac related build
process. So someone else will need to answer this.

I can't think how the fpdebug/lazdebugfp package causes this. Can you
rebuild the IDE, if you install other packages?

Also do you build from within the IDE, or call make? You may be
accidentally building for 32bit. And cocoa does not exist for 32bit.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer

Free Pascal - Lazarus mailing list
On 10/25/19 8:34 AM, Martin Frb via lazarus wrote:

> On 25/10/2019 15:25, Dan Star via lazarus wrote:
>>> On my other Catalina Mac I cannot install LLDB FPDebug.  I get the
>>> following error when I rebuild the IDE with fpdebug and laz...fplldb
>>> packages:
>>>
>>>    Build IDE: Exit code 2, Errors: 3
>>>    Error: ld: framework not found Cocoa
>>>    make[2]: *** [lazarus] Error 1
>>>    make[1]: *** [idepkg] Error 2
>>>    Error: make: *** [idepkg] Error 2
>>>    An error occurred while linking
>>>    Error: Error while linking
>>>
>>> code 11.1 is installed so I assume the Cocoa Framework (only needed
>>> for Programming or for Macos too?) is installed too. Please advise.
>>
>> I should add that this Mac OS system had a previous 32 bit version of
>> Laz on it that I removed.  The Mac OS system Laz 64 runs fine on
>> never had Laz 32 installed. So was a legacy config left behind from
>> Laz 32 that is mucking things up?
>>
> Unfortunately I don't have to much experience in the Mac related build
> process. So someone else will need to answer this.
>
> I can't think how the fpdebug/lazdebugfp package causes this. Can you
> rebuild the IDE, if you install other packages?
>
> Also do you build from within the IDE, or call make? You may be
> accidentally building for 32bit. And cocoa does not exist for 32bit.

The 'Build Lazarus" Information window appears OK for Cocoa but just
guessing; there is no way to copy this information to the clipboard nor
can I find a config file with it.   I looked in ~/tmp and see no build
log for today after trying to build again.  Where is the build log file
located?   I am building from withing Laz 2.1 MacOS.

If I remove those 2 packages and try to build vanilla Laz MacOS 64 I get
the same errors so looks like a configuration problem caused by having
had Laz 32 installed previously.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer

Free Pascal - Lazarus mailing list
On 25/10/2019 16:54, Dan Star via lazarus wrote:
>
> If I remove those 2 packages and try to build vanilla Laz MacOS 64 I
> get the same errors so looks like a configuration problem caused by
> having had Laz 32 installed previously.
Maybe go to "configure build lazarus" and choose target cpu (and target OS)
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Fri, Oct 25, 2019 at 10:54 AM Dan Star via lazarus <[hidden email]> wrote:
The 'Build Lazarus" Information window appears OK for Cocoa but just
guessing; there is no way to copy this information to the clipboard nor
can I find a config file with it.  

Try to build IDE from command-line, instead

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On 10/25/19 10:06 AM, Martin Frb via lazarus wrote:
> On 25/10/2019 16:54, Dan Star via lazarus wrote:
>>
>> If I remove those 2 packages and try to build vanilla Laz MacOS 64 I
>> get the same errors so looks like a configuration problem caused by
>> having had Laz 32 installed previously.
> Maybe go to "configure build lazarus" and choose target cpu (and
> target OS)

I tried that initially using MacOS and x86-64 but Laz wouldn't build if
I spec'd that stating

/Compiler
"/Users/Dan/Development/FreePascal/fpc/bin/x86-64-darwin/fpc.sh" does
not support target x86-64-macos./
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer

Free Pascal - Lazarus mailing list
On Fri, Oct 25, 2019 at 11:12 AM Dan Star via lazarus <[hidden email]> wrote:
/Compiler
"/Users/Dan/Development/FreePascal/fpc/bin/x86-64-darwin/fpc.sh" does
not support target x86-64-macos./

"macos" platform target refers to Classic MacOS  (MacOS 9), rather than MacOSX (or  the modern name macOS)
You might need to adjust platform target as well to "darwin"

thanks,
Dmitry

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer

Free Pascal - Lazarus mailing list
On 10/25/19 10:16 AM, Dmitry Boyarintsev via lazarus wrote:

> On Fri, Oct 25, 2019 at 11:12 AM Dan Star via lazarus
> <[hidden email] <mailto:[hidden email]>>
> wrote:
>
>     /Compiler
>     "/Users/Dan/Development/FreePascal/fpc/bin/x86-64-darwin/fpc.sh" does
>     not support target x86-64-macos./
>
>
> "macos" platform target refers to Classic MacOS  (MacOS 9), rather
> than MacOSX (or  the modern name macOS)
> You might need to adjust platform target as well to "darwin"
>
>

Same error now:

Build IDE: Exit code 2, Errors: 3
Error: ld: framework not found Cocoa
make[2]: *** [lazarus] Error 1
make[1]: *** [idepkg] Error 2
Error: make: *** [idepkg] Error 2
Linking ../lazarus
An error occurred while linking
Error: Error while linking

so something with config.  Will look up details on how to build from
command line and try that.  Thanks.

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Fri, 25 Oct 2019 10:12:21 -0500
Dan Star via lazarus <[hidden email]> wrote:

> On 10/25/19 10:06 AM, Martin Frb via lazarus wrote:
> > On 25/10/2019 16:54, Dan Star via lazarus wrote:  
> >>
> >> If I remove those 2 packages and try to build vanilla Laz MacOS 64
> >> I get the same errors so looks like a configuration problem caused
> >> by having had Laz 32 installed previously.  
> > Maybe go to "configure build lazarus" and choose target cpu (and
> > target OS)  
>
> I tried that initially using MacOS and x86-64 but Laz wouldn't build
> if I spec'd that stating
>
> /Compiler
> "/Users/Dan/Development/FreePascal/fpc/bin/x86-64-darwin/fpc.sh" does
> not support target x86-64-macos./

Is x86-64-macos a typo?
The target OS name is "darwin", not "macos"?

Mattias
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Fri, 25 Oct 2019 10:23:29 -0500
Dan Star via lazarus <[hidden email]> wrote:

>[...]
> Same error now:
>
> Build IDE: Exit code 2, Errors: 3
> Error: ld: framework not found Cocoa
> make[2]: *** [lazarus] Error 1
> make[1]: *** [idepkg] Error 2
> Error: make: *** [idepkg] Error 2
> Linking ../lazarus
> An error occurred while linking
> Error: Error while linking
>
> so something with config.  Will look up details on how to build from
> command line and try that.  Thanks.

The Cocoa LCL passes "-k-framework Cocoa" to fpc.
Check your /etc/fpc.cfg for -XR and -Fl options.
The -XR prepends a path to all -Fl paths.
I don't have Catalina to test, but maybe this works:
-Fl/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk


Mattias
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer

Free Pascal - Lazarus mailing list
On 10/26/19 5:30 AM, Mattias Gaertner via lazarus wrote:

> On Fri, 25 Oct 2019 10:23:29 -0500
> Dan Star via lazarus <[hidden email]> wrote:
>
>> [...]
>> Same error now:
>>
>> Build IDE: Exit code 2, Errors: 3
>> Error: ld: framework not found Cocoa
>> make[2]: *** [lazarus] Error 1
>> make[1]: *** [idepkg] Error 2
>> Error: make: *** [idepkg] Error 2
>> Linking ../lazarus
>> An error occurred while linking
>> Error: Error while linking
>>
>> so something with config.  Will look up details on how to build from
>> command line and try that.  Thanks.
> The Cocoa LCL passes "-k-framework Cocoa" to fpc.
> Check your /etc/fpc.cfg for -XR and -Fl options.
> The -XR prepends a path to all -Fl paths.
> I don't have Catalina to test, but maybe this works:
> -Fl/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
>
>
> Mattias
I have 2 fpc.cfg files and the one in /etc is from year 2017 so I think
that one only applies to Laz 32.   The other fpc.cfg is in ~/
Development/FreePascal/fpc/bin/x86_64-darwin/fpc.cfg and is from October
18th 2019.   So inspecting this second file I find:

#ifndef cpupowerpc64
-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

#ifdef cpui386
-Fl/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib

# searchpath for libraries
#-Fl/Users/danstar/Development/FreePascal/fpc/lib
#-Fl/lib;/usr/lib
-Fl/Users/danstar/Development/FreePascal/fpc/lib/$FPCTARGET

# library search path
-Fl/usr/lib/$FPCTARGET;/usr/lib/$FPCTARGET-gnu;/lib/$FPCTARGET;/lib/$FPCTARGET-gnu;/usr/lib/gcc/

And my reading of this is -Fl only applies to PowerPC cpu hardware.   So
I am confused what to change.  Any help appreciated.


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus