Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 May 2019 16:20:15 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        ports-list freebsd <freebsd-ports@freebsd.org>, tcberner@freebsd.org
Cc:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: FYI: Unable to build -r501994 ports' devel/qt5-core on clang 8 based powerpc64 system: "Q_ATOMIC_INT64_IS_SUPPORTED must be defined on a 64-bit platform"
Message-ID:  <3B8E25C1-1EB4-4D18-A45F-72555C3AC13D@yahoo.com>
In-Reply-To: <2E1BCA58-8420-4B74-A0CB-FBDC744BDDA6@yahoo.com>
References:  <2E1BCA58-8420-4B74-A0CB-FBDC744BDDA6@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I'm top posting because the problem originally reported seems to be
a later consequence of a much earlier problem. Looking in the logs
showed lots of use of -I%%LOCALBASE%%/lib/gcc8/include/c++ and looking =
in:

=
/wrkdirs/usr/ports/devel/qt5-core/work/qtbase-everywhere-src-5.12.2/mkspec=
s/freebsd-g++/qmake.conf

shows:

EXTRA_INCLUDEPATH       +=3D /usr/local/lib/gcc8/include =
%%LOCALBASE%%/lib/gcc8/include/c++


That seems to drive from the qmake.conf.bak:

EXTRA_INCLUDEPATH       +=3D /usr/local/lib/gcc%%GCC_DEFAULT%%/include =
%%LOCALBASE%%/lib/gcc%%GCC_DEFAULT%%/include/c++

So %%GCC_DEFAULT%% managed to be replaced corrctly.

Notably qmake.conf.orig does not have the line at all:

#
# qmake configuration for freebsd-g++
#

MAKEFILE_GENERATOR      =3D UNIX
QMAKE_PLATFORM          =3D freebsd

include(../common/bsd/bsd.conf)

# Addon software goes into /usr/local on FreeBSD, by default we will =
look there
QMAKE_INCDIR_POST       =3D /usr/local/include
QMAKE_LIBDIR_POST       =3D /usr/local/lib

include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
load(qt_config)



/usr/ports/Mk/Uses/qt-dist.mk has:

