All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [BUG] qt5declarative not building on host distro without libatomic.so
@ 2021-08-05 10:31 Quentin Schulz
  2021-08-05 14:43 ` Arnout Vandecappelle
  0 siblings, 1 reply; 3+ messages in thread
From: Quentin Schulz @ 2021-08-05 10:31 UTC (permalink / raw)
  To: buildroot; +Cc: ps.report, yann.morin.1998, thomas.petazzoni

Hi all,

I've been trying to compile qt5declarative from the master branch of
Buildroot (8d56423d3d2308c620e61a952e36999c89e4d682
"package/zstd: observe Buildroot optimisation flags") on Fedora 34 without
success.

Here's the log:

```
>>> qt5declarative 5.15.2 Building
PATH="/home/qschulz/work/upstream/buildroot/output/host/bin:/home/qschulz/work/upstream/buildroot/output/host/sbin:/home/qschulz/.local/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/qschulz/bin"  /usr/bin/make -j9 -C /home/qschulz/work/upstream/buildroot/output/build/qt5declarative-5.15.2/
make[1]: Entering directory '/home/qschulz/work/upstream/buildroot/output/build/qt5declarative-5.15.2'
/home/qschulz/work/upstream/buildroot/output/host/bin/qmake -o Makefile qtdeclarative.pro -spec devices/linux-buildroot-g++

Running configuration tests...
Done running configuration tests.

Configure summary:

Qt QML:
  QML network support .................... yes
  QML debugging and profiling support .... yes
  QML just-in-time compiler .............. yes
  QML sequence object .................... yes
  QML XML http request ................... yes
  QML Locale ............................. yes
Qt QML Models:
  QML list model ......................... yes
  QML delegate model ..................... yes
Qt Quick:
  Direct3D 12 ............................ no
  AnimatedImage item ..................... yes
  Canvas item ............................ yes
  Support for Qt Quick Designer .......... yes
  Flipable item .......................... yes
  GridView item .......................... yes
  ListView item .......................... yes
  TableView item ......................... yes
  Path support ........................... yes
  PathView item .......................... yes
  Positioner items ....................... yes
  Repeater item .......................... yes
  ShaderEffect item ...................... yes
  Sprite item ............................ yes

Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into '/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr'.

Prior to reconfiguration, make sure you remove any leftovers from
the previous build.

cd src/ && ( test -e Makefile || /home/qschulz/work/upstream/buildroot/output/host/bin/qmake -o Makefile /home/qschulz/work/upstream/buildroot/output/build/qt5declarative-5.15.2/src/src.pro -spec devices/linux-buildroot-g++ ) && /usr/bin/make -f Makefile
make[2]: Entering directory '/home/qschulz/work/upstream/buildroot/output/build/qt5declarative-5.15.2/src'
/home/qschulz/work/upstream/buildroot/output/host/bin/qmake -o Makefile src.pro -spec devices/linux-buildroot-g++
cd qmltyperegistrar/ && ( test -e Makefile || /home/qschulz/work/upstream/buildroot/output/host/bin/qmake -o Makefile /home/qschulz/work/upstream/buildroot/output/build/qt5declarative-5.15.2/src/qmltyperegistrar/qmltyperegistrar.pro -spec devices/linux-buildroot-g++ ) && /usr/bin/make -f Makefile
make[3]: Entering directory '/home/qschulz/work/upstream/buildroot/output/build/qt5declarative-5.15.2/src/qmltyperegistrar'
/home/qschulz/work/upstream/buildroot/output/host/bin/qmake -o Makefile qmltyperegistrar.pro -spec devices/linux-buildroot-g++
g++ -c -pipe -std=c++11 -fno-exceptions -Wall -Wextra -ffunction-sections -fdata-sections -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_USE_QSTRINGBUILDER -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_BOOTSTRAP_LIB -DQT_VERSION_STR='"5.15.2"' -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=15 -DQT_VERSION_PATCH=2 -DQT_BOOTSTRAPPED -DQT_NO_CAST_TO_ASCII -I. -I../../tools/shared -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore/5.15.2 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore/5.15.2/QtCore 
 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml/5.15.2 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml/5.15.2/QtXml -I/home/qschulz/work/upstream/buildroot/output/host/mkspecs/devices/linux-buildroot-g++ -o .obj/resourcefilemapper.o ../../tools/shared/resourcefilemapper.cpp
