From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [IPv6:2001:67c:2050:0:465::103]) by sourceware.org (Postfix) with ESMTPS id DC8E63858D20 for ; Thu, 16 Nov 2023 22:52:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DC8E63858D20 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DC8E63858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:67c:2050:0:465::103 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700175132; cv=none; b=ElJliSo0I8ymQH/2BxSdivhH/W3vAxFHjGBojIM7sTl7yJTKepIJjWkNyn7VzyczI2kjTFseL7hy/zTADdK2HjhCpX5JWBCzAZSAsJ8LC5MJ8R6EJkISliL6757cywI1oQUzlzy/gY/xXz+nub/XWdAXstYOoRRzDHYHmNcH3co= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700175132; c=relaxed/simple; bh=OwpyB0q/GCd+egEr6N2riDkFdIJ/pe4bGvYNhv5cZWM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=EjAcs/ZW0nGdCD/S97AR6hcenf84BoJ13aRebMmk2K5DkXUZsalhostPr4MqRFbvKshlOhguXXfJxSaWg3wwgjOgxnkakHoekXwnXvtCd/d037ALhfAV9D8wi9Y2HZYq/II/R1fhhre3jEhB2TWTSrO6o5brcRlFqgNl+6zMzsM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4SWZzV6j1Pz9spR; Thu, 16 Nov 2023 23:52:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1700175126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OY0GgU7NV9bYng1GUk+Qfj/MUwK0acO6EZXUtBeqSqs=; b=HYbWeg2NtbPNRSgqhbBp7zux03IR6EjJ1Rvpboh1fhzkAob8xTzcZQjXxiniN0/2rUF6qZ oRX8CAbvKppmJZ9zEw8rShOj0vb9/yNl1kvrfrAdTdaZLu9hZh0nED5YBsBSvJdR/ErxG2 SjwOtBH59UrEK/ps01W7pmXW6mQqrKoEF/wP08Zd5vfeVESkXvrMqsqMQ3g/2CV10QWTqY sFw8Lh98eoK5+lGiar33CwtXZ/apO5VSJ9pKtn1O81hGmUgvHxGoVmXPfYiyQWAx3anu5U Ex/fZnrOL/1EcASa1UJuf++PkMlbjfp9Fua5wdWVkqh9p8zL/z60rPjpS98G1A== References: <86o7fwhr03.fsf@aarsen.me> <8634x7hza7.fsf@aarsen.me> <86il61fscr.fsf@aarsen.me> <861qcpbdt2.fsf@aarsen.me> <86cyw99w4j.fsf@aarsen.me> From: Arsen =?utf-8?Q?Arsenovi=C4=87?= To: David Edelsohn Cc: Richard Biener , Bruno Haible , gcc-patches@gcc.gnu.org Subject: Re: [PATCH v3 0/2] Replace intl/ with out-of-tree GNU gettext Date: Thu, 16 Nov 2023 23:32:54 +0100 In-reply-to: Message-ID: <867cmh8g6i.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Rspamd-Queue-Id: 4SWZzV6j1Pz9spR X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_INFOUSMEBIZ,KAM_SHORT,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable David Edelsohn writes: > On Thu, Nov 16, 2023 at 5:22=E2=80=AFPM Arsen Arsenovi=C4=87 wrote: > >> >> David Edelsohn writes: >> >> > Don't build with the dependent libraries in tree. Don't build the >> > dependent libraries as shared libraries. The libraries are already bui= lt >> > and in /opt/cfarm, as mentioned in the Compile Farm wiki. >> > >> > AIX is not Solaris and not Linux. It doesn't use ELF. AIX shared >> > libraries *ARE* shared object files in archives. Shared object >> versioning >> > is handled by multiple objects in the same archive. >> >> Hmm, I see. I removed all the deps but gettext from the tree. >> >> This leaves gettext-runtime fulfilling the previous role of intl/. >> >> However, I'm confused about how this worked before, in that case, since, >> IIRC, intl also produced libraries and was also put into host exports. >> >> Leaving gettext in tree produces: >> >> Could not load program gawk: >> Dependent module >> /home/arsen/build/./gettext/intl/.libs/libintl.a(libintl.so.8) could not= be >> loaded. >> Member libintl.so.8 is not found in archive >> >> I'll try to see why intl/ didn't cause the same issue soon. >> >> Thanks, have a lovely evening. >> > > The previous version of "intl" was built as a static library. Configure = in > the older package had the option --enable-host-shared, > which I did not use. Based on the failure message, the in-tree gettext > seems to be built as a shared library. If you explicitly > pass --disable-shared to the in-tree configure, you may get farther. I'm > currently using --disable-shared --disable-threads. > As we have discussed, the current gettext will retain some references to > pthreads despite the configure option. Sure, but my patch does insert --disable-shared: =2D-8<---------------cut here---------------start------------->8--- host_modules=3D { module=3D gettext; bootstrap=3Dtrue; no_install=3Dtrue; module_srcdir=3D "gettext/gettext-runtime"; // We always build gettext with pic, because some packages (e.g. gdbserve= r) // need it in some configuratons, which is determined via nontrivial test= s. // Always enabling pic seems to make sense for something tied to // user-facing output. extra_configure_flags=3D'--disable-shared --disable-java --= disable-csharp --with-pic'; lib_path=3Dintl/.libs; }; =2D-8<---------------cut here---------------end--------------->8--- ... and it is applied: =2D-8<---------------cut here---------------start------------->8--- =2Dbash-5.1$ ./config.status --config =2D-srcdir=3D../../gcc/gettext/gettext-runtime --cache-file=3D./config.cache --disable-werror --with-gmp=3D/opt/cfarm --with-libiconv-prefix=3D/opt/cfarm --disable-libstdcxx-pch --with-included-gettext --program-transform-name=3Ds,y,y, --disable-option-checking --build=3Dpowerpc-ibm-aix7.3.1.0 --host=3Dpowerpc-ibm-aix7.3.1.0 --target=3Dpowerpc-ibm-aix7.3.1.0 --disable-intermodule --enable-checking=3Dyes,types,extra --disable-coverage --enable-languages=3Dc,c++ --disable-build-format-warnings --disable-shared --disable-java --disable-csharp --with-pic build_alias=3Dpowerpc-ibm-aix7.3.1.0 host_alias=3Dpowerpc-ibm-aix7.3.1.0 target_alias=3Dpowerpc-ibm-aix7.3.1.0 CC=3Dgcc CFLAGS=3D-g 'LDFLAGS=3D-static-libstdc++ -static-libgcc -Wl,-bbigtoc' 'CXX=3Dg++ -std=3Dc++11' CXXFLAGS=3D-g =2D-8<---------------cut here---------------end--------------->8--- I'm unsure how to tell what the produced binaries are w.r.t static or shared, but I only see .o files inside intl/.libs/libintl.a, while I see a .so.1 in (e.g.) /lib/libz.a, hinting at it not being shared (?) I do see that the build system adds intl to the LD_LIBRARY_PATH. I will be testing dropping lib_path from the module definition above. It might be superflous (I think it is only used for LD_LIBRARY_PATH, for when the libs built by the build system are shared - which they never are for in-tree gettext). I'll take the shot to add --disable-threads, too, for this test. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=drop-gettext-lib_path.patch Content-Transfer-Encoding: quoted-printable Content-Description: drop gettext lib_path From=204b75355d5ee9162a922a85517ef3c0a16931544d Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Arsen=3D20Arsenovi=3DC4=3D87?=3D Date: Thu, 16 Nov 2023 23:50:30 +0100 Subject: [PATCH] disable threads, lib_path on gettext =2D-- Makefile.def | 3 +-- Makefile.in | 27 +++++++++++---------------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/Makefile.def b/Makefile.def index 792f81447e1b..78414b4cd89c 100644 =2D-- a/Makefile.def +++ b/Makefile.def @@ -80,8 +80,7 @@ host_modules=3D { module=3D gettext; bootstrap=3Dtrue; no= _install=3Dtrue; // need it in some configuratons, which is determined via nontrivial tes= ts. // Always enabling pic seems to make sense for something tied to // user-facing output. =2D extra_configure_flags=3D'--disable-shared --disable-java= --disable-csharp --with-pic'; =2D lib_path=3Dintl/.libs; }; + extra_configure_flags=3D'--disable-shared --disable-thread= s --disable-java --disable-csharp --with-pic'; }; host_modules=3D { module=3D tcl; missing=3Dmostlyclean; }; host_modules=3D { module=3D itcl; }; diff --git a/Makefile.in b/Makefile.in index b65ab4953bce..796717665eb7 100644 =2D-- a/Makefile.in +++ b/Makefile.in @@ -768,7 +768,7 @@ TARGET_LIB_PATH_libatomic =3D $$r/$(TARGET_SUBDIR)/liba= tomic/.libs: =20 # This is the list of directories that may be needed in RPATH_ENVVAR # so that programs built for the host machine work. =2DHOST_LIB_PATH =3D $(HOST_LIB_PATH_gmp)$(HOST_LIB_PATH_mpfr)$(HOST_LIB_PA= TH_mpc)$(HOST_LIB_PATH_isl)$(HOST_LIB_PATH_gettext) +HOST_LIB_PATH =3D $(HOST_LIB_PATH_gmp)$(HOST_LIB_PATH_mpfr)$(HOST_LIB_PATH= _mpc)$(HOST_LIB_PATH_isl) =20 # Define HOST_LIB_PATH_gcc here, for the sake of TARGET_LIB_PATH, ouch @if gcc @@ -796,11 +796,6 @@ HOST_LIB_PATH_isl =3D \ $$r/$(HOST_SUBDIR)/isl/.libs:$$r/$(HOST_SUBDIR)/prev-isl/.libs: @endif isl =20 =2D@if gettext =2DHOST_LIB_PATH_gettext =3D \ =2D $$r/$(HOST_SUBDIR)/gettext/intl/.libs:$$r/$(HOST_SUBDIR)/prev-gettext/= intl/.libs: =2D@endif gettext =2D =20 CXX_FOR_TARGET_FLAG_TO_PASS =3D \ "CXX_FOR_TARGET=3D$(CXX_FOR_TARGET)" @@ -19827,7 +19822,7 @@ configure-gettext: $$s/$$module_srcdir/configure \ --srcdir=3D$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=3D${build_alias} --host=3D${host_alias} \ =2D --target=3D${target_alias} --disable-shared --disable-java --disable-= csharp --with-pic \ + --target=3D${target_alias} --disable-shared --disable-threads --disable= -java --disable-csharp --with-pic \ || exit 1 @endif gettext =20 @@ -19863,7 +19858,7 @@ configure-stage1-gettext: --target=3D${target_alias} \ \ $(STAGE1_CONFIGURE_FLAGS) \ =2D --disable-shared --disable-java --disable-csharp --with-pic + --disable-shared --disable-threads --disable-java --disable-csharp --wi= th-pic @endif gettext-bootstrap =20 .PHONY: configure-stage2-gettext maybe-configure-stage2-gettext @@ -19897,7 +19892,7 @@ configure-stage2-gettext: --target=3D${target_alias} \ --with-build-libsubdir=3D$(HOST_SUBDIR) \ $(STAGE2_CONFIGURE_FLAGS) \ =2D --disable-shared --disable-java --disable-csharp --with-pic + --disable-shared --disable-threads --disable-java --disable-csharp --wi= th-pic @endif gettext-bootstrap =20 .PHONY: configure-stage3-gettext maybe-configure-stage3-gettext @@ -19931,7 +19926,7 @@ configure-stage3-gettext: --target=3D${target_alias} \ --with-build-libsubdir=3D$(HOST_SUBDIR) \ $(STAGE3_CONFIGURE_FLAGS) \ =2D --disable-shared --disable-java --disable-csharp --with-pic + --disable-shared --disable-threads --disable-java --disable-csharp --wi= th-pic @endif gettext-bootstrap =20 .PHONY: configure-stage4-gettext maybe-configure-stage4-gettext @@ -19965,7 +19960,7 @@ configure-stage4-gettext: --target=3D${target_alias} \ --with-build-libsubdir=3D$(HOST_SUBDIR) \ $(STAGE4_CONFIGURE_FLAGS) \ =2D --disable-shared --disable-java --disable-csharp --with-pic + --disable-shared --disable-threads --disable-java --disable-csharp --wi= th-pic @endif gettext-bootstrap =20 .PHONY: configure-stageprofile-gettext maybe-configure-stageprofile-gettext @@ -19999,7 +19994,7 @@ configure-stageprofile-gettext: --target=3D${target_alias} \ --with-build-libsubdir=3D$(HOST_SUBDIR) \ $(STAGEprofile_CONFIGURE_FLAGS) \ =2D --disable-shared --disable-java --disable-csharp --with-pic + --disable-shared --disable-threads --disable-java --disable-csharp --wi= th-pic @endif gettext-bootstrap =20 .PHONY: configure-stagetrain-gettext maybe-configure-stagetrain-gettext @@ -20033,7 +20028,7 @@ configure-stagetrain-gettext: --target=3D${target_alias} \ --with-build-libsubdir=3D$(HOST_SUBDIR) \ $(STAGEtrain_CONFIGURE_FLAGS) \ =2D --disable-shared --disable-java --disable-csharp --with-pic + --disable-shared --disable-threads --disable-java --disable-csharp --wi= th-pic @endif gettext-bootstrap =20 .PHONY: configure-stagefeedback-gettext maybe-configure-stagefeedback-gett= ext @@ -20067,7 +20062,7 @@ configure-stagefeedback-gettext: --target=3D${target_alias} \ --with-build-libsubdir=3D$(HOST_SUBDIR) \ $(STAGEfeedback_CONFIGURE_FLAGS) \ =2D --disable-shared --disable-java --disable-csharp --with-pic + --disable-shared --disable-threads --disable-java --disable-csharp --wi= th-pic @endif gettext-bootstrap =20 .PHONY: configure-stageautoprofile-gettext maybe-configure-stageautoprofil= e-gettext @@ -20101,7 +20096,7 @@ configure-stageautoprofile-gettext: --target=3D${target_alias} \ --with-build-libsubdir=3D$(HOST_SUBDIR) \ $(STAGEautoprofile_CONFIGURE_FLAGS) \ =2D --disable-shared --disable-java --disable-csharp --with-pic + --disable-shared --disable-threads --disable-java --disable-csharp --wi= th-pic @endif gettext-bootstrap =20 .PHONY: configure-stageautofeedback-gettext maybe-configure-stageautofeedb= ack-gettext @@ -20135,7 +20130,7 @@ configure-stageautofeedback-gettext: --target=3D${target_alias} \ --with-build-libsubdir=3D$(HOST_SUBDIR) \ $(STAGEautofeedback_CONFIGURE_FLAGS) \ =2D --disable-shared --disable-java --disable-csharp --with-pic + --disable-shared --disable-threads --disable-java --disable-csharp --wi= th-pic @endif gettext-bootstrap =20 =20 =2D-=20 2.42.1 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > Thanks, David > > >> >> > Thanks, David >> > >> > >> > >> > On Thu, Nov 16, 2023 at 4:15=E2=80=AFPM Arsen Arsenovi=C4=87 wrote: >> > >> >> >> >> Arsen Arsenovi=C4=87 writes: >> >> >> >> > [[PGP Signed Part:Good signature from 52C294301EA2C493 Arsen Arseno= vi=C4=87 >> >> (Gentoo Developer UID) (trust ultimate) created at >> >> 2023-11-16T19:47:16+0100 using EDDSA]] >> >> > >> >> > David Edelsohn writes: >> >> > >> >> >> On Wed, Nov 15, 2023 at 9:22=E2=80=AFAM Arsen Arsenovi=C4=87 >> >> wrote: >> >> >> >> >> >>> >> >> >>> David Edelsohn writes: >> >> >>> >> >> >>> > GCC had been working on AIX with NLS, using >> >> "--with-included-gettext". >> >> >>> > --disable-nls gets past the breakage, but GCC does not build for >> me >> >> on >> >> >>> AIX >> >> >>> > with NLS enabled. >> >> >>> >> >> >>> That should still work with gettext 0.22+ extracted in-tree (it >> should >> >> >>> be fetched by download_prerequisites). >> >> >>> >> >> >>> > A change in dependencies for GCC should have been announced and >> more >> >> >>> widely >> >> >>> > socialized in the GCC development mailing list, not just GCC >> patches >> >> >>> > mailing list. >> >> >>> > >> >> >>> > I have tried both the AIX Open Source libiconv and libgettext >> >> package, >> >> >>> and >> >> >>> > the ones that I previously built. Both fail because GCC config= ure >> >> >>> decides >> >> >>> > to disable NLS, despite being requested, while libcpp is >> satisfied, >> >> so >> >> >>> > tools in the gcc subdirectory don't link against libiconv and t= he >> >> build >> >> >>> > fails. With the included gettext, I was able to rely on a >> >> >>> self-consistent >> >> >>> > solution. >> >> >>> >> >> >>> That is interesting. They should be using the same checks. I've >> >> >>> checked trunk and regenerated files on it, and saw no significant >> diff >> >> >>> (some whitespace changes only). Could you post the config.log of >> both? >> >> >>> >> >> >>> I've never used AIX. Can I reproduce this on one of the cfarm >> machines >> >> >>> to poke around? I've tried cfarm119, but that one lacked git, an= d I >> >> >>> haven't poked around much further due to time constraints. >> >> >>> >> >> >> >> >> >> The AIX system in the Compile Farm has a complete complement of Op= en >> >> Source >> >> >> software installed. >> >> >> >> >> >> Please ensure that /opt/freeware/bin is in your path. Also, the G= CC >> >> Wiki >> >> >> Compile Farm page has build tips that include AIX >> >> >> >> >> >> >> >> >> https://gcc.gnu.org/wiki/CompileFarm#Services_and_software_installed_on_= farm_machines >> >> > >> >> > Thanks, that got me further. >> >> > >> >> >> that recommended --with-included-gettext configuration option. >> >> > >> >> > This flag should still exist and operate the same if gettext is >> present >> >> > in tree. I've cloned gcc and downloaded prerequisites (via >> >> > contrib/download_prerequisites) and I am trying to configure it now. >> >> >> >> The build failed. After gettext/gmp/... (in-tree hostlibs) get built >> >> and added to library paths, further GCC processes fail to run: >> >> >> >> configure:3305: gcc -g -static-libstdc++ -static-libgcc -Wl,-bbigtoc >> >> conftest.c >&5 >> >> Could not load program >> >> /opt/freeware/libexec/gcc/powerpc-ibm-aix7.3.0.0/10/cc1: >> >> Dependent module >> >> /home/arsen/build/./gmp/.libs/libgmp.a(libgmp.so.10) could not be >> loaded. >> >> Member libgmp.so.10 is not found in archive >> >> >> >> This seems odd. I am not sure what compels the RTDL (?) to look up .= sos >> >> in archives, or how it knows about these archives.. I suspect it's >> >> getting tripped by something in HOST_EXPORTS. >> >> >> >> >> Thanks, David >> >> >> >> >> >> >> >> >>> >> >> >>> TIA, sorry about the inconvenience. Have a lovely day. >> >> >>> >> >> >>> > The current gettext-0.22.3 fails to build for me on AIX. >> >> >>> > >> >> >>> > libcpp configure believes that NLS functions on AIX, but gcc >> >> configure >> >> >>> > fails in its tests of gettext functionality, which leads to an >> >> >>> inconsistent >> >> >>> > configuration and build breakage. >> >> >>> > >> >> >>> > Thanks, David >> >> >>> >> >> >>> >> >> >>> -- >> >> >>> Arsen Arsenovi=C4=87 >> >> >>> >> >> >> >> >> >> -- >> >> Arsen Arsenovi=C4=87 >> >> >> >> >> -- >> Arsen Arsenovi=C4=87 >> =2D-=20 Arsen Arsenovi=C4=87 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOYEARYKAI4WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCZVadFV8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0RkVF MkIzRDExM0ZDMDBBMzE2MkQ2MDYxNTJDMjk0MzAxRUEyQzQ5MxAcYXJzZW5AYWFy c2VuLm1lAAoJEFLClDAeosSTeIgA/Ray82lT5UyEiOmcEvrjFcjFKUTuXC/K2xQ0 7C+MRr/VAP9vdBN2uj63gUOtfcal2tbv/fT1L9rzXVbUKduWNBRkCA== =EFt/ -----END PGP SIGNATURE----- --==-=-=--