From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by sourceware.org (Postfix) with ESMTPS id 195453858282 for ; Fri, 17 Nov 2023 14:42:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 195453858282 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 195453858282 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::52f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700232125; cv=none; b=jzF9L302BnuP5fqm0qdGiCzdYEa+P2QGfMMEs5JudrqoTbFa6TbvvjDXSKzvJ3D3fuiUaQzLZNIVQtYRXpdujDBexfFo6Cr/bEOfYRR2J93jxea61PAHBWSPSLtJDlbDcWNuPVJjjkoxNZ+eJl/jpIY3dDqgbJfoqA5Y1oMIys4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700232125; c=relaxed/simple; bh=Kss0kL88P4bDcP5bvQ5AljEW4KpKpbCpGrpMO39gLRg=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=bEJUloeD7m/eu/bOFgG5MCJz+b1dVFMHOQiXWMwy+h17IMAd92UURxjrcYLjMSCbMgyZc8YPZSfLPJr5DCGiP5V6DpDIgzBGVJXBcuqLnckKcl/Kwvew5uvjfEsEc2MjdRwSumE+gYyB/lAcOU8CJtbOn9ak3MRYfVAFf5Nd3JE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5437269a661so6246264a12.0 for ; Fri, 17 Nov 2023 06:42:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700232122; x=1700836922; darn=gcc.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=KZGhLA3YFBy4dVwLcf69COM5UvkgRv3n4pQT6q0Cna4=; b=gsZoxOeTAm6+npsbZCF2S0i8dtJAmYnghGGbhxRyw+vbbea3dd2DofAepZtU/IQN+o V/hM+T7O6YQW+UT0RqGpPXo8SolLGm3NW9Fk+SMFjmTmNo73mCofJGegi2eubfLrRNzE Bx+3crk5sPSMdVAaPVDqsQH3DhwB9gFosbHYLNfOSsxaL93rA9QKtZ6A12pj+RlKRcdt tfHupJmX/7PJst1j1ff37xZi9TwXBAHERqlGO985KnnCleIo4ktUTDScoiD5GrLBKIdk r7Scxvc+gyFrDYrgTI0wee3eO7v8wARbzxXOBDgU7sj4a4cAmnHxM/USb6Ky+SnafwuP hjgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700232122; x=1700836922; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KZGhLA3YFBy4dVwLcf69COM5UvkgRv3n4pQT6q0Cna4=; b=PAUYplRErOo616WIGw1yoNcdGEl7bvLO7djGjdXZglZmT18wuNaH43oA1vA/oOJRJL bAhZQMdTr2mVrh3vuwDpHenFbemzraXRkMwPr3huSLnrngpspttD1auQUw9+wlajiDsY v4aov8kFSXMxsO/dEjmfRehQ3VioXMPPoYlI91IzIA/pkeM4x5Kc+Ca9xZSSruPlC9Xs 9UWnb1flsbN1LCmv36m1HuxpCIyUvqd5AFcGDrSLOCYcP9rjtBS9ggLexyViPyEO9Z0u KqOUZ5zVzaP+l7nmWF/6/fFHat4gBd28HDz0pq4A4VS1AiaLhdmCTlmp85C1RccGONlr lhMw== X-Gm-Message-State: AOJu0YzJD4KR2HuAYK4uUW+RhshPzraTkGKTNh4QLPjYK2jVWQw6mKa+ cHleltQtb9lV5P5p64OUf14myAfpXRVyhvWzj+0= X-Google-Smtp-Source: AGHT+IF7Ea356lt5h3nR0kCG1dRPBxK3M+eGJQRA9KbKvoM24lQJ96xyO6hOf3/Ps/oEiXbBEiE/1eKv8YdWxJRggNs= X-Received: by 2002:a17:906:e208:b0:9e5:2b00:506f with SMTP id gf8-20020a170906e20800b009e52b00506fmr4435224ejb.15.1700232121837; Fri, 17 Nov 2023 06:42:01 -0800 (PST) MIME-Version: 1.0 References: <86o7fwhr03.fsf@aarsen.me> <8634x7hza7.fsf@aarsen.me> <86il61fscr.fsf@aarsen.me> <861qcpbdt2.fsf@aarsen.me> <86cyw99w4j.fsf@aarsen.me> <867cmh8g6i.fsf@aarsen.me> <86o7fs6a3j.fsf@aarsen.me> In-Reply-To: <86o7fs6a3j.fsf@aarsen.me> From: David Edelsohn Date: Fri, 17 Nov 2023 09:41:50 -0500 Message-ID: Subject: Re: [PATCH v3 0/2] Replace intl/ with out-of-tree GNU gettext To: =?UTF-8?Q?Arsen_Arsenovi=C4=87?= Cc: Richard Biener , Bruno Haible , gcc-patches@gcc.gnu.org Content-Type: multipart/alternative; boundary="000000000000a86e3d060a5a2369" X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,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: --000000000000a86e3d060a5a2369 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Nov 17, 2023 at 3:46=E2=80=AFAM Arsen Arsenovi=C4=87 wrote: > > David Edelsohn writes: > > > On Thu, Nov 16, 2023 at 5:52=E2=80=AFPM Arsen Arsenovi=C4=87 wrote: > > > > [snip] > >> Sure, but my patch does insert --disable-shared: > >> > >> --8<---------------cut here---------------start------------->8--- > >> host_modules=3D { module=3D gettext; bootstrap=3Dtrue; no_install=3Dtr= ue; > >> module_srcdir=3D "gettext/gettext-runtime"; > >> // We always build gettext with pic, because some > packages > >> (e.g. gdbserver) > >> // need it in some configuratons, which is determined > via > >> nontrivial tests. > >> // Always enabling pic seems to make sense for somethi= ng > >> tied to > >> // user-facing output. > >> extra_configure_flags=3D'--disable-shared --disable-ja= va > >> --disable-csharp --with-pic'; > >> lib_path=3Dintl/.libs; }; > >> --8<---------------cut here---------------end--------------->8--- > >> > >> ... and it is applied: > >> > >> --8<---------------cut here---------------start------------->8--- > >> -bash-5.1$ ./config.status --config > >> --srcdir=3D../../gcc/gettext/gettext-runtime --cache-file=3D./config.c= ache > >> --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 > >> --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 s= ee > >> a .so.1 in (e.g.) /lib/libz.a, hinting at it not being shared (?) > >> > > > > An AIX shared library created by libtool will look like > > libfoo.a[libfoo.so.N], where N is the package major version number. > > Normally with one file. > > > An AIX static library will look like libfoo.a[a.o, b.o, c.o] > > with multiple object files. > > > > An AIX archive can contain a combination of shared objects and > > normal object files. > > > > AIX normally uses the convention shr.o or shr_64.o for the name > > of the shared object file. Hint, hint, an AIX archive can contain > > both 32 bit and 64 bit object files or shared objects. > > > > I don't know why the gettext build system would create > > /home/arsen/build/./gettext/intl/.libs/libintl.a(libintl.so.8) > > if --disable-shared was requested. That clearly is using the > > naming of a libtool AIX shared object and failing due to > > the missing shared object. Although in this case, the problem > > seems to be the shared library load path. AIX uses LIBPATH, > > not LD_LIBRARY_PATH. > > It doesn't create libintl.a with a libintl.so.8 inside of it. The > libintl.a contains a bunch of objects, as I'd expect of a static > library: > > --8<---------------cut here---------------start------------->8--- > -bash-5.1$ ar -t gettext/intl/.libs/libintl.a | grep libintl > -bash-5.1$ ar -t gettext/intl/.libs/libintl.a > bindtextdom.o > dcgettext.o > ... > --8<---------------cut here---------------end--------------->8--- > > > > Also, for me, the out of tree path was > > > > gettext/gettext-runtime/intl/.libs > > > > Is your search path missing a level? > > No, the above is generated by the GCC build system and builds > gettext-runtime directly (per Brunos recommendation a while ago) as it > is replacing intl/ of similar functionality. > > I'm currently building GCC with libintl with the threads hack you > mentioned applied (as I got undefined references to the pthread > functions you discovered). I suspect that, bar this issue (which, IIUC, > Bruno will fix in a new release?) the patch above will fix the issues > you've encountered on AIX (note that if you want to use gettext in-tree, > you'd still have to fetch gettext into the tree). > > Maybe we should provide a download-prerequisite-y script that skips > everything but GNU gettext, to retain same behavior? > > Have a lovely day. > I'm concerned that the gettext fixes are working around AIX support for libpthread.a as opposed to making --disable-threads function. --enabled-threads=3Disoc use of mtx_* is a workaround, but it's still not allowing users to truly disable threads. Thanks, David --000000000000a86e3d060a5a2369--