From owner-freebsd-ports@freebsd.org Thu May 23 21:17:29 2019 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE1DB15B5FB7 for ; Thu, 23 May 2019 21:17:28 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic313-9.consmr.mail.ne1.yahoo.com (sonic313-9.consmr.mail.ne1.yahoo.com [66.163.185.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A93CE88847 for ; Thu, 23 May 2019 21:17:27 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: zEVslUgVM1mrR0KJN689H1qdfwqVSCrkf6nnWeoAiQA7jzkWKSznYBFCfYqIKJb ezul2chDOUTBgNbUTVqf0oGJY8i783IAHrAbdJSddIvbFgI_h3otuYJ5OXfIlykPYhrEc1jAKKXo fyWLm2D6QMwFtiV7fQ9TP5J_R3QjHdS0qIpxLwZjxbAWD9FQGw8k_9yGcrlV6K2yMcjGd1MzBHfg CwRK1EIQzxorYmY5hsiHpvnZOiMdqMBHRwZH8MhU8HUqJ5rwnKgklAsr4cR5u9gjzgitbdZ8pNkY ybKbYaCSfoblKifoXyhmb.HFwZ3kNulDlRzvf6Q7yFzvkVC1gMCM.f9fJFk0GTlZiTH_uv4d0TfK 1.nX8yjE7sLxezRDvHzZCSViVjlhZzwwXxfHLWPOUTxBRGpMRKFkfXHiSMLQFy3V1HMTMZptvbGC C3N9K6fXI.SJFVNME9r9N_GyN8orbzOP7FZTOkOy.1ykDxUA6G8U2kAFBRUmfmqsQSO89KwO2RtN 9DlTb8k3NLoZgTtzel.duCM8nEP74eTSrlGuj0elDnTlAldp0uHD3..ljozYuBjNteEBxZluOCqI ADUCnFtXTJqaRcNcSOCN3rILq3t7uwjfd3W.9aj8WFSLdsLQ3WhLd.KskHFV0KkD.Iyu0khcCnX6 bInbu0KOiRJgu8BEkzjfCTfuizBYVVIe4iuZqbYNXfW2Dl5IOJwUNTDHUeVGw_VkZGof.08J4eN2 LWYU0QH14s.ztlH7b0h4Bxw9RpAy5e3dTe.a24YXWWzcRijDxGo5cVfGVnqqCLcPP6hLqgH_2EXc J7S0TM5AnMo78M63VqJ72ahqMySY81ik6PVJpvhCJJ4oxLS4LbhwTtomZNiEWwWd09Jt7Vwjvgcq ctO4kU81VCvvEuqwMNPZ5UNgJpQ78t7xb_YFF9q8K0HhWc87c_88JXhrOciWtZg4IqRDraKr025I CsQ38QNaegjb1k9xQ2j7R6Cuhpohn_7ADDpONQaqrUrBF3u3X.8YUgofxdWctlqvdQ1y5tb1eSqA lzZzX48N3xY8LtxY2Qx6FH5s05hdOtIi5GM3INHUTiP.UByw5E02BKJgii4xkx0A22MJrezuIBp7 HITfbdZjqsKL3.edojVOzFwCCM6mI3yCv1RQSlxWPBO5r9L0jv3KVrzXnr33HTBKqtRvx4Fw.m0G 36U4cOFQ4txTbVSbLZrxOmyYiawpeeNQ0LU24CAytsWVf4Q5K1YKNv3zyRM4Y4gn6nmNzSE.4 Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ne1.yahoo.com with HTTP; Thu, 23 May 2019 21:17:20 +0000 Received: from c-76-115-7-162.hsd1.or.comcast.net (EHLO [192.168.1.103]) ([76.115.7.162]) by smtp425.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 2e5b72a8368d1c724f8572c124800b4b; Thu, 23 May 2019 21:17:16 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: powerpc64 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 From: Mark Millard In-Reply-To: <590AAD80-8D2F-4F7A-8910-001D72A5E666@yahoo.com> Date: Thu, 23 May 2019 14:17:15 -0700 Cc: Jan Beich Content-Transfer-Encoding: quoted-printable Message-Id: <22D9DF10-E58A-49E5-8372-CC9D263A7C76@yahoo.com> References: <8B8355C5-731B-4F03-AA98-11324C618D3C@yahoo.com> <590AAD80-8D2F-4F7A-8910-001D72A5E666@yahoo.com> To: FreeBSD PowerPC ML , ports-list freebsd X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: A93CE88847 X-Spamd-Bar: ++ X-Spamd-Result: default: False [2.68 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.73)[0.728,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(1.28)[ip: (3.91), ipnet: 66.163.184.0/21(1.40), asn: 36646(1.12), country: US(-0.06)]; NEURAL_SPAM_MEDIUM(0.76)[0.758,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.43)[0.431,0]; RCVD_IN_DNSWL_NONE(0.00)[32.185.163.66.list.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 21:17:29 -0000 [It looks like code generation missed a level of indirection to me.] > On 2019-May-23, at 13:46, Mark Millard wrote: >=20 > [I should have listed uname -apKU output and such.] >=20 > On 2019-May-23, at 13:21, Mark Millard 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 ,=20 >> dst_type=3D0x810a8fb18 >, 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 > = (__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 = >::_M_cache_locale (this=3D0x810ab48c8 , __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 = >::init (this=3D0x810ab48c8 , __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 >::basic_ostream (__sb=3D, = this=3D, __in_chrg=3D, = __vtt_parm=3D) >> 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) 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) 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, __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, = lockstate=3D) at /usr/src/libexec/rtld-elf/rtld.c:2728 >> #11 0x000000081005c830 in _rtld (sp=3D, = exit_proc=3D, objp=3D) 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: >=20 > # uname -apKU > FreeBSD FBSDG5L 13.0-CURRENT FreeBSD 13.0-CURRENT #0 r347549M: Wed May = 22 15:14:43 PDT 2019 = markmi@FBSDG5L:/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/= usr/src/powerpc.powerpc64/sys/GENERIC64vtsc-NODBG powerpc powerpc64 = 1300025 1300025 >=20 > # svnlite info /usr/ports/ | grep 'Re[plv]' | more > Relative URL: ^/head > Repository Root: svn://svn0.us-west.freebsd.org/ports > Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5 > Revision: 501994 > Last Changed Rev: 501994 >=20 >=20 > As part of experimenting with a system clang 8 based world > context: >=20 > # svnlite diff /usr/ports/devel/binutils/Makefile > Index: /usr/ports/devel/binutils/Makefile > =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/devel/binutils/Makefile (revision 501994) > +++ /usr/ports/devel/binutils/Makefile (working copy) > @@ -3,6 +3,7 @@ >=20 > PORTNAME=3D binutils > PORTVERSION=3D 2.32 > +PORTREVISION=3D 1 > PORTEPOCH?=3D 1 > CATEGORIES?=3D devel > MASTER_SITES=3D SOURCEWARE/binutils/releases > @@ -13,7 +14,6 @@ > LICENSE=3D GPLv3 LGPL3 > LICENSE_COMB=3D multi >=20 > -EXTRA_PATCHES=3D = ${FILESDIR}/binutils-do-not-provide-shared-section-symbols.patch:-p1 > .if defined(PREFIX) && ${PREFIX} !=3D "/usr" > BUILD_DEPENDS=3D ${LOCALBASE}/lib/libgmp.so:math/gmp \ > ${LOCALBASE}/lib/libmpfr.so:math/mpfr >=20 >=20 > # svnlite diff /usr/ports/lang/gcc8/Makefile > Index: /usr/ports/lang/gcc8/Makefile > =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/lang/gcc8/Makefile (revision 501994) > +++ /usr/ports/lang/gcc8/Makefile (working copy) > @@ -62,7 +62,7 @@ >=20 > .elif ${ARCH} =3D=3D powerpc64 > CONFIGURE_ENV+=3D UNAME_m=3D"powerpc64" > -MAKE_ARGS+=3D CFLAGS_FOR_TARGET=3D"-O1" = CXXFLAGS_FOR_TARGET=3D"-O1" BOOT_CFLAGS=3D"-O1" # PR235975 > +#MAKE_ARGS+=3D CFLAGS_FOR_TARGET=3D"-O1" = CXXFLAGS_FOR_TARGET=3D"-O1" BOOT_CFLAGS=3D"-O1" # PR235975 >=20 > .elif ${ARCH} =3D=3D powerpcspe > CONFIGURE_ARGS+=3D --with-cpu=3D8548 --enable-e500_double = --without-fp > @@ -80,7 +80,7 @@ > CONFIGURE_ARGS+=3D--with-build-config=3Dbootstrap-debug > ALL_TARGET=3D bootstrap-lean > .endif > -INSTALL_TARGET=3D install-strip > +#INSTALL_TARGET=3D install-strip > .if ${UID} !=3D 0 > BINMODE=3D 755 > .endif >=20 > I had to work around clang reserving "vec_step" as a name > in contexts where the gcc8 source code used that name: > (vec_step is associated with support of the the vector > instructions on powerpc64.) >=20 > # more /usr/ports/lang/gcc8/files/patch-gcc_tree-vect-loop.c > --- gcc/tree-vect-loop.c.orig 2018-10-10 22:41:40.295753000 -0700 > +++ gcc/tree-vect-loop.c 2018-10-10 22:57:44.698855000 -0700 > @@ -4970,13 +4970,13 @@ >=20 > /* Create a vector of the step value. */ > tree step =3D build_int_cst (cr_index_scalar_type, nunits_out); > - tree vec_step =3D build_vector_from_val (cr_index_vector_type, = step); > + tree vec_step_renamed =3D build_vector_from_val = (cr_index_vector_type, step); >=20 > /* Create an induction variable. */ > gimple_stmt_iterator incr_gsi; > bool insert_after; > standard_iv_increment_position (loop, &incr_gsi, &insert_after); > - create_iv (series_vect, vec_step, NULL_TREE, loop, &incr_gsi, > + create_iv (series_vect, vec_step_renamed, NULL_TREE, loop, = &incr_gsi, > insert_after, &indx_before_incr, &indx_after_incr); >=20 > /* Next create a new phi node vector (NEW_PHI_TREE) which starts > @@ -7641,7 +7641,7 @@ > tree vec_def; > edge pe =3D loop_preheader_edge (loop); > basic_block new_bb; > - tree new_vec, vec_init, vec_step, t; > + tree new_vec, vec_init, vec_step_renamed, t; > tree new_name; > gimple *new_stmt; > gphi *induction_phi; > @@ -7834,7 +7834,7 @@ > new_name =3D vect_init_vector (phi, new_name, > TREE_TYPE (step_expr), NULL); > new_vec =3D build_vector_from_val (vectype, new_name); > - vec_step =3D vect_init_vector (phi, new_vec, vectype, NULL); > + vec_step_renamed =3D vect_init_vector (phi, new_vec, vectype, = NULL); >=20 > /* Now generate the IVs. */ > unsigned group_size =3D SLP_TREE_SCALAR_STMTS (slp_node).length = (); > @@ -7873,7 +7873,7 @@ >=20 > /* Create the iv update inside the loop */ > vec_def =3D make_ssa_name (vec_dest); > - new_stmt =3D gimple_build_assign (vec_def, PLUS_EXPR, = induc_def, vec_step); > + new_stmt =3D gimple_build_assign (vec_def, PLUS_EXPR, = induc_def, vec_step_renamed); > gsi_insert_before (&si, new_stmt, GSI_SAME_STMT); > set_vinfo_for_stmt (new_stmt, new_stmt_vec_info (new_stmt, = loop_vinfo)); >=20 > @@ -7904,7 +7904,7 @@ > new_name =3D vect_init_vector (phi, new_name, > TREE_TYPE (step_expr), NULL); > new_vec =3D build_vector_from_val (vectype, new_name); > - vec_step =3D vect_init_vector (phi, new_vec, vectype, NULL); > + vec_step_renamed =3D vect_init_vector (phi, new_vec, = vectype, NULL); > for (; ivn < nvects; ++ivn) > { > gimple *iv =3D SLP_TREE_VEC_STMTS (slp_node)[ivn - nivs]; > @@ -7915,7 +7915,7 @@ > def =3D gimple_assign_lhs (iv); > new_stmt =3D gimple_build_assign (make_ssa_name = (vectype), > PLUS_EXPR, > - def, vec_step); > + def, vec_step_renamed); > if (gimple_code (iv) =3D=3D GIMPLE_PHI) > gsi_insert_before (&si, new_stmt, GSI_SAME_STMT); > else > @@ -8041,7 +8041,7 @@ > gcc_assert (CONSTANT_CLASS_P (new_name) > || TREE_CODE (new_name) =3D=3D SSA_NAME); > new_vec =3D build_vector_from_val (vectype, t); > - vec_step =3D vect_init_vector (phi, new_vec, vectype, NULL); > + vec_step_renamed =3D vect_init_vector (phi, new_vec, vectype, = NULL); >=20 >=20 > /* Create the following def-use cycle: > @@ -8064,7 +8064,7 @@ >=20 > /* Create the iv update inside the loop */ > vec_def =3D make_ssa_name (vec_dest); > - new_stmt =3D gimple_build_assign (vec_def, PLUS_EXPR, induc_def, = vec_step); > + new_stmt =3D gimple_build_assign (vec_def, PLUS_EXPR, induc_def, = vec_step_renamed); > gsi_insert_before (&si, new_stmt, GSI_SAME_STMT); > set_vinfo_for_stmt (new_stmt, new_stmt_vec_info (new_stmt, = loop_vinfo)); >=20 > @@ -8108,7 +8108,7 @@ > gcc_assert (CONSTANT_CLASS_P (new_name) > || TREE_CODE (new_name) =3D=3D SSA_NAME); > new_vec =3D build_vector_from_val (vectype, t); > - vec_step =3D vect_init_vector (phi, new_vec, vectype, NULL); > + vec_step_renamed =3D vect_init_vector (phi, new_vec, vectype, = NULL); >=20 > vec_def =3D induc_def; > prev_stmt_vinfo =3D vinfo_for_stmt (induction_phi); > @@ -8116,7 +8116,7 @@ > { > /* vec_i =3D vec_prev + vec_step */ > new_stmt =3D gimple_build_assign (vec_dest, PLUS_EXPR, > - vec_def, vec_step); > + vec_def, vec_step_renamed); > vec_def =3D make_ssa_name (vec_dest, new_stmt); > gimple_assign_set_lhs (new_stmt, vec_def); >=20 >=20 > # svnlite diff /usr/ports/devel/libunwind/Makefile > Index: /usr/ports/devel/libunwind/Makefile > =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/devel/libunwind/Makefile (revision 501994) > +++ /usr/ports/devel/libunwind/Makefile (working copy) > @@ -22,6 +22,8 @@ >=20 > USES=3D libtool pathfix pkgconfig > USE_LDCONFIG=3D yes > +CFLAGS+=3D -fPIC > + > GNU_CONFIGURE=3D yes > INSTALL_TARGET=3D install-strip > LLD_UNSAFE=3D yes >=20 >=20 >=20 > I do use an ALLOW_OPTIMIZATIONS_FOR_WITH_DEBUG change to > bsd.port.mk (ignore the OPSYS and _OSRELEASE inline > substitutions): >=20 > # svnlite diff /usr/ports/Mk/bsd.port.mk > Index: /usr/ports/Mk/bsd.port.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/bsd.port.mk (revision 501994) > +++ /usr/ports/Mk/bsd.port.mk (working copy) > @@ -1151,12 +1151,12 @@ >=20 > # Get the operating system type > .if !defined(OPSYS) > -OPSYS!=3D ${UNAME} -s > +OPSYS!=3D echo FreeBSD > .endif > _EXPORTED_VARS+=3D OPSYS >=20 > .if !defined(_OSRELEASE) > -_OSRELEASE!=3D ${UNAME} -r > +_OSRELEASE!=3D echo 13.0-CURRENT > .endif > _EXPORTED_VARS+=3D _OSRELEASE >=20 > @@ -1762,7 +1762,11 @@ > STRIP_CMD=3D ${TRUE} > .endif > DEBUG_FLAGS?=3D -g > +.if defined(ALLOW_OPTIMIZATIONS_FOR_WITH_DEBUG) > +CFLAGS:=3D ${CFLAGS} ${DEBUG_FLAGS} > +.else > CFLAGS:=3D ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS} > +.endif > .if defined(INSTALL_TARGET) > INSTALL_TARGET:=3D ${INSTALL_TARGET:S/^install-strip$/install/g} > .endif >=20 >=20 > (I once had a context where the ${UNAME} -s and ${UNAME} -r > lines each ended up with empty strings assigned. The echo's > just worked around the problem. I've no clue if I'd still > have the problem.) Program received signal SIGSEGV, Segmentation fault. 0x0000000810a96be0 in std::type_info::~type_info() () from = /usr/local/lib/gcc8/libstdc++.so.6 (gdb) disass Dump of assembler code for function _ZNSt9type_infoD2Ev: =3D> 0x0000000810a96be0 <+0>: .long 0x8 0x0000000810a96be4 <+4>: .long 0x109273d0 0x0000000810a96be8 <+8>: .long 0x8 0x0000000810a96bec <+12>: vsubuqm v5,v11,v7 End of assembler dump. Note that for the 0x8'1092'73d0 from the +0 and +4: (gdb) disass 0x8109273d0 Dump of assembler code for function std::type_info::~type_info(): 0x00000008109273d0 <+0>: blr 0x00000008109273d4 <+4>: .long 0x0 0x00000008109273d8 <+8>: .long 0x90000 0x00000008109273dc <+12>: .long 0x0 End of assembler dump. And the code that got to 0x810a96be0 was: (gdb) disass Dump of assembler code for function __cxxabiv1::__dynamic_cast(void = const*, __cxxabiv1::__class_type_info const*, = __cxxabiv1::__class_type_info const*, ptrdiff_t): . . . 0x0000000810921518 <+136>: ld r0,0(r12) 0x000000081092151c <+140>: ld r11,16(r12) 0x0000000810921520 <+144>: mtctr r0 0x0000000810921524 <+148>: ld r2,8(r12) 0x0000000810921528 <+152>: bctrl =3D> 0x000000081092152c <+156>: ld r2,40(r1) . . . with ctr holding: 0x810a96be0 (gdb) info reg . . . pc 0x81092152c 0x81092152c = <__cxxabiv1::__dynamic_cast(void const*, __cxxabiv1::__class_type_info = const*, __cxxabiv1::__class_type_info const*, ptrdiff_t)+156> . . . lr 0x81092152c 0x81092152c = <__cxxabiv1::__dynamic_cast(void const*, __cxxabiv1::__class_type_info = const*, __cxxabiv1::__class_type_info const*, ptrdiff_t)+156> ctr 0x810a96be0 34639277024 . . . It looks to me like: 0x0000000810921518 <+136>: ld r0,0(r12) 0x000000081092151c <+140>: ld r11,16(r12) 0x0000000810921520 <+144>: mtctr r0 0x0000000810921524 <+148>: ld r2,8(r12) 0x0000000810921528 <+152>: bctrl needed something like another instruction to get the correct address into ctr for the later bctrl use:=20 ld r0,0(r12) ld r11,16(r12) ld r0,0(r0) # <<=3D=3D=3D Needed? mtctr r0 ld r2,8(r12) bctrl =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)