Bug 55105 - use of LD_LIBRARY_PATH incorrect for AIX -- cause trunk build to fail
Summary: use of LD_LIBRARY_PATH incorrect for AIX -- cause trunk build to fail
Status: RESOLVED DUPLICATE of bug 52623
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-28 13:32 UTC by Perry Smith
Modified: 2013-01-30 16:52 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Perry Smith 2012-10-28 13:32:21 UTC
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.
Comment 1 Michael Haubenwallner 2012-10-30 07:58:20 UTC
Feels like a dup of bug#52623, or vice-versa.

Haven't tried --disable-build-poststage1-with-cxx recently, not sure if this still should work with current trunk.
Comment 2 David Edelsohn 2013-01-30 16:52:41 UTC
Duplicate.

*** This bug has been marked as a duplicate of bug 52623 ***