termux / x11-packages

A set of packages using X11 Windows System.
Other
547 stars 145 forks source link

Qt5 Updates #632

Closed ar664 closed 2 years ago

ar664 commented 2 years ago

This is what I have so far in terms of updating qt5. Any help would be appreciated.

xtkoba commented 2 years ago

Current context of build failure:

In file included from ../../corelib/kernel/qsharedmemory.cpp:41:
../../corelib/kernel/qsharedmemory_p.h:76:12: fatal error: 'sys/sem.h' file not found
#  include <sys/sem.h>
           ^~~~~~~~~~~
1 error generated.

I suggest including the following patch named src-corelib-kernel-qsharedmemory_p.h.patch:

--- a/src/corelib/kernel/qsharedmemory_p.h
+++ b/src/corelib/kernel/qsharedmemory_p.h
@@ -72,7 +72,7 @@
 # include "private/qobject_p.h"
 #endif

-#if !defined(Q_OS_WIN) && !defined(Q_OS_ANDROID) && !defined(Q_OS_INTEGRITY) && !defined(Q_OS_RTEMS)
+#if !defined(Q_OS_WIN) && !defined(Q_OS_ANDROID) && !defined(__ANDROID__) && !defined(Q_OS_INTEGRITY) && !defined(Q_OS_RTEMS)
 #  include <sys/sem.h>
 #endif
ar664 commented 2 years ago

Ummm. I think the build failure was due to internet connectivity?

xtkoba commented 2 years ago

It was due to outdated submodule. Should be fixed now. Please rebase.

ar664 commented 2 years ago

😯It built. Did I do everything correct?

Grimler91 commented 2 years ago

@ar664 looks good to me, nice work!

Could you squash the commits, and/or start the commit message(s) with a prefix like:

qt5-qt5base: 

(I would squash into a single commit with message qt5-qt5base: update to 5.15.3)

ar664 commented 2 years ago

Ok, I'll fix the typo I made as well in build.sh

Yisus7u7 commented 2 years ago

@ar664 You need to rebuild all the apps that work with Qt5...

xtkoba commented 2 years ago

@Yisus7u7 Is it needed for just a minor bump without SOVERSION change? Yeah, there could be hidden API breakage, but we need evidence for that.

ar664 commented 2 years ago

@ar664 You need to rebuild all the apps that work with Qt5...

You got a list? πŸ˜—

xtkoba commented 2 years ago

https://wiki.qt.io/Qt-Version-Compatibility says

Minor releases are backwards binary and source compatible.

I do not believe we have to rebuild reverse dependencies.

Yisus7u7 commented 2 years ago

I wonder if other qt5-*s do not need to bump simultaneously:

  • qt5-qtdeclarative
  • qt5-qtlocation
  • qt5-qtmultimedia
  • qt5-qtquickcontrols
  • qt5-qtquickcontrols2
  • qt5-qtsensors
  • qt5-qtsvg
  • qt5-qttools
  • qt5-qtwebchannel
  • qt5-qtwebsockets
  • qt5-qtx11extras
  • qt5-qtxmlpatterns

I'll try it

Yisus7u7 commented 2 years ago

Screenshot_20220312-091216

@xtkoba If we will need to rebuild the apps written in Qt.

ar664 commented 2 years ago

@xtkoba I'll start working on the build confs. @Yisus7u7 Guess we gotta do all the qt5-* at once.

Yisus7u7 commented 2 years ago

@xtkoba I'll start working on the build confs. @Yisus7u7 Guess we gotta do all the qt5-* at once.

Yes.

After that, you have to rebuild the apps.

Pd: I think it is not necessary to update the qt5-* packages, you just have to rebuild them.

ar664 commented 2 years ago

I'm having problems with qt5-qtdeclarative. Maybe something to do with YarrJIT, a 3rd party library. Idk where the documentation for qtdeclarative building is.

xtkoba commented 2 years ago

Current context of build failure in qt5-qtdeclarative:

/home/builder/.termux-build/qt5-qtdeclarative/src/bin/qmltyperegistrar --generate-qmltypes=plugins.qmltypes --import-name=QtQml --major-version=2 --minor-version=15 --foreign-types=/data/data/com.termux/files/usr/lib/metatypes/qt5network_metatypes.json,/data/data/com.termux/files/usr/lib/metatypes/qt5core_metatypes.json --dependencies=/home/builder/.termux-build/qt5-qtdeclarative/src/src/qml/dependencies.json --private-includes -o qt5qml_qmltyperegistrations.cpp qt5qml_metatypes.json
/home/builder/.termux-build/qt5-qtdeclarative/src/bin/qmltyperegistrar: 1: cannot open ]^E: No such file

The build system is trying to execute qmltyperegistrar binary built for Android target, which fails of course for cross building.

xtkoba commented 2 years ago

I wonder if it is just that qmltyperegistrar needs to be added in "Qt Declarative utilities":

