Author Topic: Qt6 Development  (Read 544668 times)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5406
  • Karma: +128/-1
    • View Profile
Re: Qt6 Development
« Reply #810 on: December 30, 2024, 07:13:39 pm »
That was for Qt6. For Qt5,
Code: [Select]
mkdir qt5-dev-build
cd qt5-dev-build
sh ../qt5/configure -release -opensource -confirm-license -force-debug-info -nomake examples -nomake tests -no-opengl -system-sqlite -openssl-linked
After checking out the correct branch, which IIRC was v5.15.2-os2-b1.
For my latest, I tried to be compatible with the RPM and used as configure.sh
Code: [Select]
../qt5/configure \
  -verbose \
  -confirm-license \
  -opensource \
  -prefix /@unixroot/usr \
  -archdatadir /@unixroot/usr/lib/qt5 \
  -bindir /@unixroot/usr/lib/qt5/bin \
  -libdir /@unixroot/usr/lib \
  -libexecdir /@unixroot/usr/lib/qt5/libexec \
  -datadir /@unixroot/usr/share \
  -docdir /@unixroot/usr/share/doc \
  -examplesdir /@unixroot/usr/lib/qt5/examples \
  -headerdir /@unixroot/usr/include/qt5 \
  -importdir /@unixroot/usr/lib/qt5/imports \
  -plugindir /@unixroot/usr/lib/qt5/plugins \
  -sysconfdir /@unixroot/etc/xdg \
  -translationdir /@unixroot/usr/share/qt5/translations \
  -platform os2-g++ \
  -no-debug-and-release \
  -release \
  -shared \
  -fontconfig \
  -no-sql-ibase \
  -icu \
  -openssl-linked \
  -nomake examples \
  -nomake tests \
  -no-strip \
  -system-libjpeg \
  -system-libpng \
  -qt-harfbuzz \
  -system-pcre \
  -system-sqlite \
  -system-zlib \
  -no-feature-relocatable \
  -no-opengl \
#  QMAKE_CFLAGS_RELEASE="${CFLAGS:-$RPM_OPT_FLAGS}" \
#  QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-$RPM_OPT_FLAGS}" \
#  QMAKE_LFLAGS_RELEASE="${LDFLAGS:-$RPM_LD_FLAGS}"

Both need make run from the qt5-dev-build directory after configuring.

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 405
  • Karma: +30/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: Qt6 Development
« Reply #811 on: December 30, 2024, 07:38:22 pm »
I cannot get the base build, i get lots of errors.
Not remember what those are, as im not @ home.

Are you getting this?

Code: [Select]
warning: visibility attribute not supported in this configuration; ignored [-Wattributes]

My first attempt to build produced thousands of these. I had to add "-no-reduce-exports" to the 'configure' commandline to get rid of them. I traced the cause of the errors back to 'qtbase\src\corelib\global\qcompilerdetection.h (ln 227)' where I found:

Code: [Select]
#  ifdef Q_OS_DOSLIKE
#    define Q_DECL_EXPORT     __declspec(dllexport)
#    define Q_DECL_IMPORT     __declspec(dllimport)
#  elif defined(QT_VISIBILITY_AVAILABLE)
#    define Q_DECL_EXPORT     __attribute__((visibility("default")))
#    define Q_DECL_IMPORT     __attribute__((visibility("default")))
#    define Q_DECL_HIDDEN     __attribute__((visibility("hidden")))
#  endif

Shouldn't Q_OS_DOSLIKE be defined for OS/2?

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2531
  • Karma: +195/-0
    • View Profile
Re: Qt6 Development
« Reply #812 on: December 30, 2024, 08:47:49 pm »
correct, Q_OS_DOSLIKE should be defined for OS/2. I'm not seeing the visibility errors here, very weird.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5406
  • Karma: +128/-1
    • View Profile
Re: Qt6 Development
« Reply #813 on: December 30, 2024, 09:24:58 pm »
I see them, need to try Rich's fix.

TeLLie

  • Sr. Member
  • ****
  • Posts: 278
  • Karma: +16/-0
    • View Profile
Re: Qt6 Development
« Reply #814 on: December 30, 2024, 09:27:25 pm »
Hi Rich,

No dont see that so far, as cmake says it cannot find dbus-1

CMake Error in CMakeLists.txt:
  IMPORTED_IMPLIB not set for imported target "dbus-1" configuration
  "Release".
I have dbus-1 installed

