public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pedzsan at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/55105] New: use of LD_LIBRARY_PATH incorrect for AIX -- cause trunk build to fail
Date: Sun, 28 Oct 2012 13:32:00 -0000	[thread overview]
Message-ID: <bug-55105-4@http.gcc.gnu.org/bugzilla/> (raw)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55105

             Bug #: 55105
           Summary: use of LD_LIBRARY_PATH incorrect for AIX -- cause
                    trunk build to fail
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: pedzsan@gmail.com


configure.ac has this:

# Decide which environment variable is used to find dynamic libraries.
case "${host}" in
  *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
  *-*-darwin*) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
  *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;;
  *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
esac

Starting with AIX 6.1, LD_LIBRARY_PATH is used.  I don't 100% understand the
intent of the code above.  The environment variable mentioned (e.g.
LD_LIBRARY_PATH) is passed via the environment when (e.g.) libatomic is built. 
With LD_LIBRARY_PATH in the environment, xgcc and cc1 no longer execute
properly because at the time they execute, LD_LIBRARY_PATH points to the bit
version being built -- not the bit version that xgcc was built for.  There is a
longer description here: http://gcc.gnu.org/ml/gcc/2012-10/msg00386.html

I changed it to this:

# Decide which environment variable is used to find dynamic libraries.
case "${host}" in
  *-*-aix*) RPATH_ENVVAR=BOGUS ;;
  *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
  *-*-darwin*) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
  *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;;
  *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
esac

In theory, it should be "LIBPATH" but I'm sure that will cause the build to
fail as well.  In essence, the logic needs to be reviewed.  Perhaps other
platforms are different in their use of LD_LIBRARY_PATH / LIBPATH than AIX.


             reply	other threads:[~2012-10-28 13:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-28 13:32 pedzsan at gmail dot com [this message]
2012-10-30  7:58 ` [Bug c/55105] " michael.haubenwallner at salomon dot at
2013-01-30 16:53 ` dje at gcc dot gnu.org

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=bug-55105-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).