public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Meissner <meissner@linux.ibm.com>
To: Thomas Koenig <tkoenig@netcologne.de>
Cc: gcc mailing list <gcc@gcc.gnu.org>,
	Michael Meissner <meissner@linux.ibm.com>,
	Bill Schmidt <wschmidt@linux.ibm.com>,
	David Edelsohn <dje.gcc@gmail.com>,
	Segher Boessenkool <segher@kernel.crashing.org>,
	"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
	Peter Bergner <bergner@linux.ibm.com>
Subject: Re: [power-ieee128] What should the math functions be annotated with?
Date: Sat, 4 Dec 2021 10:25:11 -0500	[thread overview]
Message-ID: <YauIV6Qz5sH430Cw@toto.the-meissners.org> (raw)
In-Reply-To: <021be175-077b-7121-d9a7-b06e6311ca90@netcologne.de>

On Sat, Dec 04, 2021 at 02:42:13PM +0100, Thomas Koenig wrote:
> On 04.12.21 11:29, Jakub Jelinek wrote:
> > If zlib devel isn't installed, drop --with-system-zlib option
> > or use --without-system-zlib.
> > 
> > You've asked in another mail how to configure gcc to default to
> > -mabi=ieeelongdouble, that is
> > --with-long-double-format=ieee
> 
> Thanks for those hints.
> 
> I have now managed to bootstrap a compiler on that machine, but
> success at running programs is somewhat limited:
> 
> tkoenig@gcc-fortran:~/Tst$ which gcc
> /home/tkoenig/bin/gcc
> tkoenig@gcc-fortran:~/Tst$ cat hello.c
> #include <stdio.h>
> 
> int main()
> {
>   printf ("Hello, world!\n");
>   return 0;
> }
> tkoenig@gcc-fortran:~/Tst$ gcc hello.c
> tkoenig@gcc-fortran:~/Tst$ ldd ./a.out
> ./a.out: /lib/powerpc64le-linux-gnu/libc.so.6: version `GLIBC_2.34' not
> found (required by ./a.out)
>         linux-vdso64.so.1 (0x00007a16a4510000)
>         libc.so.6 => /lib/powerpc64le-linux-gnu/libc.so.6
> (0x00007a16a42c0000)
>         /opt/at15.0/lib64/ld64.so.2 => /lib64/ld64.so.2 (0x00007a16a4530000)
> tkoenig@gcc-fortran:~/Tst$ export LD_LIBRARY_PATH=~/lib64:/opt/at15.0/lib64/
> tkoenig@gcc-fortran:~/Tst$ ls
> Segmentation fault (core dumped)
> 
> @IBM folks: I would appreciate if you gave me access to a system
> which actually worked, together with the necessary information,
> so I can actually do what I volunteered to do.
> 
> Right now, I appear to be just wasting my time.

The Advance Toolchain has its own GLIBC, and it sets a different path to load
up the libraries.  You should not need to set the LD_LIBRARY_PATH variable.

Note, the system ldd does not tend to accurately report the library
dependencies for AT libraries:

15:15:03 ~/tests
-gcc-fortran-> /home/meissner/fsf-install-ppc64le/trunk/bin/gcc -O2 hello.c

15:15:23 ~/tests
-gcc-fortran-> ldd a.out
./a.out: /lib/powerpc64le-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./a.out)
        linux-vdso64.so.1 (0x0000796b63da0000)
        libm.so.6 => /lib/powerpc64le-linux-gnu/libm.so.6 (0x0000796b63c50000)
        libc.so.6 => /lib/powerpc64le-linux-gnu/libc.so.6 (0x0000796b63a10000)
        /opt/at15.0/lib64/ld64.so.2 => /lib64/ld64.so.2 (0x0000796b63dc0000)

15:15:27 ~/tests
-gcc-fortran-> /opt/at15.0/bin/ldd a.out
        linux-vdso64.so.1 (0x000070dea0140000)
        libm.so.6 => /opt/at15.0/lib64/power9/libm.so.6 (0x000070dea0020000)
        libc.so.6 => /opt/at15.0/lib64/power9/libc.so.6 (0x000070de9fdb0000)
        /opt/at15.0/lib64/ld64.so.2 (0x000070dea0160000)


This is done by the GCC driver setting a different dynamic linker path
internally:

	-dynamic-linker /opt/at15.0/lib64/ld64.so.2

Tulio can probably expand on what is going on in more detail.  The reason for
using the Advance Toolchain is to get access to newer libraries.  I don't know
Ubuntu at all, but I believe the version that is installed is too old to have
the necessary changes in it.  There isn't a LTS (long time support) version of
Ubuntu yet available that has the library.  There are newer versions that
aren't LTS (i.e. every 6 months you have to jump to the next release), and
Peter, Bill and I have talked about upgrading the partition to use those.

-- 
Michael Meissner, IBM
PO Box 98, Ayer, Massachusetts, USA, 01432
email: meissner@linux.ibm.com

  reply	other threads:[~2021-12-04 15:25 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01 20:34 Thomas Koenig
2021-12-01 20:54 ` Jakub Jelinek
2021-12-01 23:05   ` Jakub Jelinek
2021-12-03  7:29   ` Thomas Koenig
2021-12-03  9:28     ` Jakub Jelinek
2021-12-03 11:16       ` Thomas Koenig
2021-12-03 11:35         ` Jakub Jelinek
2021-12-03 11:56           ` Thomas Koenig
2021-12-03 14:57             ` Bill Schmidt
2021-12-04  6:39               ` Michael Meissner
2021-12-04  9:33                 ` Thomas Koenig
2021-12-04 10:16                 ` Thomas Koenig
2021-12-04 10:29                   ` Jakub Jelinek
2021-12-04 13:42                     ` Thomas Koenig
2021-12-04 15:25                       ` Michael Meissner [this message]
2021-12-04 15:37                         ` Peter Bergner
2021-12-04 16:12                           ` Peter Bergner
2021-12-04 16:19                             ` Jakub Jelinek
2021-12-04 22:27                               ` Peter Bergner
2021-12-04 17:40                             ` Thomas Koenig
2021-12-05  0:35                               ` Peter Bergner
2021-12-05 11:16                                 ` Thomas Koenig
2021-12-06 22:31                                   ` Michael Meissner

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=YauIV6Qz5sH430Cw@toto.the-meissners.org \
    --to=meissner@linux.ibm.com \
    --cc=bergner@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=segher@kernel.crashing.org \
    --cc=tkoenig@netcologne.de \
    --cc=wschmidt@linux.ibm.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).