[cfarm-users] Two problems on the gcc119 machine

David Edelsohn dje.gcc at gmail.com
Wed Sep 21 17:19:11 CEST 2022


On Wed, Sep 21, 2022 at 11:08 AM Bruno Haible <bruno at clisp.org> wrote:

> David Edelsohn wrote:
> > Someone created a huge file in /var/tmp.  I have removed it, so there now
> > is space.
>
> Thank you!
>
> > > 2) A symbolic link for /usr/lib/libncurses.a exists, but linking with
> > > this library produces a non-functional program:
> > >
> > > $ cat conftest.c
> > > extern int tgetent (char *, const char *);
> > >
> > > int
> > > main (void)
> > > {
> > >   return tgetent ((char *) 0, "xterm");
> > > }
> > >
> > > $ xlc -q64 -lncurses conftest.c
> > >
> > > $ ./a.out
> > > exec(): 0509-036 Cannot load program ./a.out because of the following
> > > errors:
> > >         0509-022 Cannot load module
> > > /opt/freeware/lib/libncurses.a(libncurses.so.6).
> > >         0509-150   Dependent module libgcc_s.a(shr.o) could not be
> loaded.
> > >         0509-022 Cannot load module libgcc_s.a(shr.o).
> > >         0509-026 System error: A file or directory in the path name
> does
> > > not exist.
> > >         0509-022 Cannot load module a.out.
> > >         0509-150   Dependent module
> > > /opt/freeware/lib/libncurses.a(libncurses.so.6) could not be loaded.
> > >
> > > $ ldd ./a.out
> > > ./a.out needs:
> > >          /usr/lib/libc.a(shr_64.o)
> > >          /usr/lib/libncurses.a(libncurses.so.6)
> > >          /unix
> > >          /usr/lib/libcrypt.a(shr_64.o)
> > > Cannot find libgcc_s.a(shr.o)
> > >
> > > Probably another symlink /usr/lib/libgcc_s.a ->
> > > /opt/freeware/lib/libgcc_s.a
> > > will fix this problem.
> > >
> >
> > This is because you are combining a program compiled with XLC and a
> library
> > compiled with GCC.  You should add the LD_LIBRARY_PATH environment
> variable
> > so that the library knows where to find libgcc_s.a.
>
> Yes, I know that I can use 'LD_LIBRARY_PATH=/opt/freeware/lib', as a
> workaround.
> But it feels like the wrong cure, because
>
>   * I didn't specify to link with libgcc_s, only with libncurses, and I
> didn't
>     use gcc.
>
>   * libncurses.a is symlinked into /usr/lib, where xlc will find it. What
> was
>     the intent of this symlink? Apparently that compilations with xlc that
> use
>     -lncurses succeed. But when such compilations produce dysfunctional
>     programs, that goal has not been 100% achieved, IMHO.
>

gcc119 was installed with AIX 7.2 and the Bull Freeware packages.  Those
packages historically have contaminated the AIX namespace. IBM now
recommends the AIX Toolbox for Linux, which can use "dnf" and keeps the
namespaces more separate.

Michael Felt and I are planning to replace gcc119 with an AIX 7.3-based
system that uses the AIX Toolbox for Linux packages.

Thanks, David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tetaneutral.net/pipermail/cfarm-users/attachments/20220921/8f2ca154/attachment.htm>


More information about the cfarm-users mailing list