Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.14.1, 5.15.6
-
-
ebac49dd45ca75b1592122df5935017d4592c89d (qt/qtbase/dev)
Description
Trying to build an Android .aab for armeabi-v7a and arm64-v8a with a SUBDIRS based project. There is one subdir with
TEMPLATE = lib TARGET = nymea-app CONFIG += staticlib
and another subdir with
TEMPLATE = app TARGET = nymea-app LIBS += -L../libnymea-app/ -lnymea-app
The lib is built in
$$OUT_PWD/libnymea-app/
In there, it creates subfolders for the two architectures, however, the final libnymea-app.a is created directly in there and depending on which architecture finishes last, it will overwrite the other.
This causes one of the arch builds of the app to fail linking as the lib is only available for one architecture.
I have gotten around this by adding this to the lib:
android: { DESTDIR = $${ANDROID_TARGET_ARCH} }
and this to the app
android: { LIBS += -L $${top_builddir}/libnymea-app/$${ANDROID_TARGET_ARCH} }
This makes it build successfully, however, I believe the build system should do this on its own, shouldn't it?
I have found this branch which afaict fixes exactly this issue:
https://codereview.qt-project.org/c/qt/qtbase/+/282873/3/mkspecs/features/android/android.prf
However, this only seems to be run if for dynamic libs as it explicitly contains `!static` in the qmake condition.
Attachments
Issue Links
- is duplicated by
-
QTBUG-109657 Static lib is not built for multiple architectures
- Closed