From owner-freebsd-ports-bugs@freebsd.org Sun Jan 17 22:44:51 2016 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05A9CA863D1 for ; Sun, 17 Jan 2016 22:44:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEAC311A6 for ; Sun, 17 Jan 2016 22:44:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HMiosP093679 for ; Sun, 17 Jan 2016 22:44:50 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 206348] x11-toolkits/qt5-gui : clang++ used with -mcpu=cortex-a7 -mfloat-abi=softfp results in: undefined reference to `qt_convert_rgb888_to_rgb32_neon( . . . ) Date: Sun, 17 Jan 2016 22:44:50 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: markmi@dsl-only.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: kde@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2016 22:44:51 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206348 Bug ID: 206348 Summary: x11-toolkits/qt5-gui : clang++ used with -mcpu=3Dcortex-a7 -mfloat-abi=3Dsoftfp results in: undefined reference to `qt_convert_rgb888_to_rgb32_neon( . . . ) Product: Ports & Packages Version: Latest Hardware: arm OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: kde@FreeBSD.org Reporter: markmi@dsl-only.net Assignee: kde@FreeBSD.org Flags: maintainer-feedback?(kde@FreeBSD.org) For clang++ used with -target armv6--freebsd11.0-gnueabi -march=3Darmv7-a -mcpu=3Dcortex-a7 -mfloat-abi=3Dsoftfp the eventual result of "portmaster -DK x11-toolkits/qt5-gui" is: undefined reference to `qt_convert_rgb888_to_rgb32_neon(unsigned int*, unsi= gned char const*, int)' Details follow. First the message generated during the attempted portmaster= -DK : --- ../../../../plugins/imageformats/libqjpeg.so --- rm -f libqjpeg.so /usr/bin/clang++ -target armv6--freebsd11.0-gnueabi -march=3Darmv7-a -mcpu=3Dcortex-a7 -mfloat-abi=3Dsoftfp -mno-unaligned-access -Wl,--no-undef= ined -pthread -shared -o libqjpeg.so .obj/qjpeghandler.o .obj/main.o=20 .obj/moc_main.o=20 -L/usr/obj/portswork/usr/ports/x11-toolkits/qt5-gui/work/qtbase-opensource-= src-5.4.1/lib -L/usr/local/lib -ljpeg -lQt5Gui -lQt5Core -lGL=20 .obj/qjpeghandler.o: In function `QJpegHandler::QJpegHandler()': /usr/obj/portswork/usr/ports/x11-toolkits/qt5-gui/work/qtbase-opensource-sr= c-5.4.1/src/plugins/imageformats/jpeg/../../../gui/image/qjpeghandler.cpp:1= 024: undefined reference to `qt_convert_rgb888_to_rgb32_neon(unsigned int*, unsi= gned char const*, int)' clang++: error: linker command failed with exit code 1 (use -v to see invocation) *** [../../../../plugins/imageformats/libqjpeg.so] Error code 1 make[2]: stopped in /usr/obj/portswork/usr/ports/x11-toolkits/qt5-gui/work/qtbase-opensource-sr= c-5.4.1/src/plugins/imageformats/jpeg 1 error . . . That reference to the routine is compiled in because. . . /usr/obj/portswork/usr/ports/x11-toolkits/qt5-gui/work/qtbase-opensource-sr= c-5.4.1/src/plugins/imageformats/jpeg/../../../gui/image/qjpeghandler.cpp has: Q_GUI_EXPORT void QT_FASTCALL qt_convert_rgb888_to_rgb32_neon(quint32 *dst, const uchar *src, int len); . . . QJpegHandler::QJpegHandler() : d(new QJpegHandlerPrivate(this)) { #if defined(__ARM_NEON__) && !defined(Q_PROCESSOR_ARM_64) // from qimage_neon.cpp if (qCpuHasFeature(NEON)) rgb888ToRgb32ConverterPtr =3D qt_convert_rgb888_to_rgb32_neon; #endif . . . and. . . /usr/obj/portswork/usr/ports/x11-toolkits/qt5-gui/work/qtbase-opensource-sr= c-5.4.1/src/corelib/tools/qsimd_p.h has: static const uint qCompilerCpuFeatures =3D 0 . . . #if defined __ARM_NEON__ | NEON #endif . . . #define qCpuHasFeature(feature) ((qCompilerCpuFeatures & (feature)) || (qCpuFeatures() & (feature))) So qCpuHasFeature(NEON) also is doing auto-detection of NEON. (The above is not the necessarily the only code to do such automatic detections.) But the infrastructure that decides if it is going to compile the file that defines qt_covert_rgb888_to_rgb32_neon does not do automatic detection. In = fact no command line option can enable such compilation: a file such as qtbase-opensource-src-5.4.1/configure has to be edited. In other words: /usr/obj/portswork/usr/ports/x11-toolkits/qt5-gui/work/qtbase-opensource-sr= c-5.4.1/configure has no way to add neon to QMAKE_CONFIG as things are: See below for the properties that CFG_CPUFEATURES is never modified after being initialized. = Nor is CFG_NEON. So the only 'QMAKE_CONFIG=3D"$QMAKE_CONFIG neon"' never happen= s as is. QMAKE_CONFIG=3D . . . CFG_CPUFEATURES=3D . . . CFG_NEON=3Dauto . . . # check Neon support if [ "$CFG_NEON" =3D "auto" ]; then # no compile test, just check what the compiler has case "$CFG_CPUFEATURES" in *neon*) CFG_NEON=3Dyes ;; *) CFG_NEON=3Dno ;; esac fi . . . [ "$CFG_NEON" =3D "yes" ] && QMAKE_CONFIG=3D"$QMAKE_CONFIG neon" . . . elif [ "$CFG_ARCH" =3D "arm" ]; then echo " Neon ................. ${CFG_NEON}" There is even this note from 5.3.0: /usr/obj/portswork/usr/ports/x11-toolkits/qt5-gui/work/qtbase-opensource-sr= c-5.4.1/dist/changes-5.3.0, says: * [QTBUG-30440] Qt no longer checks for support for the Neon FPU on ARM platforms at runtime. Code optimized for Neon must be enabled unconditionally at compile time by ensuring the compiler supports Neon. You may need to edit your mkspec for that. Note the "edit your mkspec" part of that wording. I'll report that -target armv6--freebsd11.0-gnueabi -march=3Darmv7-a -mcpu=3Dcortex-a7 -mfloat-abi=3Dsoftfp is appropriate to a rpi2 (as one example). It is not an arbitrary combinati= on. --=20 You are receiving this mail because: You are the assignee for the bug.=