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"

Mark Millard marklmi at yahoo.com
Wed May 22 04:05:05 UTC 2019


[I've tested the proposed Mk/Uses/qt-dist.mk fix.]

On 2019-May-21, at 17:15, Mark Millard <marklmi at yahoo.com> wrote:

> On 2019-May-21, at 16:20, Mark Millard <marklmi at yahoo.com> wrote:
> 
>> 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/mkspecs/freebsd-g++/qmake.conf
>> 
>> shows:
>> 
>> EXTRA_INCLUDEPATH       += /usr/local/lib/gcc8/include %%LOCALBASE%%/lib/gcc8/include/c++
>> 
>> 
>> That seems to drive from the qmake.conf.bak:
>> 
>> EXTRA_INCLUDEPATH       += /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      = UNIX
>> QMAKE_PLATFORM          = freebsd
>> 
>> include(../common/bsd/bsd.conf)
>> 
>> # Addon software goes into /usr/local on FreeBSD, by default we will look there
>> QMAKE_INCDIR_POST       = /usr/local/include
>> QMAKE_LIBDIR_POST       = /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:
> 
> Actually the -e would be optional and appears to not be
> needed in qtbase-post-patch as well --or could be added
> to the %%GCC_DEFAULT%% replacement.
> 
> The "g" is the important part.
> 
>> gcc-post-patch:
>>       ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
>>               ${WRKSRC}/mkspecs/common/gcc-base.conf \
>>               ${WRKSRC}/mkspecs/freebsd-g++/qmake.conf
>> . . .
> 

Now that the original, overall poudriere bulk is over on the old
PowerMac, I've retried based on:

Index: /usr/ports/Mk/Uses/qt-dist.mk
===================================================================
--- /usr/ports/Mk/Uses/qt-dist.mk	(revision 501994)
+++ /usr/ports/Mk/Uses/qt-dist.mk	(working copy)
@@ -251,7 +251,7 @@
 .if ${_QT_VER:M5}
 post-patch: gcc-post-patch
 gcc-post-patch:
-	${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|' \
+	${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' \
 		${WRKSRC}/mkspecs/common/gcc-base.conf \
 		${WRKSRC}/mkspecs/freebsd-g++/qmake.conf
 	${REINPLACE_CMD} 's|%%GCC_DEFAULT%%|${GCC_DEFAULT}|g' \
@@ -298,7 +298,7 @@
 # ports/194088.
 post-patch: qtbase-post-patch
 qtbase-post-patch:
-	${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+	${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' \
 		${WRKSRC}/mkspecs/common/bsd/bsd.conf \
 		${WRKSRC}/mkspecs/freebsd-clang/qmake.conf
 

(So having the missing g added but not having the optional -e
usage in the other %%LOCALBASE%% related coommand.)

The result was:

[00:02:14] [02] [00:00:00] Building devel/qt5-core | qt5-core-5.12.2_1
[00:39:26] [02] [00:37:12] Finished devel/qt5-core | qt5-core-5.12.2_1: Success

So it looks like I picked out the problem correctly and
Mk/Uses/qt-dist.mk needs an update.

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



More information about the freebsd-ports mailing list