[Lazarus] ***SPAM*** Re: ***SPAM*** Re: Install of Qt5 widgetset fails on Mac Ventura
Giuliano Colla
giuliano.colla at fastwebnet.it
Mon Dec 5 12:00:12 CET 2022
Il 28/11/2022 08:18, zeljko ha scritto:
>
>
> 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
Following your guidelines I've been able to build a number of
Lazarus-Qt5 with different Lazarus versions (2.0.12 - 2.2.4 -2.2.5) but
the results are disappointing. While all of them work perfectly with
cocoa WS, Qt5 rises a number of weird issues.
Editor window font treated wrongly in 2.0.12 and 2.2.4 (the font
displayed is different from the one selected, with font gliphs and font
spacing not matching), and in all versions weird behaviour of main title
bar and drop down menus.
The title bar shows the menu entries only if focus is in the main
Lazarus window, and they disappear if focus is on any other window, and
the menus are scrambled. Lazarus ->preferences opens "Configure build
Lazarus", the last line of the submenus is missing, some entries are
translated, some are not. Most keyboard entries aren't recognized, etc.
Apparently the interaction between Qt bindings and Rosetta, plus a Qt
version not well supported by Ventura makes a mess.
I've reached the conclusion that the best approach would be to switch to
a native arm64 build and use Qt6 which is the one supported with M1
processor. I've rebuilt Lazarus 2.2.4-cocoa in arm64 and everything
works fine. I've seen in the forum that you're testing Qt6. If you could
let me have what is required, I could integrate your tests with my test
on arm64 architecture. Would it be possible?
Thank you,
Giuliano
--
Do not do to others as you would have them do to you.They might have different tastes.
More information about the lazarus
mailing list