Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/cairo/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class Cairo(AutotoolsPackage, MesonPackage):
# patch from https://gitlab.freedesktop.org/cairo/cairo/issues/346
patch("fontconfig.patch", when="@1.16.0:1.17.2")
# Don't regenerate docs to avoid a dependency on gtk-doc
patch("disable-gtk-docs.patch", when="build_system=autotools ^autoconf@2.70:")
patch("disable-gtk-docs.patch", when="build_system=autotools")


class MesonBuilder(meson.MesonBuilder):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,19 @@ def setup_dependent_build_environment(
env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0"))
env.set("GI_SCANNER_DISABLE_CACHE", "1")

# TODO: Fix this in a more complete way
# This needs to be manually added to the PKG_CONFIG_PATH or it won't be detected by
# dependent packages reliably.
# If bootstrap is external append it to ensure that Spack paths are searched before
# system paths
# If it is built by Spack it should be safe to prepend.
if self.spec.satisfies("^glib-bootstrap"):
env.append_path("PKG_CONFIG_PATH", self.spec["glib-bootstrap"].prefix.lib.pkgconfig)
glib_bootstrap_spec = self.spec["glib-bootstrap"]
pkg_config_path = self.spec["glib-bootstrap"].prefix.lib.pkgconfig
if glib_bootstrap_spec.external:
env.append_path("PKG_CONFIG_PATH", pkg_config_path)
else:
env.prepend_path("PKG_CONFIG_PATH", pkg_config_path)
Comment on lines +161 to +173
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The root of the issue is the link dep of a build dep is not included in the PKG_CONFIG_PATH variable. It is labeled, oddly, as a runtime only dep. To fix that is going to require a lot more thought as we have to change logic that is buried inside of build environment and my first pass at that was incomplete. This is easier and fixes the most immediate case.

You can still have a case where glib and glib-bootstrap are both in the deps and the glib-2.0 is always detected as the bootstrap version even if that isn't what is wanted.

--

So on my system I have an external package configured also in this stack. This creates a problem with pkg-config search for glib-2.0 finds the wrong glib.

When we build the search path for spack we prepend all externals and then all non externals. This way we search the spack built prefixes first, then external prefixes. The external prefix that I have is not excluded and also contains the pkg-config files for all of my system packages. Including an external glib that doesn't satisfy the version constraint for gobject and is the wrong glib I'm general. So appending this package path always results in broken search in a common case.

So to "fix" this case I try to mimic the behavior of the build environment where spack installed packages are listed first, and externals are listed second. This is not a complete fix, but it gets past this common case for now.



class AutotoolsBuilder(BuildEnvironment, autotools.AutotoolsBuilder):
Expand Down
19 changes: 13 additions & 6 deletions repos/spack_repo/builtin/packages/libproxy/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,20 @@ class Libproxy(CMakePackage, MesonPackage):

extends("python", when="+python")

@property
def libs(self):
return find_libraries(
["libproxy", "libpxbackend*"], root=self.prefix, shared=True, recursive=True
)

def setup_run_environment(self, env: EnvironmentModifications) -> None:
if self.spec.satisfies("+python"):
libs = self.spec["libproxy"].libs.directories[0]
if self.spec.satisfies("platform=darwin"):
env.prepend_path("DYLD_FALLBACK_LIBRARY_PATH", libs)
else:
env.prepend_path("LD_LIBRARY_PATH", libs)
library_path_var = "LD_LIBRARY_PATH"
if self.spec.satisfies("platform=darwin"):
library_path_var = "DYLD_FALLBACK_LIBRARY_PATH"

libs = self.spec["libproxy"].libs
for dirs in libs.directories:
env.prepend_path(library_path_var, dirs)


class CMakeBuilder(cmake.CMakeBuilder):
Expand Down
12 changes: 7 additions & 5 deletions repos/spack_repo/builtin/packages/openfoam/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,11 @@ class Openfoam(Package):
variant("scotch", default=True, description="With scotch/ptscotch decomposition")
variant("zoltan", default=False, description="With zoltan renumbering")
variant("mgridgen", default=False, description="With mgridgen support")
variant(
"paraview", default=False, description="Build paraview plugins and runtime post-processing"
)
# variant(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@olesenm Are you okay with dropping this variant for now and opening a PR to re-add it?

Right now there is something going on in the concretizer that is overly constraining here such that bison cannot be concretized with GCC. As far as I can tell there is nothing wrong in packages but it is currently blocking the release of ParaView 6.

# "paraview",
# default=False,
# description="Build paraview plugins and runtime post-processing",
# )
variant("vtk", default=False, description="With VTK runTimePostProcessing")
variant(
"source", default=True, description="Install library/application sources and tutorials"
Expand Down Expand Up @@ -431,9 +433,9 @@ class Openfoam(Package):
# ~/.spack/packages.yaml

# 1706 ok with newer paraview but avoid pv-5.2, pv-5.3 readers
depends_on("paraview@5.4:", when="@1706:+paraview")
# depends_on("paraview@5.4:", when="@1706:+paraview")
# 1612 plugins need older paraview
depends_on("paraview@:5.0.1", when="@1612+paraview")
# depends_on("paraview@:5.0.1", when="@1612+paraview")

# Icx only support from v2106 onwards
conflicts("%oneapi", when="@:2012", msg="OneAPI compiler not supported. Try v2106 or greater.")
Expand Down
Loading
Loading