Author Topic: Qt6 Development  (Read 345631 times)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4997
  • Karma: +111/-1
    • View Profile
Re: Qt6 Development
« Reply #615 on: March 03, 2023, 05:12:34 am »
I think libaom is only used for encoding to AV1, as in WebRTC. Still good to fix.
Hopefully it checks for OS support, most libs do.
« Last Edit: March 03, 2023, 05:17:28 am by Dave Yeo »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Qt6 Development
« Reply #616 on: March 03, 2023, 05:15:41 am »
I think libaom is only used for encoding to AV1, as in WebRTC. Still good to fix.
Should check if it checks for OS support of fsave.
Similar problem in libvpx - which probably explains why it wasn't working....

(re)build is chugging along nicely now...
[2567/16253]

Some avx usage in webrtc too... stopped at [7136/16253] - resuming now after some more patching at [2/9098]
« Last Edit: March 03, 2023, 08:38:03 am by Paul Smedley »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Qt6 Development
« Reply #617 on: March 03, 2023, 09:28:37 pm »
The system ran out of memory wiht about 3k files to go. At some point I need to implement some logic in ninja to limit the number of processes based on free RAM - with 3 processes and complex c++ files, it's easy to exhaust 3+ GB of available RAM.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4997
  • Karma: +111/-1
    • View Profile
Re: Qt6 Development
« Reply #618 on: March 03, 2023, 10:10:03 pm »
The system ran out of memory wiht about 3k files to go. At some point I need to implement some logic in ninja to limit the number of processes based on free RAM - with 3 processes and complex c++ files, it's easy to exhaust 3+ GB of available RAM.

Bitwise just ended up limiting it to 2 jobs maximum.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Qt6 Development
« Reply #619 on: March 04, 2023, 12:24:22 am »
The system ran out of memory wiht about 3k files to go. At some point I need to implement some logic in ninja to limit the number of processes based on free RAM - with 3 processes and complex c++ files, it's easy to exhaust 3+ GB of available RAM.

Bitwise just ended up limiting it to 2 jobs maximum.
Even 2 jobs can exhaust memory with QtWebEngine 6.2+ - and 3 jobs is much faster in the early part of the builds....

I might look at implementing https://github.com/maxim-kuvyrkov/ninja/commit/4d8acf64657145c1a36bd5eb9fcb502530b6967d for OS/2
« Last Edit: March 04, 2023, 12:40:56 am by Paul Smedley »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Qt6 Development
« Reply #620 on: March 04, 2023, 04:40:29 am »
Initial implementation in https://github.com/psmedley/ninja-os2/commits/memload

