From: "Arsen Arsenović" <arsen@aarsen.me>
To: Richard Biener <richard.guenther@gmail.com>
Cc: David Edelsohn <dje.gcc@gmail.com>,
Bruno Haible <bruno@clisp.org>,
gcc-patches@gcc.gnu.org
Subject: Re: [PATCH v3 0/2] Replace intl/ with out-of-tree GNU gettext
Date: Fri, 17 Nov 2023 09:56:09 +0100 [thread overview]
Message-ID: <864jhk69m7.fsf@aarsen.me> (raw)
In-Reply-To: <CAFiYyc2-JxH358GUcZfR4iBMq5qj6Nf4W=7LYoQyw6b-u8Dfqw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5043 bytes --]
Richard Biener <richard.guenther@gmail.com> writes:
> On Fri, Nov 17, 2023 at 9:46 AM Arsen Arsenović <arsen@aarsen.me> wrote:
>>
>>
>> David Edelsohn <dje.gcc@gmail.com> writes:
>>
>> > On Thu, Nov 16, 2023 at 5:52 PM Arsen Arsenović <arsen@aarsen.me> wrote:
>> >
>> > [snip]
>> >> Sure, but my patch does insert --disable-shared:
>> >>
>> >> --8<---------------cut here---------------start------------->8---
>> >> host_modules= { module= gettext; bootstrap=true; no_install=true;
>> >> module_srcdir= "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 something
>> >> tied to
>> >> // user-facing output.
>> >> extra_configure_flags='--disable-shared --disable-java
>> >> --disable-csharp --with-pic';
>> >> lib_path=intl/.libs; };
>> >> --8<---------------cut here---------------end--------------->8---
>> >>
>> >> ... and it is applied:
>> >>
>> >> --8<---------------cut here---------------start------------->8---
>> >> -bash-5.1$ ./config.status --config
>> >> --srcdir=../../gcc/gettext/gettext-runtime --cache-file=./config.cache
>> >> --disable-werror --with-gmp=/opt/cfarm
>> >> --with-libiconv-prefix=/opt/cfarm --disable-libstdcxx-pch
>> >> --with-included-gettext --program-transform-name=s,y,y,
>> >> --disable-option-checking --build=powerpc-ibm-aix7.3.1.0
>> >> --host=powerpc-ibm-aix7.3.1.0 --target=powerpc-ibm-aix7.3.1.0
>> >> --disable-intermodule --enable-checking=yes,types,extra
>> >> --disable-coverage --enable-languages=c,c++
>> >> --disable-build-format-warnings --disable-shared --disable-java
>> >> --disable-csharp --with-pic build_alias=powerpc-ibm-aix7.3.1.0
>> >> host_alias=powerpc-ibm-aix7.3.1.0 target_alias=powerpc-ibm-aix7.3.1.0
>> >> CC=gcc CFLAGS=-g 'LDFLAGS=-static-libstdc++ -static-libgcc
>> >> -Wl,-bbigtoc' 'CXX=g++ -std=c++11' CXXFLAGS=-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 see
>> >> 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?
>
> You could add --only-gettext as option to it?
Sure, that sounds good to me.
>>
>> Have a lovely day.
>> --
>> Arsen Arsenović
--
Arsen Arsenović
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 381 bytes --]
next prev parent reply other threads:[~2023-11-17 8:56 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-14 20:37 David Edelsohn
2023-11-14 23:06 ` Arsen Arsenović
2023-11-15 1:49 ` David Edelsohn
2023-11-15 12:29 ` building GNU gettext on AIX Bruno Haible
2023-11-15 19:26 ` David Edelsohn
2023-11-15 21:22 ` Bruno Haible
2023-11-15 21:31 ` David Edelsohn
2023-11-15 22:39 ` Bruno Haible
2023-11-16 16:00 ` David Edelsohn
2023-11-16 16:35 ` David Edelsohn
2023-11-16 18:01 ` David Edelsohn
2023-11-16 18:17 ` David Edelsohn
2023-11-16 18:52 ` Bruno Haible
2023-11-16 22:18 ` David Edelsohn
2023-11-16 22:46 ` Bruno Haible
2023-11-16 23:10 ` Arsen Arsenović
2023-11-17 8:33 ` Richard Biener
2023-11-17 8:49 ` Arsen Arsenović
2023-11-17 12:24 ` Bruno Haible
2023-11-17 13:06 ` Arsen Arsenović
2023-11-16 23:38 ` David Edelsohn
2023-11-17 0:07 ` Bruno Haible
2023-11-17 0:15 ` David Edelsohn
[not found] ` <84B39BF1-33D5-488E-8CF5-D08B09417568@gmail.com>
2023-11-16 17:44 ` David Edelsohn
2023-11-16 18:47 ` Bruno Haible
2023-11-16 18:50 ` Arsen Arsenović
2023-11-16 18:59 ` Bruno Haible
2023-11-16 19:14 ` Arsen Arsenović
2023-11-19 19:49 ` Bruno Haible
2023-11-15 14:14 ` [PATCH v3 0/2] Replace intl/ with out-of-tree GNU gettext Arsen Arsenović
2023-11-15 15:51 ` Xi Ruoyao
2023-11-16 18:48 ` Arsen Arsenović
2023-11-15 17:19 ` David Edelsohn
2023-11-16 18:33 ` Arsen Arsenović
2023-11-16 21:11 ` Arsen Arsenović
2023-11-16 21:40 ` David Edelsohn
2023-11-16 22:19 ` Arsen Arsenović
2023-11-16 22:30 ` David Edelsohn
2023-11-16 22:32 ` Arsen Arsenović
2023-11-16 23:59 ` David Edelsohn
2023-11-17 8:34 ` Arsen Arsenović
2023-11-17 8:50 ` Richard Biener
2023-11-17 8:56 ` Arsen Arsenović [this message]
2023-11-17 14:41 ` David Edelsohn
2023-11-17 15:16 ` Arsen Arsenović
2023-11-17 16:07 ` David Edelsohn
2023-11-18 18:10 ` Arsen Arsenović
2023-11-19 21:55 ` Bruno Haible
2023-11-19 23:00 ` Bruno Haible
2023-11-19 23:06 ` Andrew Pinski
2023-11-20 1:17 ` David Edelsohn
2023-11-20 21:18 ` Arsen Arsenović
2023-11-20 21:38 ` David Edelsohn
2023-11-21 0:44 ` Arsen Arsenović
2023-11-20 23:00 ` Bruno Haible
2023-11-21 0:45 ` Arsen Arsenović
2023-11-21 13:13 ` Arsen Arsenović
2023-11-21 16:28 ` David Edelsohn
2023-11-21 20:58 ` Eric Gallager
2023-11-15 19:58 ` David Edelsohn
-- strict thread matches above, loose matches on Subject: below --
2023-11-02 8:27 Arsen Arsenović
2023-11-10 10:37 ` Richard Biener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=864jhk69m7.fsf@aarsen.me \
--to=arsen@aarsen.me \
--cc=bruno@clisp.org \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).