g++ -c -pipe -std=c++11 -fno-exceptions -Wall -Wextra -ffunction-sections -fdata-sections -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_USE_QSTRINGBUILDER -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_BOOTSTRAP_LIB -DQT_VERSION_STR='"5.15.2"' -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=15 -DQT_VERSION_PATCH=2 -DQT_BOOTSTRAPPED -DQT_NO_CAST_TO_ASCII -I. -I../../tools/shared -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore/5.15.2 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore/5.15.2/QtCore 
 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml/5.15.2 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml/5.15.2/QtXml -I/home/qschulz/work/upstream/buildroot/output/host/mkspecs/devices/linux-buildroot-g++ -o .obj/qmlstreamwriter.o ../../tools/shared/qmlstreamwriter.cpp
g++ -c -pipe -std=c++11 -fno-exceptions -Wall -Wextra -ffunction-sections -fdata-sections -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_USE_QSTRINGBUILDER -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_BOOTSTRAP_LIB -DQT_VERSION_STR='"5.15.2"' -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=15 -DQT_VERSION_PATCH=2 -DQT_BOOTSTRAPPED -DQT_NO_CAST_TO_ASCII -I. -I../../tools/shared -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore/5.15.2 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore/5.15.2/QtCore 
 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml/5.15.2 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml/5.15.2/QtXml -I/home/qschulz/work/upstream/buildroot/output/host/mkspecs/devices/linux-buildroot-g++ -o .obj/qmltyperegistrar.o qmltyperegistrar.cpp
g++ -c -pipe -std=c++11 -fno-exceptions -Wall -Wextra -ffunction-sections -fdata-sections -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_USE_QSTRINGBUILDER -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_BOOTSTRAP_LIB -DQT_VERSION_STR='"5.15.2"' -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=15 -DQT_VERSION_PATCH=2 -DQT_BOOTSTRAPPED -DQT_NO_CAST_TO_ASCII -I. -I../../tools/shared -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore/5.15.2 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore/5.15.2/QtCore 
 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml/5.15.2 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml/5.15.2/QtXml -I/home/qschulz/work/upstream/buildroot/output/host/mkspecs/devices/linux-buildroot-g++ -o .obj/qmltypesclassdescription.o qmltypesclassdescription.cpp
g++ -c -pipe -std=c++11 -fno-exceptions -Wall -Wextra -ffunction-sections -fdata-sections -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_USE_QSTRINGBUILDER -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_BOOTSTRAP_LIB -DQT_VERSION_STR='"5.15.2"' -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=15 -DQT_VERSION_PATCH=2 -DQT_BOOTSTRAPPED -DQT_NO_CAST_TO_ASCII -I. -I../../tools/shared -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore/5.15.2 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore/5.15.2/QtCore 
 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml/5.15.2 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml/5.15.2/QtXml -I/home/qschulz/work/upstream/buildroot/output/host/mkspecs/devices/linux-buildroot-g++ -o .obj/qmltypescreator.o qmltypescreator.cpp
g++ -Wl,-O1 -Wl,--gc-sections -o ../../bin/qmltyperegistrar .obj/resourcefilemapper.o .obj/qmlstreamwriter.o .obj/qmltyperegistrar.o .obj/qmltypesclassdescription.o .obj/qmltypescreator.o   -latomic /home/qschulz/work/upstream/buildroot/output/host/lib/libQt5Bootstrap.a -lpthread  -lrt -lpthread -ldl
/usr/bin/ld: cannot find /usr/lib64/libatomic.so.1.2.0
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:87: ../../bin/qmltyperegistrar] Error 1
make[3]: Leaving directory '/home/qschulz/work/upstream/buildroot/output/build/qt5declarative-5.15.2/src/qmltyperegistrar'
make[2]: *** [Makefile:57: sub-qmltyperegistrar-make_first-ordered] Error 2
make[2]: Leaving directory '/home/qschulz/work/upstream/buildroot/output/build/qt5declarative-5.15.2/src'
make[1]: *** [Makefile:50: sub-src-make_first] Error 2
make[1]: Leaving directory '/home/qschulz/work/upstream/buildroot/output/build/qt5declarative-5.15.2'
make: *** [package/pkg-generic.mk:270: /home/qschulz/work/upstream/buildroot/output/build/qt5declarative-5.15.2/.stamp_built] Error 2
```

On Fedora 34 (probably 33 and earlier too), gcc package does not bring
libatomic so it is absent from the host rootfs.

```
$ find /usr -name "libatomic.so*"
/usr/lib/gcc/x86_64-redhat-linux/11/32/libatomic.so
/usr/lib/gcc/x86_64-redhat-linux/11/libatomic.so
$ cat /usr/lib/gcc/x86_64-redhat-linux/11/libatomic.so
INPUT ( /usr/lib64/libatomic.so.1.2.0 )
```

After installing libatomic from the package repository (c.f.
https://fedora.pkgs.org/34/fedora-updates-x86_64/libatomic-11.2.1-1.fc34.x86_64.rpm.html)
qt5declarative builds just fine.

In a (successful) build done on Debian Buster, I can see that qmltyperegistrar
is supposed to be built for the host.

Here are the .pro and resulting Makefile:

```
$ cat src/qmltyperegistrar/qmltyperegistrar.pro
option(host_build)

