[Lazarus] ***SPAM*** Re: ***SPAM*** Re: Install of Qt5 widgetset fails on Mac Ventura

zeljko zeljko at holobit.hr
Mon Nov 28 08:18:03 CET 2022



On 27. 11. 2022. 23:47, Giuliano Colla wrote:
> Il 26/11/22 09:20, zeljko ha scritto:
> 
>>
>>
>> On 25. 11. 2022. 23:01, Giuliano Colla wrote:
>>> Il 25/11/2022 21:58, zeljko ha scritto:
>>>
>>>>
>>>>
>>>> On 25. 11. 2022. 19:29, Giuliano Colla via lazarus wrote:
>>>>> I tried to install QT5 version 5.6.2 on my Mac, following the wiki 
>>>>> instructions but installation fails.
>>>>>
>>>>> qmake executes properly and generates a Makefile, but make fails 
>>>>> with this error message:
>>>>>
>>>>>   ld: symbol(s) not found for architecture arm64
>>>>> clang: error: linker command failed with exit code 1 (use -v to see 
>>>>> invocation)
>>>>> make: *** [Qt5Pas.framework/Qt5Pas] Error 1
>>>>>
>>>>> Actally all the object files generated in the tmp directory are for 
>>>>> arm64 and not x86_64-darwin as expected.
>>>>>
>>>>> Any hint?
>>>>
>>>> Never tried build on arm64 (have intel macbook pro). Can you try 
>>>> with Qt6 ?
>>>>
>>>> z.
>>> I didn't find a place from where download open source Qt6. Do you 
>>> have a reliable link?
>>
>> https://download.qt.io/official_releases/online_installers/qt-unified-mac-x64-online.dmg
>>
>>>
>>> In the meantime I'll give a try with 5.6.11.
>>>
>>> However all Lazarus is compiled for x86_64 architecture, and runs in 
>>> arm64 architecture via Rosetta. Intel version of Qt would be just 
>>> fine, if qmake didn't decide to make for the arm64 architecture. Any 
>>> idea of how to tell qmake the right architecture?
>>
>> You have to read qmake manual:
>> https://doc.qt.io/qt-6/qmake-manual.html
>>
>> zeljko
> 
> Two issues:
> 
> First issue is that it appears that you can't call qmake from command line.
> 
> Either there's a bug somewhere on the Mac Ventura, or I'm missing some 
> detail. I tried to build the Qt5Pas library by submitting Qt5Pas.pro to 
> Qt Designer. It generated correct x86_64 objects, and the generated 
> framework contains a:
> 
> Qt5Pas: Mach-O 64-bit dynamically linked shared library x86_64
> 
> Just to understand what was going on, I then tried again with the 
> command line options, passing qmake exactly the same parameters which Qt 
> Designer used, and the result was the same error as before, with the tmp 
> folder populated with arm64 object files. It would appear that qmake 
> ignores the x86_64 switch when called from command line. If this is 
> confirmed it would be good to update the wiki page.
> 
> Second issue.
> 
> Lazarus does not build with Qt. I have set the appropriate symlink in 
> the /Library/Frameworks folder, but build of Lazarus fails with the 
> error message:
> 
> ld: framework not found Qt5Pas
> 
> I have added /Library/Frameworks to the compiler paths 
> (-FI/Library/Frameworks). Should I tell something to the linker too?


1. I had problem on intel mac when installed qt6.2 (qt5.15 was already 
installed) , but make clean and removing .qmake_stash and .qcmake_xx 
files manually from cbindings directory helped me a lot. So maybe you 
should remove such files and then start qmake-6 again (for arm).

2.On newer macs Library/Frameworks is not in path by default, I've found 
that symlinking Qt5Pas to Library/Frameworks and 
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks 
fixed problem for make bigide.

3.You should add "-k -F/Library/Frameworks" to the configure "Build 
Lazarus" dialog if you want to rebuild lazarus for Qt5, or for your 
projects in Project Options check "Pass options with linker with "k" 
...." -F/Library/Frameworks and then it should work


zeljko


More information about the lazarus mailing list