You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compiling With Local Environment Variables (PATH, LD_LIBRARY, PKG_CONFIG_PATH) #40
The scl enable devtoolset-11 executes the following:
# General environment variablesexport PATH=/opt/rh/devtoolset-11/root/usr/bin${PATH:+:${PATH}}export MANPATH=/opt/rh/devtoolset-11/root/usr/share/man${MANPATH:+:${MANPATH}}export INFOPATH=/opt/rh/devtoolset-11/root/usr/share/info${INFOPATH:+:${INFOPATH}}export PCP_DIR=/opt/rh/devtoolset-11/root
# bz847911 workaround:# we need to evaluate rpm's installed run-time % { _libdir }, not rpmbuild time# or else /etc/ld.so.conf.d files?
rpmlibdir=$(rpm --eval "%{_libdir}")# bz1017604: On 64-bit hosts, we should include also the 32-bit library path.# bz1873882: On 32-bit hosts, we should include also the 64-bit library path.# bz2027377: Avoid unbound variablesif [ "$rpmlibdir"!="${rpmlibdir/lib64/}" ];then
rpmlibdir32=":/opt/rh/devtoolset-11/root${rpmlibdir/lib64/lib}"
dynpath32="$rpmlibdir32/dyninst"
rpmlibdir64=
dynpath64=
else
rpmlibdir64=":/opt/rh/devtoolset-11/root${rpmlibdir/lib/lib64}"
dynpath64="$rpmlibdir64/dyninst"
rpmlibdir32=
dynpath32=
fi# Add SCL dyninst to LD_LIBRARY_PATH, both 64- and 32-bit paths.export LD_LIBRARY_PATH=/opt/rh/devtoolset-11/root$rpmlibdir/dyninst$dynpath64$dynpath32${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}# Now prepend the usual /opt/.../usr/lib{64,}.export LD_LIBRARY_PATH=/opt/rh/devtoolset-11/root$rpmlibdir$rpmlibdir64$rpmlibdir32${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}export PKG_CONFIG_PATH=/opt/rh/devtoolset-11/root/usr/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}
The idea was to not rely on env vars on build host, but conservatively set them so that a build would be as portable as possible.
We can review that yes, thinking here you'd want to use existing LD_LIBRARY_PATH and PKG_CONFIG_PATH?
PR welcome, I think the current one is too conservative perhaps + it is trivial to ensure env vars clean on builder with an export LD_LIBRARY_PATH= if need be.
Activity
grammy-jiang commentedon Feb 26, 2024
The
scl enable devtoolset-11executes the following:zsimic commentedon Feb 28, 2024
The idea was to not rely on env vars on build host, but conservatively set them so that a build would be as portable as possible.
We can review that yes, thinking here you'd want to use existing
LD_LIBRARY_PATHandPKG_CONFIG_PATH?PR welcome, I think the current one is too conservative perhaps + it is trivial to ensure env vars clean on builder with an
export LD_LIBRARY_PATH=if need be.grammy-jiang commentedon Apr 3, 2024
I just made a simple pull request for this feature, #44.
Maybe a setting can be added to
portable-python.yamlto enable/disable this feature, how do you think?