QT       = core-private
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII

QMAKE_TARGET_DESCRIPTION = QML Types Registrar

include(../../tools/shared/shared.pri)

SOURCES += \
    qmltyperegistrar.cpp \
    qmltypesclassdescription.cpp \
    qmltypescreator.cpp

HEADERS += \
    qmltypesclassdescription.h \
    qmltypescreator.h

build_integration.files = qmltypes.prf
build_integration.path = $$[QT_HOST_DATA]/mkspecs/features

prefix_build {
    load(qt_build_paths)
    qmltypes_to_builddir.files = qmltypes.prf
    qmltypes_to_builddir.path = $$MODULE_BASE_OUTDIR/mkspecs/features
    COPIES += qmltypes_to_builddir
    INSTALLS += build_integration
} else {
    COPIES += build_integration
}

load(qt_tool)

# cat src/qmltyperegistrar/Makefile
#############################################################################
# Makefile for building: ../../bin/qmltyperegistrar
# Generated by qmake (3.1) (Qt 5.15.2)
# Project:  qmltyperegistrar.pro
# Template: app
# Command: /home/qschulz/work/upstream/buildroot/output/host/bin/qmake -o Makefile qmltyperegistrar.pro -spec devices/linux-buildroot-g++
#############################################################################

MAKEFILE      = Makefile

EQ            = =

####### Compiler, tools and options

CC            = gcc
CXX           = g++
DEFINES       = -DQT_NO_LINKED_LIST -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_USE_QSTRINGBUILDER -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_BOOTSTRAP_LIB -DQT_VERSION_STR='"5.15.2"' -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=15 -DQT_VERSION_PATCH=2 -DQT_BOOTSTRAPPED -DQT_NO_CAST_TO_ASCII
CFLAGS        = -pipe -std=gnu11 -fno-exceptions -Wall -Wextra -ffunction-sections -fdata-sections -D_REENTRANT -fPIC $(DEFINES)
CXXFLAGS      = -pipe -std=c++11 -fno-exceptions -Wall -Wextra -ffunction-sections -fdata-sections -D_REENTRANT -fPIC $(DEFINES)
INCPATH       = -I. -I../../tools/shared -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore/5.15.2 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore/5.15.2/QtCore -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml/5.15.2 -I/home/qschulz/work/upstream/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtXml/5.15.2/QtXml -I/home/qschulz/work/upstream/buildroot/output/host/mkspecs/devices/linux-buildroot-g++
QMAKE         = /home/qschulz/work/upstream/buildroot/output/host/bin/qmake
DEL_FILE      = rm -f
CHK_DIR_EXISTS= test -d
MKDIR         = mkdir -p
COPY          = cp -f
COPY_FILE     = cp -f
COPY_DIR      = cp -f -R
INSTALL_FILE  = install -m 644 -p
INSTALL_PROGRAM = install -m 755 -p
INSTALL_DIR   = cp -f -R
QINSTALL      = /home/qschulz/work/upstream/buildroot/output/host/bin/qmake -install qinstall
QINSTALL_PROGRAM = /home/qschulz/work/upstream/buildroot/output/host/bin/qmake -install qinstall -exe
DEL_FILE      = rm -f
SYMLINK       = ln -f -s
DEL_DIR       = rmdir
MOVE          = mv -f
TAR           = tar -cf
COMPRESS      = gzip -9f
DISTNAME      = qmltyperegistrar5.15.2
DISTDIR = /home/qschulz/work/upstream/buildroot/output/build/qt5declarative-5.15.2/src/qmltyperegistrar/.obj/qmltyperegistrar5.15.2
LINK          = g++
LFLAGS        = -Wl,-O1 -Wl,--gc-sections
LIBS          = $(SUBLIBS) -latomic /home/qschulz/work/upstream/buildroot/output/host/lib/libQt5Bootstrap.a -lpthread  -lrt -lpthread -ldl
AR            = ar cqs
RANLIB        =
SED           = sed
STRIP         = strip
[...]
```
[full makefile can be found here: https://paste.ack.tf/a77eed]

From the logs and also the Makefile, it seems that qmltyperegistrar is
built with the wrong -spec passed to qmake. It should be
common/g++-base.conf (or something similar) and not
devices/linux-buildroot-g++ as currently.

This is confirmed a bit later in the Makefile with `-latomic` making it to LIBS
which might not be what's wanted?

This `-latomic` was added in
7d286be4f96cfb731e184c3e8cfea27a031bde3c "package/qt5base: link with -latomic when needed".

Here's the minimal defconfig I used to reproduce the issue:
```
BR2_aarch64=y
BR2_cortex_a35=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5DECLARATIVE=y
```

Let me know if there's anything I can do to help,
Thanks,
Quentin
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [BUG] qt5declarative not building on host distro without libatomic.so
  2021-08-05 10:31 [Buildroot] [BUG] qt5declarative not building on host distro without libatomic.so Quentin Schulz
@ 2021-08-05 14:43 ` Arnout Vandecappelle
  2021-08-06 14:41   ` Quentin Schulz
  0 siblings, 1 reply; 3+ messages in thread
From: Arnout Vandecappelle @ 2021-08-05 14:43 UTC (permalink / raw)
  To: Quentin Schulz, buildroot; +Cc: ps.report, yann.morin.1998, thomas.petazzoni

 Hi Quentin,

On 05/08/2021 12:31, Quentin Schulz wrote:

[snip]> From the logs and also the Makefile, it seems that qmltyperegistrar is
> built with the wrong -spec passed to qmake. It should be
> common/g++-base.conf (or something similar) and not
> devices/linux-buildroot-g++ as currently.

 After a lot of analysis I come to the same conclusion.

> This is confirmed a bit later in the Makefile with `-latomic` making it to LIBS
> which might not be what's wanted?
> 
> This `-latomic` was added in
> 7d286be4f96cfb731e184c3e8cfea27a031bde3c "package/qt5base: link with -latomic when needed".

 We end up with $(HOST_DIR)/mkspecs/devices/linux-buildroot-g++/arch.conf that
looks like this:

-----8<-----8<-----
LIBS += -latomic
-----8<-----8<-----

 Perhaps that should be changed into:

-----8<-----8<-----
!host_build {
    LIBS += -latomic
}
-----8<-----8<-----


 Can you give that a go, and if it works, create a patch?


 Regards,
 Arnout



> 
> Here's the minimal defconfig I used to reproduce the issue:
> ```
> BR2_aarch64=y
> BR2_cortex_a35=y
> BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
> BR2_TOOLCHAIN_BUILDROOT_CXX=y
> BR2_PACKAGE_QT5=y
> BR2_PACKAGE_QT5DECLARATIVE=y
> ```
> 
> Let me know if there's anything I can do to help,
> Thanks,
> Quentin
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [BUG] qt5declarative not building on host distro without libatomic.so
  2021-08-05 14:43 ` Arnout Vandecappelle