post-patch: gcc-post-patch
gcc-post-patch:
        ${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|' \
                ${WRKSRC}/mkspecs/common/gcc-base.conf \
                ${WRKSRC}/mkspecs/freebsd-g++/qmake.conf
        ${REINPLACE_CMD} 's|%%GCC_DEFAULT%%|${GCC_DEFAULT}|g' \
                ${WRKSRC}/mkspecs/common/gcc-base.conf \
                ${WRKSRC}/mkspecs/common/g++-base.conf \
                ${WRKSRC}/mkspecs/common/bsd/bsd.conf \
                ${WRKSRC}/mkspecs/freebsd-g++/qmake.conf

and:

post-patch: qtbase-post-patch
qtbase-post-patch:
        ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
                ${WRKSRC}/mkspecs/common/bsd/bsd.conf \
                ${WRKSRC}/mkspecs/freebsd-clang/qmake.conf


My guess here is that back in gcc-post-patch:

gcc-post-patch:
        ${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|' \
                ${WRKSRC}/mkspecs/common/gcc-base.conf \
                ${WRKSRC}/mkspecs/freebsd-g++/qmake.conf
. . .

it needs -e and a g in order to do more than one substitution:

gcc-post-patch:
        ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
                ${WRKSRC}/mkspecs/common/gcc-base.conf \
                ${WRKSRC}/mkspecs/freebsd-g++/qmake.conf
. . .

On 2019-May-19, at 07:40, Mark Millard <marklmi at yahoo.com> wrote:

> This was in a poudriere bulk build on a head -r347549 based powerpc64
> system with system clang 8 for cc and c++ and base/binutils
> for the likes of ld. But the build of qt5-core uses g++8.
>=20
> The log shows:
>=20
> --- .obj/qatomic.o ---
> g++8 -c -O2 -pipe -g -fstack-protector-strong =
-Wl,-rpath=3D/usr/local/lib/gcc8 -Wl,-rpath=3D/usr/local/lib/gcc8 -Og =
-std=3Dc++1z -fvisibility=3Dhidden -fvisibility-inlines-hidden -Wall -W =
-pthread -fPIC -DQT_GLIB -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH =
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_CORE_LIB =
-DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS =
-DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS =
-DQT_DISABLE_DEPRECATED_BEFORE=3D0x050000 -D_LARGEFILE64_SOURCE =
-D_LARGEFILE_SOURCE -I. -Iglobal -I../3rdparty/harfbuzz/src =
-I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty =
-I../3rdparty/double-conversion/include =
-I../3rdparty/double-conversion/include/double-conversion =
-I../3rdparty/forkfd -I../3rdparty/tinycbor/src -I../../include =
-I../../include/QtCore -I../../include/QtCore/5.12.2 =
-I../../include/QtCore/5.12.2/QtCore -I.moc -I.tracegen -isystem =
/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include =
-I/usr/local/lib/gcc8/include -I%%LOCALBASE%%/lib/gcc8/include/c++ =
-isystem /usr/local/include -I/usr/local/lib/qt5/mkspecs/freebsd-g++ -o =
.obj/qatomic.o thread/qatomic.cpp
> thread/qatomic.cpp:1624:4: error: #error "Q_ATOMIC_INT64_IS_SUPPORTED =
must be defined on a 64-bit platform"
> #  error "Q_ATOMIC_INT64_IS_SUPPORTED must be defined on a 64-bit =
platform"
>    ^~~~~
> In file included from ../../include/QtCore/qglobal.h:1,
>                 from thread/qatomic.h:41,
>                 from thread/qatomic.cpp:41:
> ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h: In =
instantiation of 'class QBasicAtomicInteger<long int>':
> ../../include/QtCore/../../src/corelib/thread/qatomic.h:55:7:   =
required from 'class QAtomicInteger<long int>'
> thread/qatomic.cpp:1631:1:   required from here
> ../../include/QtCore/../../src/corelib/global/qglobal.h:121:63: error: =
static assertion failed: template parameter is an integral of a size not =
supported on this platform
> #  define Q_STATIC_ASSERT_X(Condition, Message) =
static_assert(bool(Condition), Message)
>                                                               =
^~~~~~~~~~~~~~~
> ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:97:5: =
note: in expansion of macro 'Q_STATIC_ASSERT_X'
>     Q_STATIC_ASSERT_X(QAtomicOpsSupport<sizeof(T)>::IsSupported, =
"template parameter is an integral of a size not supported on this =
platform");
>     ^~~~~~~~~~~~~~~~~
> ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h: In =
instantiation of 'class QBasicAtomicInteger<long unsigned int>':
> ../../include/QtCore/../../src/corelib/thread/qatomic.h:55:7:   =
required from 'class QAtomicInteger<long unsigned int>'
> thread/qatomic.cpp:1632:1:   required from here
> ../../include/QtCore/../../src/corelib/global/qglobal.h:121:63: error: =
static assertion failed: template parameter is an integral of a size not =
supported on this platform
> #  define Q_STATIC_ASSERT_X(Condition, Message) =
static_assert(bool(Condition), Message)
>                                                               =
^~~~~~~~~~~~~~~
> ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:97:5: =
note: in expansion of macro 'Q_STATIC_ASSERT_X'
>     Q_STATIC_ASSERT_X(QAtomicOpsSupport<sizeof(T)>::IsSupported, =
"template parameter is an integral of a size not supported on this =
platform");
>     ^~~~~~~~~~~~~~~~~
> ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h: In =
instantiation of 'class QBasicAtomicInteger<long long unsigned int>':
> ../../include/QtCore/../../src/corelib/thread/qatomic.h:55:7:   =
required from 'class QAtomicInteger<long long unsigned int>'
> thread/qatomic.cpp:1633:1:   required from here
> ../../include/QtCore/../../src/corelib/global/qglobal.h:121:63: error: =
static assertion failed: template parameter is an integral of a size not =
supported on this platform
> #  define Q_STATIC_ASSERT_X(Condition, Message) =
static_assert(bool(Condition), Message)
>                                                               =
^~~~~~~~~~~~~~~
> ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:97:5: =
note: in expansion of macro 'Q_STATIC_ASSERT_X'
>     Q_STATIC_ASSERT_X(QAtomicOpsSupport<sizeof(T)>::IsSupported, =
"template parameter is an integral of a size not supported on this =
platform");
>     ^~~~~~~~~~~~~~~~~
> ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h: In =
instantiation of 'class QBasicAtomicInteger<long long int>':
> ../../include/QtCore/../../src/corelib/thread/qatomic.h:55:7:   =
required from 'class QAtomicInteger<long long int>'
> thread/qatomic.cpp:1634:1:   required from here
> ../../include/QtCore/../../src/corelib/global/qglobal.h:121:63: error: =
static assertion failed: template parameter is an integral of a size not =
supported on this platform
> #  define Q_STATIC_ASSERT_X(Condition, Message) =
static_assert(bool(Condition), Message)
>                                                               =
^~~~~~~~~~~~~~~
> ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:97:5: =
note: in expansion of macro 'Q_STATIC_ASSERT_X'
>     Q_STATIC_ASSERT_X(QAtomicOpsSupport<sizeof(T)>::IsSupported, =
"template parameter is an integral of a size not supported on this =
platform");
>     ^~~~~~~~~~~~~~~~~
> *** [.obj/qatomic.o] Error code 1
>=20
> make[1]: stopped in =
/wrkdirs/usr/ports/devel/qt5-core/work/qtbase-everywhere-src-5.12.2/src/co=
relib
> 1 error
>=20
> make[1]: stopped in =
/wrkdirs/usr/ports/devel/qt5-core/work/qtbase-everywhere-src-5.12.2/src/co=
relib
> *** Error code 2
>=20
> Stop.
> make: stopped in /usr/ports/devel/qt5-core
> =3D>> Cleaning up wrkdir
> =3D=3D=3D>  Cleaning for qt5-core-5.12.2_1
> build of devel/qt5-core | qt5-core-5.12.2_1 ended at Sun May 19 =
02:49:31 PDT 2019
> build time: 00:26:21
> !!! build failure encountered !!!
>=20
>=20
> For reference:
>=20
> Configure summary:
>=20
> Build type: freebsd-g++ (power64, CPU features: <none>)
> Compiler: unknown (gcc8)
> Configuration: compile_examples largefile optimize_debug shared rpath =
debug c++11 c++14 c++1z concurrent no-gui reduce_exports release_tools =
separate_debug_info stl no-widgets
> Build options:
>  Mode ................................... debug; optimized tools
>  Optimize debug build ................... yes
>  Building shared libraries .............. yes
>  Using C standard ....................... C11
>  Using C++ standard ..................... C++1z
>  Using ccache ........................... no
>  Using gold linker ...................... no
>  Using precompiled headers .............. no
>  Using LTCG ............................. no
>  Target compiler supports:
>  Build parts ............................ libs tools
> Qt modules and options:
>  Qt Concurrent .......................... yes
>  Qt D-Bus ............................... no
>  Qt D-Bus directly linked to libdbus .... no
>  Qt Gui ................................. no
>  Qt Network ............................. yes
>  Qt Sql ................................. yes
>  Qt Testlib ............................. yes
>  Qt Widgets ............................. no
>  Qt Xml ................................. yes
> Support enabled for:
>  Using pkg-config ....................... yes
>  udev ................................... no
>  Using system zlib ...................... yes
> Qt Core:
>  DoubleConversion ....................... yes
>    Using system DoubleConversion ........ no
>  GLib ................................... yes
>  iconv .................................. no
>  ICU .................................... yes
>  Tracing backend ........................ <none>
>  Logging backends:
>    journald ............................. no
>    syslog ............................... no
>    slog2 ................................ no
>  Using system PCRE2 ..................... yes
> Qt Network:
>  getifaddrs() ........................... yes
>  IPv6 ifname ............................ yes
>  libproxy ............................... no
>  OpenSSL ................................ no
>    Qt directly linked to OpenSSL ........ no
>  OpenSSL 1.1 ............................ no
>  DTLS ................................... no
>  SCTP ................................... no
>  Use system proxies ..................... yes
> Qt Gui:
>  Accessibility .......................... no
>  FreeType ............................... no
>    Using system FreeType ................ no
>  HarfBuzz ............................... no
>    Using system HarfBuzz ................ no
>  Fontconfig ............................. no
>  Image formats:
>    GIF .................................. no
>    ICO .................................. yes
>    JPEG ................................. no
>      Using system libjpeg ............... no
>    PNG .................................. no
>      Using system libpng ................ no
>  EGL .................................... no
>  OpenVG ................................. no
>  OpenGL:
>    Desktop OpenGL ....................... no
>    OpenGL ES 2.0 ........................ no
>    OpenGL ES 3.0 ........................ no
>    OpenGL ES 3.1 ........................ no
>    OpenGL ES 3.2 ........................ no
>  Vulkan ................................. no
>  Session Management ..................... yes
> Features used by QPA backends:
>  evdev .................................. no
>  libinput ............................... no
>  INTEGRITY HID .......................... no
>  mtdev .................................. no
>  tslib .................................. no
>  xkbcommon .............................. no
>  X11 specific:
>    XLib ................................. no
>    XCB Xlib ............................. no
>    EGL on X11 ........................... no
> QPA backends:
>  DirectFB ............................... no
>  EGLFS .................................. no
>  LinuxFB ................................ no
>  VNC .................................... yes
>  Mir client ............................. no
> Qt Sql:
>  SQL item models ........................ yes
> Qt Widgets:
>  GTK+ ................................... no
>  Styles ................................. Fusion Windows
> Qt PrintSupport:
>  CUPS ................................... no
> Qt Sql Drivers:
>  DB2 (IBM) .............................. no
>  InterBase .............................. no
>  MySql .................................. no
>  OCI (Oracle) ........................... no
>  ODBC ................................... no
>  PostgreSQL ............................. no
>  SQLite2 ................................ no
>  SQLite ................................. yes
>    Using system provided SQLite ......... no
>  TDS (Sybase) ........................... no
> Qt Testlib:
>  Tester for item models ................. yes
>=20
> WARNING: Feature xkb is insignificant in this configuration, ignoring =
related command line option(s).
>=20
> WARNING: Accessibility disabled. This configuration of Qt is =
unsupported.
>=20
>=20
>=20
> # svnlite diff /usr/ports/devel/qt5-core/ | more
> #
>=20
> (So no differences.)


=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B8E25C1-1EB4-4D18-A45F-72555C3AC13D>