Skip to content
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

Bug fix for mapl when environment variable BASEDIR is set #229

9 changes: 9 additions & 0 deletions var/spack/repos/builtin/packages/mapl/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,12 @@ def patch(self):
subprocess.check_output(nc_pc_cmd, encoding="utf8").strip()
filter_file("(target_link_libraries[^)]+PUBLIC )", \
r'\1 %s '%nc_flags, "pfio/CMakeLists.txt")

def setup_build_environment(self, env):
# esma_cmake, an internal dependency of mapl, is
# looking for the cmake argument -DBASEDIR, and
# if it doesn't find it, it's looking for an
# environment variable with the same name. This
# name is common and used all over the place,
# and if it is set it breaks the mapl build.
env.unset("BASEDIR")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oops. Sorry about this, @climbfuji. I added that code because users here didn't want to always pass in -DBASEDIR on the CMake line. I don't mind doing it, but users liked being able to do cmake -B build and all works.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not a problem at all, just wondering if we could use a safer name going forward, for example GEOS_BASEDIR or something like that?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Well, if/when we go to Spack, we won't need it, so that's nice. Unfortunately, BASEDIR is pretty much embedded into the foundations of GEOS. Build system, run script, etc.