[MacPorts] #62051: qt5*-qtbase: error: redefinition of '__bsrd' as different kind of symbol

MacPorts noreply at macports.org
Wed Jan 13 04:31:09 UTC 2021


#62051: qt5*-qtbase: error: redefinition of '__bsrd' as different kind of symbol
-------------------------+-------------------------------------------------
 Reporter:               |      Owner:  MarcusCalhoun-Lopez
  chrstphrchvz           |
     Type:  defect       |     Status:  assigned
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:  2.6.4
 Keywords:               |       Port:  qt57-qtbase qt56-qtbase qt55-qtbase
                         |  qt53-qtbase
-------------------------+-------------------------------------------------
 The fix for #59364 does not also work for Xcode 11.4 and newer
 ([https://build.macports.org/builders/ports-10.15_x86_64-builder/builds/43027/steps
 /install-port/logs/stdio example error log]):
 {{{
 In file included from
 /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_aqua_qt57/qt57-qtbase/work
 /qtbase-opensource-src-5.7.1/src/corelib/codecs/qutfcodec.cpp:46:
 In file included from
 /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_aqua_qt57/qt57-qtbase/work
 /qtbase-opensource-
 src-5.7.1/include/QtCore/5.7.1/QtCore/private/qsimd_p.h:1:
 /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_aqua_qt57/qt57-qtbase/work
 /qtbase-opensource-
 src-5.7.1/include/QtCore/5.7.1/QtCore/private/../../../../../src/corelib/tools/qsimd_p.h:469:33:
 error: redefinition of '__bsrd' as different kind of symbol
 static Q_ALWAYS_INLINE unsigned _bit_scan_reverse(unsigned val)
                                 ^
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.3/include/ia32intrin.h:73:30:
 note: expanded from macro '_bit_scan_reverse'
 #define _bit_scan_reverse(A) __bsrd((A))
                              ^
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.3/include/ia32intrin.h:47:1:
 note: previous definition is here
 __bsrd(int __A) {
 ^
 }}}

 The fix tried to use `Q_CC_CLANG` to detect clang 9.0 and newer, but
 qcompilerdetection.h lacks mapping of more recent Xcode versions to
 upstream clang, so `Q_CC_CLANG` is defined too low of a value. It should
 be possible to update qcompilerdetection.h with the needed mapping (i.e.
 that Xcode 11.4 and newer are based on LLVM clang 9.0 and newer).
 Alternatives might be to test for intrinsics directly with `#if
 defined()`; or backport [https://github.com/qt/qtbase/commit/e70324f8dd
 qtbase commit e70324f8dd], [https://github.com/fink/fink-
 distributions/blob/f318e9c473/10.9-libcxx/stable/main/finkinfo/libs/qt5
 -qtbase-e70324f.patch as done by fink for Qt 5.7].

 (I personally do not need older Qt5 versions, but allowing them to build
 on more recent OSes may help with fixing build problems affecting all
 OSes, e.g. #60889.)

-- 
Ticket URL: <https://trac.macports.org/ticket/62051>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list