Uggh dropped it in to start testing in hope of running with -j higher than 1 and got:
Code: [Select]
ninja: warning: bad deps log signature or version; starting over
I guess it recognised that ninja.exe had been rebuilt, so is now regenerating all ninja files, and starting over - hopefully it's smart enough to realise it doesn't need to rebuild most object files :(

Hoping it flies through some stuff.... [17/25039]
« Last Edit: March 04, 2023, 05:37:16 am by Paul Smedley »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4997
  • Karma: +111/-1
    • View Profile
Re: Qt6 Development
« Reply #621 on: March 04, 2023, 05:54:46 am »
What would be nice is a port of ccache, https://ccache.dev/.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Qt6 Development
« Reply #622 on: March 04, 2023, 08:17:43 am »
What would be nice is a port of ccache, https://ccache.dev/.

Quick n dirty port - https://smedley.id.au/tmp/ccache-4.7.4-os2-20230304.zip (just includes the .exe)

TeLLie

  • Full Member
  • ***
  • Posts: 238
  • Karma: +12/-0
    • View Profile
Re: Qt6 Development
« Reply #623 on: March 04, 2023, 09:52:28 am »
Hi Paul,

I test it on vpx and set --enable-ccache

Killed by SIGABRT
pid=0x2b89 ppid=0x2b88 tid=0x0001 slot=0x00be pri=0x0200 mc=0x0001 ps=0x0010
H:\USR\LOCAL1220\BIN\CCACHE.EXE
Moved 2b84_01.TRP to C:\var\log\app\64031451-2b84_01-CCACHE-exceptq.txt
Creating 2B89_01.TRP
    [AR] libvpx_g.a
Moved 2b89_01.TRP to C:\var\log\app\64031451-2b89_01-CCACHE-exceptq.txt
    [LD] libvpx8.dll
    [AR] libvpxrc_g.a
    [AR] libgtest_g.a
    [CP] libvpx.a < libvpx_g.a
    [CP] libvpxrc.a < libvpxrc_g.a
    [CP] libgtest.a < libgtest_g.a

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Qt6 Development
« Reply #624 on: March 04, 2023, 09:59:28 am »
Not terribly surprised, I only did enough to get ccache.exe -h to work....

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Qt6 Development
« Reply #625 on: March 04, 2023, 10:18:25 am »
Note to self, got a few of these from ninja whilst processing ASM:
Code: [Select]
../../../../../src/3rdparty/chromium/third_party/libaom/source/libaom/aom_dsp/x86/subpel_variance_sse2.asm:43: warning: segment attributes specified on redeclar
ation of segment: ignoring [-w+other]
../../../../../src/3rdparty/chromium/third_party/libaom/source/libaom/aom_dsp/x86/subpel_variance_sse2.asm:141: ... from macro `SECTION_TEXT' defined here

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Qt6 Development
« Reply #626 on: March 05, 2023, 06:52:17 am »
Thanks, glad my memory was correct - hacked around this for now by shortening the filename and changing the .cc file to use the shortened name. One day I'll work out how to automate this...

I'll raise an issue (https://github.com/psmedley/qt6-webengine-os2/issues/12) to remind me to get around to it, but the long filenames are contained in https://github.com/psmedley/qt6-webengine-os2/blob/6.3.x/src/3rdparty/chromium/third_party/blink/renderer/bindings/generated_in_modules.gni#L2523 Need to add some stuff to shorten these on os2, and adapt other source files that look for these extra long filenames.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Qt6 Development
« Reply #627 on: March 05, 2023, 08:58:36 am »
Initial implementation in https://github.com/psmedley/ninja-os2/commits/memload

Uggh dropped it in to start testing in hope of running with -j higher than 1 and got:
Code: [Select]
ninja: warning: bad deps log signature or version; starting over
I guess it recognised that ninja.exe had been rebuilt, so is now regenerating all ninja files, and starting over - hopefully it's smart enough to realise it doesn't need to rebuild most object files :(

Hoping it flies through some stuff.... [17/25039]

Almost done.... [1173/1373]

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Qt6 Development
« Reply #628 on: March 09, 2023, 09:33:21 am »
I love c++.... Whilst I'm waiting on qtwebengine 6.3.2 to build, I started working on getting the base libs of Qt 6.4.2 building...
Code: [Select]
In file included from include/QtCore/qmetacontainer.h:1,
                 from include/QtCore/../../../src/corelib/kernel/qiterable.h:9,
                 from include/QtCore/qiterable.h:1,
                 from include/QtCore/../../../src/corelib/kernel/qmetatype.h:15,
                 from include/QtCore/qmetatype.h:1,
                 from include/QtCore/../../../src/corelib/kernel/qobject.h:18,
                 from include/QtCore/qobject.h:1,
                 from include/QtCore/../../../src/corelib/io/qiodevice.h:10,
                 from include/QtCore/qiodevice.h:1,
                 from include/QtCore/../../../src/corelib/io/qfiledevice.h:7,
                 from include/QtCore/qfiledevice.h:1,
                 from include/QtCore/../../../src/corelib/io/qfile.h:8,
                 from include/QtCore/qfile.h:1,
                 from include/QtCore/../../../src/corelib/io/qfileinfo.h:7,
                 from include/QtCore/qfileinfo.h:1,
                 from ../src/gui/image/qabstractfileiconprovider.h:8,
                 from ../src/gui/image/qabstractfileiconprovider.cpp:4:
include/QtCore/../../../src/corelib/kernel/qmetacontainer.h: In instantiation of 'constexpr const QtMetaContainerPrivate::QMetaSequenceInterface QMetaSequence::MetaSequence<QList<QSize> >::value':
include/QtCore/../../../src/corelib/kernel/qmetacontainer.h:931:30:   required from 'static constexpr QMetaSequence QMetaSequence::fromContainer() [with T = QList<QSize>]'
include/QtCore/../../../src/corelib/kernel/qmetatype.h:1644:75:   required from 'QIterable<QMetaSequence> QtPrivate::QSequentialIterableConvertFunctor<From>::operator()(const From&) const [with From = QList<QSize>]'
include/QtCore/../../../src/corelib/kernel/qmetatype.h:580:26:   required from 'static bool QMetaType::registerConverter(UnaryFunction) [with From = QList<QSize>; To = QIterable<QMetaSequence>; UnaryFunction = QtPrivate::QSequentialIterableConvertFunctor<QList<QSize> >]'
include/QtCore/../../../src/corelib/kernel/qmetatype.h:1665:77:   required from 'static bool QtPrivate::SequentialValueTypeIsMetaType<T, true>::registerConverter() [with T = QList<QSize>]'
include/QtCore/../../../src/corelib/kernel/qmetatype.h:1223:77:   required from 'int qRegisterNormalizedMetaTypeImplementation(const QByteArray&) [with T = QList<QSize>]'
include/QtCore/../../../src/corelib/kernel/qmetatype.h:1252:56:   [ skipping 4 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
include/QtCore/../../../src/corelib/kernel/qmetatype.h:2376:70:   required from 'constexpr const QtPrivate::QMetaTypeInterface QtPrivate::QMetaTypeInterfaceWrapper<QList<QSize> >::metaType'
include/QtCore/../../../src/corelib/kernel/qmetatype.h:2468:12:   required from 'constexpr const QtPrivate::QMetaTypeInterface* QtPrivate::qMetaTypeInterfaceForType() [with T = QList<QSize>]'
include/QtCore/../../../src/corelib/kernel/qmetatype.h:2495:61:   required from 'static constexpr QMetaType QMetaType::fromType() [with T = QList<QSize>]'
include/QtCore/../../../src/corelib/kernel/qvariant.h:593:50:   required from 'T qvariant_cast(const QVariant&) [with T = QList<QSize>]'
include/QtCore/../../../src/corelib/kernel/qvariant.h:350:30:   required from 'T QVariant::value() const [with T = QList<QSize>]'
../src/gui/image/qabstractfileiconprovider.cpp:67:52:   required from here
include/QtCore/../../../src/corelib/kernel/qmetacontainer.h:989:79: error: 'QtMetaContainerPrivate::QMetaSequenceInterface{QtMetaContainerPrivate::QMetaContainerInterface{0, QtMetaContainerPrivate::IteratorCapabilities{15}, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getSizeFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::SizeFn = int (*)(const void*); qsizetype = int]::<lambda(const void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getClearFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::ClearFn = void (*)(void*)]::<lambda(void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getCreateIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::CreateIteratorFn = void* (*)(void*, QtMetaContainerPrivate::QMetaContainerInterface::Position)]::<lambda(void*, QtMetaContainerPrivate::QMetaContainerInterface::Position)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getDestroyIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::DestroyIteratorFn = void (*)(const void*)]::<lambda(const void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getCompareIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::CompareIteratorFn = bool (*)(const void*, const void*)]::<lambda(const void*, const void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getCopyIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::CopyIteratorFn = void (*)(void*, const void*)]::<lambda(void*, const void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getAdvanceIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::AdvanceIteratorFn = void (*)(void*, int); qsizetype = int]::<lambda(void*, qsizetype)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getDiffIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::DiffIteratorFn = int (*)(const void*, const void*); qsizetype = int]::<lambda(const void*, const void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getCreateConstIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::CreateConstIteratorFn = void* (*)(const void*, QtMetaContainerPrivate::QMetaContainerInterface::Position)]::<lambda(const void*, QtMetaContainerPrivate::QMetaContainerInterface::Position)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getDestroyConstIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::DestroyIteratorFn = void (*)(const void*)]::<lambda(const void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getCompareConstIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::CompareIteratorFn = bool (*)(const void*, const void*)]::<lambda(const void*, const void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getCopyConstIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::CopyIteratorFn = void (*)(void*, const void*)]::<lambda(void*, const void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getAdvanceConstIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::AdvanceIteratorFn = void (*)(void*, int); qsizetype = int]::<lambda(void*, qsizetype)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getDiffConstIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::DiffIteratorFn = int (*)(const void*, const void*); qsizetype = int]::<lambda(const void*, const void*)>::_FUN}, (& QtPrivate::QMetaTypeInterfaceWrapper<QSize>::metaType), QtMetaContainerPrivate::AddRemoveCapabilities{15}, QtMetaContainerPrivate::QMetaSequenceForContainer<C>::getValueAtIndexFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaSequenceInterface::ValueAtIndexFn = void (*)(const void*, int, void*); qsizetype = int]::<lambda(const void*, qsizetype, void*)>::_FUN, QtMetaContainerPrivate::QMetaSequenceForContainer<C>::getSetValueAtIndexFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaSequenceInterface::SetValueAtIndexFn = void (*)(void*, int, const void*); qsizetype = int]::<lambda(void*, qsizetype, const void*)>::_FUN, QtMetaContainerPrivate::QMetaSequenceForContainer<C>::getAddValueFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaSequenceInterface::AddValueFn = void (*)(void*, const void*, QtMetaContainerPrivate::QMetaContainerInterface::Position)]::<lambda(void*, const void*, QtMetaContainerPrivate::QMetaContainerInterface::Position)>::_FUN, QtMetaContainerPrivate::QMetaSequenceForContainer<C>::getRemoveValueFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaSequenceInterface::RemoveValueFn = void (*)(void*, QtMetaContainerPrivate::QMetaContainerInterface::Position)]::<lambda(void*, QtMetaContainerPrivate::QMetaContainerInterface::Position)>::_FUN, QtMetaContainerPrivate::QMetaSequenceForContainer<C>::getValueAtIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaSequenceInterface::ValueAtIteratorFn = void (*)(const void*, void*)]::<lambda(const void*, void*)>::_FUN, QtMetaContainerPrivate::QMetaSequenceForContainer<C>::getSetValueAtIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaSequenceInterface::SetValueAtIteratorFn = void (*)(const void*, const void*)]::<lambda(const void*, const void*)>::_FUN, QtMetaContainerPrivate::QMetaSequenceForContainer<C>::getInsertValueAtIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaSequenceInterface::InsertValueAtIteratorFn = void (*)(void*, const void*, const void*)]::<lambda(void*, const void*, const void*)>::_FUN, QtMetaContainerPrivate::QMetaSequenceForContainer<C>::getValueAtConstIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaSequenceInterface::ValueAtIteratorFn = void (*)(const void*, void*)]::<lambda(const void*, void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getEraseAtIteratorFn() [with EraseFn = void (*)(void*, const void*); C = QList<QSize>]::<lambda(void*, const void*)>::_FUN, QtMetaContainerPrivate::QMetaSequenceForContainer<C>::getEraseRangeAtIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaSequenceInterface::EraseRangeAtIteratorFn = void (*)(void*, const void*, const void*)]::<lambda(void*, const void*, const void*)>::_FUN}' is not a constant expression
  989 |         static constexpr const QtMetaContainerPrivate::QMetaSequenceInterface value
      |                                                                               ^~~~~

Same code compiles fine on linux.... I guess something is missing for OS/2 in a header somewhere, but for the life of me, I can't work out what yet,....

Code (minus a few local commits) is at https://github.com/psmedley/qt6-base-os2/tree/6.4.x

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Qt6 Development
« Reply #629 on: March 10, 2023, 09:17:40 am »
Seems the Qt 6.4.2 issue is somehow related to the use of dllimport....
#ifndef __OS2__
#    define Q_DECL_IMPORT     __declspec(dllimport)
#else
#    define Q_DECL_IMPORT
#endif
 gets past the build break.... g++ bug I guess...