I have all you're recommend set and i still have no idea why it dont find the dbus...
« Last Edit: December 30, 2024, 09:58:19 pm by TeLLie »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2531
  • Karma: +195/-0
    • View Profile
Re: Qt6 Development
« Reply #815 on: December 30, 2024, 09:31:53 pm »
Rough build instructions are at https://github.com/psmedley/qt6-base-os2/wiki

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2531
  • Karma: +195/-0
    • View Profile
Re: Qt6 Development
« Reply #816 on: December 30, 2024, 09:33:58 pm »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5406
  • Karma: +128/-1
    • View Profile
Re: Qt6 Development
« Reply #817 on: December 31, 2024, 12:35:03 am »
I see them, need to try Rich's fix.

Check that the cmake from netlabs-exp includes the fix from https://github.com/bitwiseworks/cmake-os2/commit/6055eef3a5ede1a7605efe1eb5ef7bcb43f1b507

It didn't, I've applied it manually to my system.

TeLLie

  • Sr. Member
  • ****
  • Posts: 278
  • Karma: +16/-0
    • View Profile
Re: Qt6 Development
« Reply #818 on: December 31, 2024, 12:42:48 am »
Hi,

I get this after 26%
[ 26%] Running rcc for resource qpdf
make[2]: *** [src/gui/CMakeFiles/Gui.dir/build.make:86: src/gui/.rcc/qrc_qpdf.cpp] Segmentation fault (core dumped)
make[1]: *** [CMakeFiles/Makefile2:10239: src/gui/CMakeFiles/Gui.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2531
  • Karma: +195/-0
    • View Profile
Re: Qt6 Development
« Reply #819 on: December 31, 2024, 01:24:52 am »
You didn't set beginlibpath to build\lib did you? So it can't find the qt6core.dll it needs.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2531
  • Karma: +195/-0
    • View Profile
Re: Qt6 Development
« Reply #820 on: December 31, 2024, 06:24:21 am »
Qt 6.6.x is commited for all modules except webengine. One nit is that for some reason, it wants -msse2 adding as a CXXFLAG - and I haven't worked out how to do this automatically yet.

TeLLie

  • Sr. Member
  • ****
  • Posts: 278
  • Karma: +16/-0
    • View Profile
Re: Qt6 Development
« Reply #821 on: December 31, 2024, 11:27:14 am »
You didn't set beginlibpath to build\lib did you? So it can't find the qt6core.dll it needs.

Hi Paul,
I had a typo in dir name
So far so good for now, its on 37%
I had also probs when using cmake with --paralel i get not enough mem available.
Running now with make...

Ok finally its building to the end :)
Had to disable the example.
F:\qt6-6.2.x\bin>qmake6.exe --version
QMake version 3.1
Using Qt version 6.3.2 in F:/QT6-SRC/QT6-BASE-OS2/BUILD/lib

F:\qt6-6.2.x\bin>rcc -v
rcc 6.3.2

F:\qt6-6.2.x\bin>moc --version
moc 6.3.2

Wish you all the best for 2025...
« Last Edit: December 31, 2024, 01:56:43 pm by TeLLie »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2531
  • Karma: +195/-0
    • View Profile
Re: Qt6 Development
« Reply #822 on: January 01, 2025, 07:59:40 am »
Any reason you're targeting 6.3.2, not 6.2.10?

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2531
  • Karma: +195/-0
    • View Profile
Re: Qt6 Development
« Reply #823 on: January 01, 2025, 08:00:45 am »
Building on my Lenovo M910S, 7th generation I5, I get 63 minutes to configure and build qt6-os2-base including examples.
How much free meory does testlog report with that system? I guess https://www.ebay.com.au/itm/286138295648 should be equivalent.
« Last Edit: January 01, 2025, 08:04:32 am by Paul Smedley »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5406
  • Karma: +128/-1
    • View Profile
Re: Qt6 Development
« Reply #824 on: January 01, 2025, 04:50:29 pm »
Code: [Select]
CPU: GenuineIntel Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
CPU Speed: 3406 Mhz
CPU Count: 4
Loader's physical memory layout:
  Memory below 1MB: 625.00 KiB
  Memory between 1MB and 4GB: 3.41 GiB
  Memory below 4GB: 3.42 GiB

I do have to have the VIRTUALADDRESSLIMIT at 2816 for stability.
The one you linked looks like an older model, mine is more like https://www.ebay.com.au/itm/266562041268?_skw=m910s