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="/usr/local/lib/qt5/mkspecs/freebsd-$(ccver="$(/nxb-bin/usr/bin/c++ 
--version)"; case "$ccver" in *clang*) echo clang ;; *) echo g++ ;; esac)" 
MAKE="make" QT_SELECT=qt5 PKG_CONFIG=pkgconf 
XDG_DATA_HOME=/wrkdirs/usr/ports/x11-toolkits/qt5-gui/work  
XDG_CONFIG_HOME=/wrkdirs/usr/ports/x11-toolkits/qt5-gui/work  
HOME=/wrkdirs/usr/ports/x11-toolkits/qt5-gui/work TMPDIR="/tmp" SHELL=/bin/sh 
CONFIG_SHELL=/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=/nxb-bin/usr/bin/cc
CPP=/nxb-bin/usr/bin/cpp
CXX=/nxb-bin/usr/bin/c++
AS=/nxb-bin/usr/bin/as
NM=/nxb-bin/usr/bin/nm
LD=/nxb-bin/usr/bin/ld
OBJCOPY=/nxb-bin/usr/bin/objcopy
SIZE=/nxb-bin/usr/bin/size
STRIPBIN=/nxb-bin/usr/bin/strip
SED=/nxb-bin/usr/bin/sed
READELF=/nxb-bin/usr/bin/readelf
RANLIB=/nxb-bin/usr/bin/ranlib
YACC=/nxb-bin/usr/bin/yacc
MAKE=/nxb-bin/usr/bin/make
STRINGS=/nxb-bin/usr/bin/strings
AWK=/nxb-bin/usr/bin/awk
FLEX=/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="arm"
CFG_CPUFEATURES=""
System architecture: 'arm'
Host architecture: 'arm'
clang++ -c -fvisibility=hidden 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 = /nxb-bin/usr/bin/cc QMAKE_CXX = 
/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/src/gui/../../include/QtGui/5.7.1/QtGui/private/../../../../../src/gui/painting/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/src/gui/../../include/QtGui/5.7.1/QtGui/private/../../../../../src/gui/painting/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/src/gui/../../include/QtGui/5.7.1/QtGui/private/../../../../../src/gui/painting/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=none
              FCT=build_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=cortex-a7 , installed via
installworld distrib-dirs distribution DB_FROM_SRC=1 DESTDIR=. . . :

# more ~/src.configs/src.conf.armv7-clang-bootstrap.amd64-host 
TO_TYPE=armv6
#
KERNCONF=GENERIC-NODBG
TARGET=arm
.if ${.MAKE.LEVEL} == 0
TARGET_ARCH=${TO_TYPE}
.export TARGET_ARCH
.endif
#
WITH_CROSS_COMPILER=
WITHOUT_SYSTEM_COMPILER=
#
#CPUTYPE=soft
WITH_LIBCPLUSPLUS=
WITH_BINUTILS_BOOTSTRAP=
WITH_ELFTOOLCHAIN_BOOTSTRAP=
WITH_CLANG_BOOTSTRAP=
WITH_CLANG=
WITH_CLANG_IS_CC=
WITH_CLANG_FULL=
WITH_CLANG_EXTRAS=
WITH_LLD=
#
# Linking lldb fails for armv6(/v7)
WITHOUT_LLDB=
#
WITH_BOOT=
WITHOUT_LIB32=
WITHOUT_LIBSOFT=
#
WITHOUT_GCC_BOOTSTRAP=
WITHOUT_GCC=
WITHOUT_GCC_IS_CC=
WITHOUT_GNUCXX=
#
NO_WERROR=
#WERROR=
MALLOC_PRODUCTION=
#
WITH_REPRODUCIBLE_BUILD=
WITH_DEBUG_FILES=
#
XCFLAGS+= -mcpu=cortex-a7
XCXXFLAGS+= -mcpu=cortex-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=1
#
DEFAULT_VERSIONS+=perl5=5.24 gcc=7
#
# From a local /usr/ports/Mk/bsd.port.mk extension:
ALLOW_OPTIMIZATIONS_FOR_WITH_DEBUG=
#
.if ${.CURDIR:M*/devel/llvm*}
#WITH_DEBUG=
.elif ${.CURDIR:M*/www/webkit-qt5*}
#WITH_DEBUG=
.else
WITH_DEBUG=
.endif
MALLOC_PRODUCTION=


# more /usr/local/etc/poudriere.d/zrFBSDx64CjailArmV7-make.conf                 
                                             
CFLAGS+= -mcpu=cortex-a7
CXXFLAGS+= -mcpu=cortex-a7
CPPFLAGS+= -mcpu=cortex-a7


As for that "ALLOW_OPTIMIZATIONS_FOR_WITH_DEBUG" I have
in /usr/ports/Mk/bsd.port.mk :

STRIP_CMD=      ${TRUE}
.endif
DEBUG_FLAGS?=   -g
+.if defined(ALLOW_OPTIMIZATIONS_FOR_WITH_DEBUG)
+CFLAGS:=               ${CFLAGS} ${DEBUG_FLAGS}
+.else
CFLAGS:=                ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS}
+.endif
.if defined(INSTALL_TARGET)
INSTALL_TARGET:=        ${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!=        ${UNAME} -s
+OPSYS!=        echo FreeBSD
.endif
_EXPORTED_VARS+=        OPSYS

.if !defined(_OSRELEASE)
-_OSRELEASE!=   ${UNAME} -r
+_OSRELEASE!=   echo 12.0-CURRENT
.endif
_EXPORTED_VARS+=        _OSRELEASE



===
Mark Millard
markmi at dsl-only.net

_______________________________________________
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"

Reply via email to