Date: Tue, 5 Sep 2017 16:38:32 -0700 From: Mark Millard <markmi@dsl-only.net> To: freebsd-arm <freebsd-arm@freebsd.org>, x11@FreeBSD.org, FreeBSD Ports <freebsd-ports@freebsd.org> Cc: FreeBSD Toolchain <freebsd-toolchain@freebsd.org> Subject: x11-toolkits/qt5-gui vs. arm.armv6 build via poudriere cross build: fails (undefined references) and odd mix of "clang++" vs. "/nxb-bin/usr/bin/c++" Message-ID: <4142F136-53C5-40CF-8B0A-BE68BC9EBFC6@dsl-only.net>
next in thread | raw e-mail | index | archive | help
This is a bit odd so I give it in stages. The context is based on: poudriere jail -c -j zrFBSDx64CjailArmV7 -a arm.armv6 -x -m null -M = /usr/obj/DESTDIRs/clang-armv7-installworld-poud -S /usr/src -v = 12.0-CURRENT poudriere bulk -j zrFBSDx64CjailArmV7 -w -f /root/armv7-origins.txt (More details given later.) First there is some unexpected use of (for example) clang++ instead of /nxb-bin/usr/bin/c++ . Then later I show some undefined references that make the build fail. For the clang++ vs. /nxb-bin/usr/bin/c++ there was (for example): --CONFIGURE_ENV-- = QMAKESPEC=3D"/usr/local/lib/qt5/mkspecs/freebsd-$(ccver=3D"$(/nxb-bin/usr/= bin/c++ --version)"; case "$ccver" in *clang*) echo clang ;; *) echo g++ = ;; esac)" MAKE=3D"make" QT_SELECT=3Dqt5 PKG_CONFIG=3Dpkgconf = XDG_DATA_HOME=3D/wrkdirs/usr/ports/x11-toolkits/qt5-gui/work = XDG_CONFIG_HOME=3D/wrkdirs/usr/ports/x11-toolkits/qt5-gui/work = HOME=3D/wrkdirs/usr/ports/x11-toolkits/qt5-gui/work TMPDIR=3D"/tmp" = SHELL=3D/bin/sh CONFIG_SHELL=3D/bin/sh --End CONFIGURE_ENV-- Note the expected use of /nxb-bin/usr/bin/c++ . There is also the later: ---Begin make.nxb.conf--- CC=3D/nxb-bin/usr/bin/cc CPP=3D/nxb-bin/usr/bin/cpp CXX=3D/nxb-bin/usr/bin/c++ AS=3D/nxb-bin/usr/bin/as NM=3D/nxb-bin/usr/bin/nm LD=3D/nxb-bin/usr/bin/ld OBJCOPY=3D/nxb-bin/usr/bin/objcopy SIZE=3D/nxb-bin/usr/bin/size STRIPBIN=3D/nxb-bin/usr/bin/strip SED=3D/nxb-bin/usr/bin/sed READELF=3D/nxb-bin/usr/bin/readelf RANLIB=3D/nxb-bin/usr/bin/ranlib YACC=3D/nxb-bin/usr/bin/yacc MAKE=3D/nxb-bin/usr/bin/make STRINGS=3D/nxb-bin/usr/bin/strings AWK=3D/nxb-bin/usr/bin/awk FLEX=3D/nxb-bin/usr/bin/flex ---End make.nxb.conf--- Yet for some reason x11-toolkits/qt5-gui reports using clang++ commands in config activity instead. For example: Running configuration tests... Determining architecture... () clang++ -c -pipe -g -Wall -W -fPIC -I. -I/usr/local/include = -I/usr/local/lib/qt5/mkspecs/freebsd-clang -o arch.o arch.cpp clang++ -o arch arch.o -L/usr/local/lib Found architecture in binary CFG_ARCH=3D"arm" CFG_CPUFEATURES=3D"" System architecture: 'arm' Host architecture: 'arm' clang++ -c -fvisibility=3Dhidden fvisibility.c clang++: warning: treating 'c' input as 'c++' when in C++ mode, this = behavior is deprecated [-Wdeprecated] Symbol visibility control enabled. clang++ -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC = bsymbolic_functions.c clang++: warning: treating 'c' input as 'c++' when in C++ mode, this = behavior is deprecated [-Wdeprecated] bsymbolic_functions.c:2:2: error: "Symbolic function binding on this = architecture may be broken, disabling it (see QTBUG-36129)." #error "Symbolic function binding on this architecture may be broken, = disabling it (see QTBUG-36129)." ^ 1 error generated. Symbolic function binding disabled. (I omit a lot more such "clang++" lines in the config stages of output. I did not see any /nxb-bin/usr/bin/c++ in that area.) Still it later reports: Configure summary Build type: /usr/local/lib/qt5/mkspecs/freebsd-clang (arm, CPU = features: none detected) qmake vars .......... QMAKE_CC =3D /nxb-bin/usr/bin/cc QMAKE_CXX =3D = /nxb-bin/usr/bin/c++ . . . It later uses the /nxb-bin/usr/bin/c* commands in the actual build. As for the build failure itself. . . --- ../../lib/libQt5Gui.so.5.7.1 --- rm -f libQt5Gui.so.5.7.1 libQt5Gui.so libQt5Gui.so.5 libQt5Gui.so.5.7 /nxb-bin/usr/bin/c++ -Wl,--as-needed -Wl,--no-undefined = -Wl,--version-script,QtGui.version -Wl,--enable-new-dtags -pthread = -Wl,-rpath,/usr/local/lib/qt5 -shared -Wl,-soname,libQt5Gui.so.5 -o = libQt5Gui.so.5.7.1 .obj/qaccessible.o . . . fails with: .obj/qimage.o: In function `_ZL10qt_memfillIjEvPT_S0_i': = /wrkdirs/usr/ports/x11-toolkits/qt5-gui/work/qtbase-opensource-src-5.7.1/s= rc/gui/../../include/QtGui/5.7.1/QtGui/private/../../../../../src/gui/pain= ting/qdrawhelper_p.h:803: undefined reference to `qt_memfill32(unsigned = int*, unsigned int, int)' = /wrkdirs/usr/ports/x11-toolkits/qt5-gui/work/qtbase-opensource-src-5.7.1/s= rc/gui/../../include/QtGui/5.7.1/QtGui/private/../../../../../src/gui/pain= ting/qdrawhelper_p.h:803: undefined reference to `qt_memfill32(unsigned = int*, unsigned int, int)' .obj/qimage_conversions.o:(.data+0x524): undefined reference to = `convert_RGB888_to_RGB32_neon(QImageData*, QImageData const*, = QFlags<Qt::ImageConversionFlag>)' .obj/qimage_conversions.o:(.data+0x528): undefined reference to = `convert_RGB888_to_RGB32_neon(QImageData*, QImageData const*, = QFlags<Qt::ImageConversionFlag>)' .obj/qimage_conversions.o:(.data+0x52c): undefined reference to = `convert_RGB888_to_RGB32_neon(QImageData*, QImageData const*, = QFlags<Qt::ImageConversionFlag>)' .obj/qcompositionfunctions.o: In function `_ZL10qt_memfillIjEvPT_S0_i': = /wrkdirs/usr/ports/x11-toolkits/qt5-gui/work/qtbase-opensource-src-5.7.1/s= rc/gui/../../include/QtGui/5.7.1/QtGui/private/../../../../../src/gui/pain= ting/qdrawhelper_p.h:803: undefined reference to `qt_memfill32(unsigned = int*, unsigned int, int)' . . . (I've omitted a lot more such notices of undefined references.) The context for all the above is from a poudriere/qemu-user-static/native_xtools based cross build from amd64: poudriere jail -c -j zrFBSDx64CjailArmV7 -a arm.armv6 -x -m null -M = /usr/obj/DESTDIRs/clang-armv7-installworld-poud -S /usr/src -v = 12.0-CURRENT poudriere bulk -j zrFBSDx64CjailArmV7 -w -f /root/armv7-origins.txt The -x use was enabled for -m null via: /usr/local/share/poudriere/jail.sh having a "build_native_xtools" added: null) JAILFS=3Dnone FCT=3Dbuild_native_xtools ;; # uname -apKU FreeBSD FreeBSDx64OPC 12.0-CURRENT FreeBSD 12.0-CURRENT r323147M amd64 = amd64 1200043 1200043 /usr/obj/DESTDIRs/clang-armv7-installworld-poud is from an arm/armv6 build of the same sources using -mcpu=3Dcortex-a7 , installed via installworld distrib-dirs distribution DB_FROM_SRC=3D1 DESTDIR=3D. . . : # more ~/src.configs/src.conf.armv7-clang-bootstrap.amd64-host=20 TO_TYPE=3Darmv6 # KERNCONF=3DGENERIC-NODBG TARGET=3Darm .if ${.MAKE.LEVEL} =3D=3D 0 TARGET_ARCH=3D${TO_TYPE} .export TARGET_ARCH .endif # WITH_CROSS_COMPILER=3D WITHOUT_SYSTEM_COMPILER=3D # #CPUTYPE=3Dsoft WITH_LIBCPLUSPLUS=3D WITH_BINUTILS_BOOTSTRAP=3D WITH_ELFTOOLCHAIN_BOOTSTRAP=3D WITH_CLANG_BOOTSTRAP=3D WITH_CLANG=3D WITH_CLANG_IS_CC=3D WITH_CLANG_FULL=3D WITH_CLANG_EXTRAS=3D WITH_LLD=3D # # Linking lldb fails for armv6(/v7) WITHOUT_LLDB=3D # WITH_BOOT=3D WITHOUT_LIB32=3D WITHOUT_LIBSOFT=3D # WITHOUT_GCC_BOOTSTRAP=3D WITHOUT_GCC=3D WITHOUT_GCC_IS_CC=3D WITHOUT_GNUCXX=3D # NO_WERROR=3D #WERROR=3D MALLOC_PRODUCTION=3D # WITH_REPRODUCIBLE_BUILD=3D WITH_DEBUG_FILES=3D # XCFLAGS+=3D -mcpu=3Dcortex-a7 XCXXFLAGS+=3D -mcpu=3Dcortex-a7 # There is no XCPPFLAGS but XCPP gets XCFLAGS content. The source variations are almost all for powerpc family explorations: # svnlite status /usr/src/ | sort ? /usr/src/sys/amd64/conf/GENERIC-DBG ? /usr/src/sys/amd64/conf/GENERIC-NODBG ? /usr/src/sys/arm/conf/GENERIC-DBG ? /usr/src/sys/arm/conf/GENERIC-NODBG ? /usr/src/sys/arm64/conf/GENERIC-DBG ? /usr/src/sys/arm64/conf/GENERIC-NODBG ? /usr/src/sys/powerpc/conf/GENERIC64vtsc-DBG ? /usr/src/sys/powerpc/conf/GENERIC64vtsc-NODBG ? /usr/src/sys/powerpc/conf/GENERICvtsc-DBG ? /usr/src/sys/powerpc/conf/GENERICvtsc-NODBG M /usr/src/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp M /usr/src/contrib/llvm/tools/lld/ELF/Arch/PPC64.cpp M /usr/src/crypto/openssl/crypto/armcap.c M /usr/src/lib/Makefile M /usr/src/lib/libkvm/kvm_powerpc.c M /usr/src/lib/libkvm/kvm_private.c M /usr/src/sys/boot/ofw/Makefile.inc M /usr/src/sys/boot/powerpc/Makefile.inc M /usr/src/sys/boot/powerpc/boot1.chrp/Makefile M /usr/src/sys/boot/powerpc/kboot/Makefile M /usr/src/sys/boot/uboot/Makefile.inc M /usr/src/sys/conf/kmod.mk M /usr/src/sys/conf/ldscript.powerpc M /usr/src/sys/kern/subr_pcpu.c M /usr/src/sys/powerpc/aim/mmu_oea64.c M /usr/src/sys/powerpc/ofw/ofw_machdep.c M /usr/src/sys/powerpc/powerpc/interrupt.c M /usr/src/sys/powerpc/powerpc/mp_machdep.c M /usr/src/sys/powerpc/powerpc/trap.c # svnlite info /usr/ports/ | grep "Re[plv]" Relative URL: ^/head Repository Root: svn://svn.freebsd.org/ports Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5 Revision: 449313 Last Changed Rev: 449313 # svnlite status /usr/ports/ | sort M /usr/ports/Mk/bsd.port.mk M /usr/ports/base/gcc/Makefile M /usr/ports/base/gcc/distinfo M /usr/ports/base/gcc/pkg-plist M /usr/ports/devel/libunwind/Makefile M /usr/ports/sysutils/cdrdao/Makefile # more /usr/local/etc/poudriere.d/make.conf WANT_QT_VERBOSE_CONFIGURE=3D1 # DEFAULT_VERSIONS+=3Dperl5=3D5.24 gcc=3D7 # # =46rom a local /usr/ports/Mk/bsd.port.mk extension: ALLOW_OPTIMIZATIONS_FOR_WITH_DEBUG=3D # .if ${.CURDIR:M*/devel/llvm*} #WITH_DEBUG=3D .elif ${.CURDIR:M*/www/webkit-qt5*} #WITH_DEBUG=3D .else WITH_DEBUG=3D .endif MALLOC_PRODUCTION=3D # more /usr/local/etc/poudriere.d/zrFBSDx64CjailArmV7-make.conf = =20 CFLAGS+=3D -mcpu=3Dcortex-a7 CXXFLAGS+=3D -mcpu=3Dcortex-a7 CPPFLAGS+=3D -mcpu=3Dcortex-a7 As for that "ALLOW_OPTIMIZATIONS_FOR_WITH_DEBUG" I have in /usr/ports/Mk/bsd.port.mk : STRIP_CMD=3D ${TRUE} .endif DEBUG_FLAGS?=3D -g +.if defined(ALLOW_OPTIMIZATIONS_FOR_WITH_DEBUG) +CFLAGS:=3D ${CFLAGS} ${DEBUG_FLAGS} +.else CFLAGS:=3D ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS} +.endif .if defined(INSTALL_TARGET) INSTALL_TARGET:=3D ${INSTALL_TARGET:S/^install-strip$/install/g} .endif I've also had trouble in some contexts where bad.port.mk uses ${UNAME} (empty string results) and so have forced the expected content to match the context that this is in a couple of the places: # Get the operating system type .if !defined(OPSYS) -OPSYS!=3D ${UNAME} -s +OPSYS!=3D echo FreeBSD .endif _EXPORTED_VARS+=3D OPSYS .if !defined(_OSRELEASE) -_OSRELEASE!=3D ${UNAME} -r +_OSRELEASE!=3D echo 12.0-CURRENT .endif _EXPORTED_VARS+=3D _OSRELEASE =3D=3D=3D Mark Millard markmi at dsl-only.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4142F136-53C5-40CF-8B0A-BE68BC9EBFC6>