https://github.com/termux/x11-packages/blob/c3dd4344ab588c1e08d270d4b9aed5c73e7e5869/packages/qt5-qtdeclarative/build.sh#L49-L50

https://github.com/termux/x11-packages/blob/c3dd4344ab588c1e08d270d4b9aed5c73e7e5869/packages/qt5-qtdeclarative/build.sh#L96-L97

ar664 commented 2 years ago

I wonder if it is just that qmltyperegistrar needs to be added in "Qt Declarative utilities":

Well let's see. After I rebase and stuff.

ar664 commented 2 years ago

The build checks are only there during the ready for review stage. Is it possible for a sample x86_64 build to be done in the draft stage? So we could waste less resources and use the draft feature.

ar664 commented 2 years ago

I'm trying to build on my phone, but I get this error:

> aarch64-linux-android-clang++ -landroid-shmem -L/data/data/com.termux/files/usr/lib -fopenmp -static-openmp -Wl,--enable-new-dtags -Wl,--as-needed -Wl,-z,relro,-z,now -o arch arch.o  -L/data/data/com.termux/files/usr/lib 
Detected architecture: arm64 (neon)
test config.qtbase.tests.architecture gave result arm64
executing config test host_architecture 
+ cd /data/data/com.termux/files/home/.termux-build/qt5-qtbase/src/config.tests/arch && /data/data/com.termux/files/home/.termux-build/qt5-qtbase/src/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" -early "CONFIG += cross_compile" /data/data/com.termux/files/home/.termux-build/qt5-qtbase/src/config.tests/arch/arch_host.pro 
> Project ERROR: failed to parse default search paths from compiler output
xtkoba commented 2 years ago

Yeah on device building can have its own difficulties.

Yisus7u7 commented 2 years ago

@ar664 And if we update only to qt5-qtbase?, and then we are updating little by little the other modules.

I don't know if you can, but qt5-qtbase is the most important package to upgrade

ar664 commented 2 years ago

@ar664 And if we update only to qt5-qtbase?, and then we are updating little by little the other modules.

I don't know if you can, but qt5-qtbase is the most important package to upgrade

So disable the other packages in the mean time? Because I thought there would be significant changes in api between Major versions.

Yisus7u7 commented 2 years ago

@ar664 And if we update only to qt5-qtbase?, and then we are updating little by little the other modules. I don't know if you can, but qt5-qtbase is the most important package to upgrade

So disable the other packages in the mean time? Because I thought there would be significant changes in api between Major versions.

Must try

xtkoba commented 2 years ago

Ask the maintainer if it is allowed to update partially, if you are going to do so. I cannot decide it on my own.

ar664 commented 2 years ago

Ask the maintainer if it is allowed to update partially, if you are going to do so. I cannot decide it on my own.

@librehat

xtkoba commented 2 years ago

Please include https://github.com/termux/x11-packages/pull/643/commits/9876486b57e5a0fd8b24acb442ffecbc65c372dd into the PR. This should fix the build of qt5-qtdeclarative.

librehat commented 2 years ago

Unfortunately all Qt submodules must be updated at once (and then all the Qt applications need to be rebuilt) Thanks for your efforts on this. I haven't had time checking this myself. I wrote down this post when I was porting Qt 5.12: https://www.librehat.com/building-qt-for-termux-android/ and it might be helpful if you encounter some issues.

Good luck!

xtkoba commented 2 years ago

Also include these changes:

xtkoba commented 2 years ago

OK, it builds. Then you should inspect the artifacts to see if anything is wrong with the contents.

I have already found some flaws in them. Will list patches later.

ar664 commented 2 years ago

OK, it builds. Then you should inspect the artifacts to see if anything is wrong with the contents.

I have already found some flaws in them. Will list patches later.

Should I rebase now or wait for patches?

Yisus7u7 commented 2 years ago

OK, it builds. Then you should inspect the artifacts to see if anything is wrong with the contents.

I have already found some flaws in them. Will list patches later.

I think it's already possible to merge the changes, right?

xtkoba commented 2 years ago

At your service.

For reference, here are the patches:

Note that they are not yet tested. It may fix the flaws or may break something.

Yisus7u7 commented 2 years ago

At your service.

For reference, here are the patches:

Note that they are not yet tested. It may fix the flaws or may break something.

I will install the packages and compile lxqt, then tell you if I got any errors

xtkoba commented 2 years ago

Tests are always welcome. Thanks.

xtkoba commented 2 years ago

OK, please include:

ar664 commented 2 years ago

Are there any other packages that need to be rebuilt?

xtkoba commented 2 years ago

If there is any, then it should be rebuilt in another PR.

I believe this PR is almost ready to merge. Please cleanup the commits. I suppose it is OK to squash them into one.

ar664 commented 2 years ago

Ok, 🀞

Yisus7u7 commented 2 years ago

Screenshot_20220318-145106

@xtkoba @ar664

I compiled all lxqt smoothly, you can merge the changes.

I will take care of the update of lxqt