Date: Thu, 23 May 2019 22:33:35 -0700 From: Mark Millard <marklmi@yahoo.com> To: FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, ports-list freebsd <freebsd-ports@freebsd.org> Cc: Jan Beich <jbeich@FreeBSD.org> Subject: powerpc64 system-clang-8 based context: x11-toolkits/qt5-declarative fails to build in poudriere: /usr/local/lib/qt5/bin/qlalr segmentation faults in std::type_info::~type_info() () from /usr/local/lib/gcc8/libstdc++.so.6 Message-ID: <3B3EACF3-00D8-48B7-A3C0-8AA6E0279041@yahoo.com> In-Reply-To: <CA16609F-0AEA-46B0-A8CE-9280A4E90058@yahoo.com> References: <8B8355C5-731B-4F03-AA98-11324C618D3C@yahoo.com> <590AAD80-8D2F-4F7A-8910-001D72A5E666@yahoo.com> <22D9DF10-E58A-49E5-8372-CC9D263A7C76@yahoo.com> <33026AD5-9CB0-43CB-84EA-5B2B914A7EB0@yahoo.com> <CA16609F-0AEA-46B0-A8CE-9280A4E90058@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[I adjusted the Subject line to give more context.] [/usr/local/lib/qt5/bin/qlalr and /usr/local/lib/qt5/libQt5Core.so.5 overall use each of the following (somewhat indirectly) in my system-clang-8-based powerpc64 context: /usr/local/lib/gcc8/libstdc++.so.6 /usr/lib/libc++.so.1 /lib/libcxxrt.so.1 ] On 2019-May-23, at 21:09, Mark Millard <marklmi at yahoo.com> wrote: [Merely adding the extra instruction was not the right idea for what the problem is.] On 2019-May-23, at 20:10, Mark Millard <marklmi at yahoo.com> wrote: > [I tried rebuilding things based on a full-bootstrap > build of lang/gcc8 instead. It made no difference.] >=20 > On 2019-May-23, at 14:17, Mark Millard <marklmi at yahoo.com> wrote: >=20 >> [It looks like code generation missed a level of indirection >> to me.] >>=20 >>> On 2019-May-23, at 13:46, Mark Millard <marklmi at yahoo.com> wrote: >>>=20 >>> [I should have listed uname -apKU output and such.] >>>=20 >>> On 2019-May-23, at 13:21, Mark Millard <marklmi@yahoo.com> wrote: >>>=20 >>>> The poudriere bulk run that tried to build = x11-toolkits/qt5-declarative >>>> got: >>>>=20 >>>> --- qqmljsgrammar.cpp --- >>>> /usr/local/lib/qt5/bin/qlalr --no-debug --qt parser/qqmljs.g >>>> Segmentation fault (core dumped) >>>> *** [qqmljsgrammar.cpp] Error code 139 >>>>=20 >>>> make[3]: stopped in = /wrkdirs/usr/ports/x11-toolkits/qt5-declarative/work/qtdeclarative-everywh= ere-src-5.12.2/src/qml >>>> 1 error >>>>=20 >>>> Installing qt5-core and manually running under gdb from >>>> an expansion of the bulk's tar of the failure, I was able >>>> to get a backtrace: >>>>=20 >>>> (gdb) run --no-debug --qt parser/qqmljs.g >>>> Starting program: /usr/local/bin/qlalr --no-debug --qt = parser/qqmljs.g >>>> process 26823 is executing new program: = /usr/local/lib/qt5/bin/qlalr >>>> . . . (text about auto-loading has been declined and such) . . . >>>> Program received signal SIGSEGV, Segmentation fault. >>>> 0x0000000810a96be0 in std::type_info::~type_info() () from = /usr/local/lib/gcc8/libstdc++.so.6 >>>> (gdb) bt >>>> #0 0x0000000810a96be0 in std::type_info::~type_info() () from = /usr/local/lib/gcc8/libstdc++.so.6 >>>> #1 0x000000081092152c in __cxxabiv1::__dynamic_cast = (src_ptr=3D0x810ab57d0 <(anonymous namespace)::ctype_c>, = src_type=3D0x810a8eaa0 <typeinfo for std::locale::facet>,=20 >>>> dst_type=3D0x810a8fb18 <typeinfo for std::ctype<char>>, src2dst=3D0) = at = /wrkdirs/usr/ports/lang/gcc8/work/gcc-8.3.0/libstdc++-v3/libsupc++/dyncast= .cc:71 >>>> #2 0x00000008109df908 in std::has_facet<std::ctype<char> > = (__loc=3D...) at = /wrkdirs/usr/ports/lang/gcc8/work/.build/powerpc64-portbld-freebsd13.0/lib= stdc++-v3/include/bits/locale_classes.tcc:104 >>>> #3 0x00000008109cb474 in std::basic_ios<char, = std::char_traits<char> >::_M_cache_locale (this=3D0x810ab48c8 = <std::cout+8>, __loc=3D...) >>>> at = /wrkdirs/usr/ports/lang/gcc8/work/.build/powerpc64-portbld-freebsd13.0/lib= stdc++-v3/include/bits/basic_ios.tcc:157 >>>> #4 0x00000008109cbad0 in std::basic_ios<char, = std::char_traits<char> >::init (this=3D0x810ab48c8 <std::cout+8>, = __sb=3D0x810ab36f8 <__gnu_internal::buf_cout_sync>) >>>> at = /wrkdirs/usr/ports/lang/gcc8/work/.build/powerpc64-portbld-freebsd13.0/lib= stdc++-v3/include/bits/basic_ios.tcc:126 >>>> #5 0x000000081093e644 in std::basic_ostream<char, = std::char_traits<char> >::basic_ostream (__sb=3D<optimized out>, = this=3D<optimized out>, __in_chrg=3D<optimized out>, = __vtt_parm=3D<optimized out>) >>>> at = /wrkdirs/usr/ports/lang/gcc8/work/.build/powerpc64-portbld-freebsd13.0/lib= stdc++-v3/include/bits/basic_ios.h:460 >>>> #6 std::ios_base::Init::Init (this=3D<optimized out>) at = /wrkdirs/usr/ports/lang/gcc8/work/gcc-8.3.0/libstdc++-v3/src/c++98/ios_ini= t.cc:91 >>>> #7 std::ios_base::Init::Init (this=3D<optimized out>) at = /wrkdirs/usr/ports/lang/gcc8/work/gcc-8.3.0/libstdc++-v3/src/c++98/ios_ini= t.cc:78 >>>> #8 0x000000001000334c in __static_initialization_and_destruction_0 = (__initialize_p=3D__initialize_p@entry=3D1, __priority=3D<optimized = out>, __priority@entry=3D65535) at compress.cpp:273 >>>> #9 0x0000000010004c2c in _GLOBAL__sub_I_compress.cpp(void) () at = compress.cpp:273 >>>> #10 0x000000081005dfa0 in objlist_call_init (list=3D<optimized = out>, lockstate=3D<optimized out>) at = /usr/src/libexec/rtld-elf/rtld.c:2728 >>>> #11 0x000000081005c830 in _rtld (sp=3D<optimized out>, = exit_proc=3D<optimized out>, objp=3D<optimized out>) at = /usr/src/libexec/rtld-elf/rtld.c:765 >>>> #12 0x000000081005a240 in ._rtld_start () at = /usr/src/libexec/rtld-elf/powerpc64/rtld_start.S:83 >>>> Backtrace stopped: frame did not save the PC >>>>=20 >>>>=20 >>>>=20 >>>> NOTE: In order to have built devel/qt5-core I used a patch >>>> to make sure that all the %%LOCALBASE%% strings were replaced >>>> (otherwise in the powerpc64 system clang 8 based world the >>>> devel/qt5-core build failed from -I%%LOCALBASE%%... use): >>>>=20 >>>> Index: /usr/ports/Mk/Uses/qt-dist.mk >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> --- /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 >>>>=20 >>>>=20 >>>> (So having the missing g added but not having the optional -e >>>> usage in the other %%LOCALBASE%% related command. The -e >>>> status is optional here: only one command to sed sed command >>>> in each sed command. The additional g is the important part.) >>>=20 >>> I should have listed: >>> . . . (history omitted) . . . Remembering that my context is system-clang-8 based world on powerpc64, not gcc 4.2.1 . . . /usr/ports/Mk/Uses/qt-dist.mk has: . if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} =3D=3D = sparc64 _EXTRA_PATCHES_QT5+=3D = ${PORTSDIR}/devel/${_QT_RELNAME}/files/extra-patch-mkspecs_common_g++-base= .conf \ = ${PORTSDIR}/devel/${_QT_RELNAME}/files/extra-patch-mkspecs_common_gcc-base= .conf \ = ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_freebsd-g++_qmak= e.conf USE_GCC=3D yes . endif That is no matter what the system compiler is for powerpc64. This lead to the below mixing of libstdc++.so.6 and libc++/libcxxrt . . = . qlalr indicates use of both libstdc++ and libc++/libcxxrt : # ldd /usr/local/lib/qt5/bin/qlalr /usr/local/lib/qt5/bin/qlalr: libQt5Core.so.5 =3D> /usr/local/lib/qt5/libQt5Core.so.5 = (0x8100b1000) libstdc++.so.6 =3D> /usr/local/lib/gcc8/libstdc++.so.6 = (0x81085e000) libc.so.7 =3D> /lib/libc.so.7 (0x810ab7000) libkvm.so.7 =3D> /lib/libkvm.so.7 (0x810e1c000) libprocstat.so.1 =3D> /usr/lib/libprocstat.so.1 (0x810e41000) libexecinfo.so.1 =3D> /usr/lib/libexecinfo.so.1 (0x810e5e000) libz.so.6 =3D> /lib/libz.so.6 (0x810e71000) libicui18n.so.64 =3D> /usr/local/lib/libicui18n.so.64 = (0x810e9d000) libicuuc.so.64 =3D> /usr/local/lib/libicuuc.so.64 (0x8112ac000) libpcre2-16.so.0 =3D> /usr/local/lib/libpcre2-16.so.0 = (0x81151e000) libglib-2.0.so.0 =3D> /usr/local/lib/libglib-2.0.so.0 = (0x8115ce000) libm.so.5 =3D> /lib/libm.so.5 (0x81172e000) libgcc_s.so.1 =3D> /usr/local/lib/gcc8/libgcc_s.so.1 = (0x811765000) libthr.so.3 =3D> /lib/libthr.so.3 (0x81178e000) libelf.so.2 =3D> /lib/libelf.so.2 (0x8117d7000) libutil.so.9 =3D> /lib/libutil.so.9 (0x811804000) libicudata.so.64 =3D> /usr/local/lib/libicudata.so.64 = (0x81182e000) libc++.so.1 =3D> /usr/lib/libc++.so.1 (0x81183f000) libcxxrt.so.1 =3D> /lib/libcxxrt.so.1 (0x811958000) libiconv.so.2 =3D> /usr/local/lib/libiconv.so.2 (0x81198a000) libpcre.so.1 =3D> /usr/local/lib/libpcre.so.1 (0x811a9c000) libintl.so.8 =3D> /usr/local/lib/libintl.so.8 (0x811b45000) And so does libQt5Core.so.5 : # ldd /usr/local/lib/qt5/libQt5Core.so.5 /usr/local/lib/qt5/libQt5Core.so.5: libkvm.so.7 =3D> /lib/libkvm.so.7 (0x8113ad000) libprocstat.so.1 =3D> /usr/lib/libprocstat.so.1 (0x8113d2000) libexecinfo.so.1 =3D> /usr/lib/libexecinfo.so.1 (0x8113ef000) libz.so.6 =3D> /lib/libz.so.6 (0x811402000) libicui18n.so.64 =3D> /usr/local/lib/libicui18n.so.64 = (0x81142e000) libicuuc.so.64 =3D> /usr/local/lib/libicuuc.so.64 (0x81183d000) libpcre2-16.so.0 =3D> /usr/local/lib/libpcre2-16.so.0 = (0x811aaf000) libglib-2.0.so.0 =3D> /usr/local/lib/libglib-2.0.so.0 = (0x811b5f000) libstdc++.so.6 =3D> /usr/local/lib/gcc8/libstdc++.so.6 = (0x811cbf000) libm.so.5 =3D> /lib/libm.so.5 (0x811f18000) libgcc_s.so.1 =3D> /usr/local/lib/gcc8/libgcc_s.so.1 = (0x811f4f000) libthr.so.3 =3D> /lib/libthr.so.3 (0x811f78000) libc.so.7 =3D> /lib/libc.so.7 (0x810071000) libelf.so.2 =3D> /lib/libelf.so.2 (0x811fc1000) libutil.so.9 =3D> /lib/libutil.so.9 (0x811fee000) libicudata.so.64 =3D> /usr/local/lib/libicudata.so.64 = (0x812018000) libc++.so.1 =3D> /usr/lib/libc++.so.1 (0x812029000) libcxxrt.so.1 =3D> /lib/libcxxrt.so.1 (0x812142000) libiconv.so.2 =3D> /usr/local/lib/libiconv.so.2 (0x812174000) libpcre.so.1 =3D> /usr/local/lib/libpcre.so.1 (0x812286000) libintl.so.8 =3D> /usr/local/lib/libintl.so.8 (0x81232f000) It appears that the libc++/libcxxrt use comes from: # ldd /usr/local/lib/libicui18n.so.64 /usr/local/lib/libicui18n.so.64: libicuuc.so.64 =3D> /usr/local/lib/libicuuc.so.64 (0x81100f000) libicudata.so.64 =3D> /usr/local/lib/libicudata.so.64 = (0x811281000) libthr.so.3 =3D> /lib/libthr.so.3 (0x811292000) libm.so.5 =3D> /lib/libm.so.5 (0x8112db000) libc++.so.1 =3D> /usr/lib/libc++.so.1 (0x811312000) libcxxrt.so.1 =3D> /lib/libcxxrt.so.1 (0x81142b000) libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x81145d000) libc.so.7 =3D> /lib/libc.so.7 (0x810071000) # ldd /usr/local/lib/libicuuc.so.64 /usr/local/lib/libicuuc.so.64: libicudata.so.64 =3D> /usr/local/lib/libicudata.so.64 = (0x810e72000) libthr.so.3 =3D> /lib/libthr.so.3 (0x810e83000) libm.so.5 =3D> /lib/libm.so.5 (0x810ecc000) libc++.so.1 =3D> /usr/lib/libc++.so.1 (0x810f03000) libcxxrt.so.1 =3D> /lib/libcxxrt.so.1 (0x81101c000) libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x81104e000) libc.so.7 =3D> /lib/libc.so.7 (0x810071000) =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?3B3EACF3-00D8-48B7-A3C0-8AA6E0279041>