-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autotools: add activation value "non_system_prefix" #32212
base: develop
Are you sure you want to change the base?
Conversation
Dropping system paths from When libraries in default paths such as Instead we should prioritize Spack prefixes, which is already done in the compiler wrapper iirc. Actually, after #31948, we really only need rpaths for system dirs. |
@haampie good point but I have a question then. Why do we try to avoid I admit that the compiler wrapper does a very good job de-prioritizing system prefixes (wow, it even understands that As a package maintainer, I always had the impression that once I'm in the Spack build environment, I can do $CC -O2 smoothie.c -lbanana -lorange and expect the compiler wrapper to add the missing Coming back to So, the idea behind this PR is that if Spack "ignores" a directory, it is implied that both the linker at the build time and the dynamic linker at the runtime require no additional information (neither I'm a bit confused now. I would say that we should make this configurable so that the users of such "strangely" configured systems like in your example could tell Spack not to consider certain prefixes as the system ones. UPD. Another option to handle cases like in your example could be to add an additional property for the externals in |
ba76304
to
d66cf1b
Compare
Most of the Autotools packages trust the users and blindly take whatever paths they provide as arguments for the
--with-some-package
configure options. The configure scripts normally use the path to extendLDFLAGS
with-L
flags and even-Wl,-rpath,
flags. The problem is that we don't want those flags for the system directories. Some time ago, I have implemented a customactivation_value
that filters the system paths out. I think that other packages can benefit from that too. We already have the activation valueprefix
and this PR introduces an additional one,non_system_prefix
(note that--with-some-package
is the same as--with-some-package=yes
, therefore we can make ityes_or_prefix
instead).The problem with the suggested change is that the maintainers of Spack packages (myself included) often forget to cover the case when a dependency is an external from a system prefix and will keep using
prefix
. Therefore, I think that we should not really introducenon_system_prefix
but makeprefix
do whatnon_system_prefix
does.I would also change
spack/lib/spack/spack/build_systems/autotools.py
Line 585 in b8b1a85
to
because
--with-some-package
and--with-some-package=
are different things and an empty string returned by a user-providedactivation_value
might be intended.