opal_config_subdir.m4: do not export vars before invoking subdir configure
== Short version Do not export special variables into the environment (e.g., LIBS, LDFLAGS, etc.) when invoking subdir configure scripts. This prevents problems described in open-mpi/ompi#471. == More detail Exporing special env variables before invoking a subdir configure script causes problems in some cases. E.g., in open-mpi/ompi#471, when the user configures with `--with-hwloc=/path/to/hwloc`, and that directory is *not* in a default linker search location will cause the libevent subdir configuration to fail. This happens because: 1. We'll pass LIBS="-L/path/to/hwloc/lib -lhwloc" to the libevent configure script 1. Meaning: configure-generated executables will link successfully 1. But unless LD_LIBRARY_PATH (or some other tell-the-linker-where-to-find-things mechanism) includes /path/to/hwloc/lib, the executable can't run. Specifically, the libevent "hey, does the compiler generate proper executables?" check will fail, and configure will abort (because OMPI needs libevent). I checked the history: exporting these vars dates all the way back to LAM/MPI. I can't think of a reason why we need to export these variables -- AC_CONFIG_SUBDIRs doesn't do it; subdir configure scripts should be orthogonal from the upper-layer configure script (and its variables). So let's remove these export statements and see if anything breaks.
Этот коммит содержится в:
родитель
fadc3ad01a
Коммит
9ac9be15c4
@ -121,11 +121,6 @@ if test "$subdir_dir" != ":" && test -d $srcdir/$subdir_dir; then
|
|||||||
# Invoke the configure script in the subdirectory
|
# Invoke the configure script in the subdirectory
|
||||||
#
|
#
|
||||||
|
|
||||||
export CFLAGS CPPFLAGS
|
|
||||||
export CXXFLAGS CXXCPPFLAGS
|
|
||||||
export FCFLAGS
|
|
||||||
export LDFLAGS LIBS
|
|
||||||
|
|
||||||
sub_configure="$SHELL '$subdir_srcdir/configure'"
|
sub_configure="$SHELL '$subdir_srcdir/configure'"
|
||||||
AC_MSG_NOTICE([running $sub_configure $subdir_args --cache-file=$subdir_cache_file --srcdir=$subdir_srcdir --disable-option-checking])
|
AC_MSG_NOTICE([running $sub_configure $subdir_args --cache-file=$subdir_cache_file --srcdir=$subdir_srcdir --disable-option-checking])
|
||||||
eval "$sub_configure $subdir_args \
|
eval "$sub_configure $subdir_args \
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user