From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22795 invoked by alias); 28 Oct 2012 13:32:34 -0000 Received: (qmail 22755 invoked by uid 48); 28 Oct 2012 13:32:21 -0000 From: "pedzsan at gmail dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pedzsan at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-10/txt/msg02628.txt.bz2 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.