@ 2021-08-06 14:41   ` Quentin Schulz
  0 siblings, 0 replies; 3+ messages in thread
From: Quentin Schulz @ 2021-08-06 14:41 UTC (permalink / raw)
  To: Arnout Vandecappelle
  Cc: buildroot, ps.report, yann.morin.1998, thomas.petazzoni

Hi Arnout,

On Thu, Aug 05, 2021 at 04:43:50PM +0200, Arnout Vandecappelle wrote:
>  Hi Quentin,
> 
> On 05/08/2021 12:31, Quentin Schulz wrote:
> 
> [snip]> From the logs and also the Makefile, it seems that qmltyperegistrar is
> > built with the wrong -spec passed to qmake. It should be
> > common/g++-base.conf (or something similar) and not
> > devices/linux-buildroot-g++ as currently.
> 
>  After a lot of analysis I come to the same conclusion.
> 
> > This is confirmed a bit later in the Makefile with `-latomic` making it to LIBS
> > which might not be what's wanted?
> > 
> > This `-latomic` was added in
> > 7d286be4f96cfb731e184c3e8cfea27a031bde3c "package/qt5base: link with -latomic when needed".
> 
>  We end up with $(HOST_DIR)/mkspecs/devices/linux-buildroot-g++/arch.conf that
> looks like this:
> 
> -----8<-----8<-----
> LIBS += -latomic
> -----8<-----8<-----
> 
>  Perhaps that should be changed into:
> 
> -----8<-----8<-----
> !host_build {
>     LIBS += -latomic
> }
> -----8<-----8<-----
> 
> 
>  Can you give that a go, and if it works, create a patch?
> 
> 

This seems to work just fine, thanks!

I've sent a patch. I've added a Suggested-by for you, not sure if it
should have your s-o-b or if you want to be the author, lemme know if
there's anything you want changed.

Thanks!

Regards,
Quentin
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-06 14:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05 10:31 [Buildroot] [BUG] qt5declarative not building on host distro without libatomic.so Quentin Schulz
2021-08-05 14:43 ` Arnout Vandecappelle
2021-08-06 14:41   ` Quentin Schulz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.