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

CMake configure step fails when native path Boost_ROOT is passed when building HPX #6495

Closed
kordejong opened this issue May 24, 2024 · 5 comments

Comments

@kordejong
Copy link
Contributor

I am configuring a project that uses HPX. Configuring, building, installing HPX works fine, but when Boost_ROOT was set using a native path (backslashes on Windows), my project can't use the installed HPX. Although HPX builds fine, an HPX CMake script gets installed containing the native path, which trips CMake when configuring my project.

I can pass a non-native path as Boost_ROOT, containing forward slashes, and everything works fine, but the path is actually stored in an environment variable ($CONDA_PREFIX/Library) which I want to use. In this environment variables the path contains backslashes.

Expected Behavior

Configure my project using installed HPX succeeds.

Actual Behavior

CMake stops:

CMake Error at D:/a/lue/lue/hpx_install/lib/cmake/HPX/HPXConfig.cmake:146 (set):
  Syntax error in cmake code at

    D:/a/lue/lue/hpx_install/lib/cmake/HPX/HPXConfig.cmake:146

  when parsing string

    C:\Users\runneradmin\miniconda3\envs\test/Library

  Invalid character escape '\U'.
Call Stack (most recent call first):
  environment/cmake/LueConfiguration.cmake:521 (find_package)
  environment/cmake/Lue.cmake:13 (include)
  CMakeLists.txt:79 (include)


-- Configuring incomplete, errors occurred!

Steps to Reproduce the Problem

On Windows:

  1. Configure, build, install HPX, passing in -D Boost_ROOT=<native path>
  2. Configure a project that uses the installed HPX, passing in -D HPX_ROOT=<hpx install prefix>

The second step fails with the above error message. The location of Boost is stored in the HPX_BOOST_ROOT variable in the installed HPXConfig.cmake file, in native path format, with backslashes.

This is a fix, I think: https://cmake.org/cmake/help/latest/command/file.html#to-cmake-path This can be used when setting HPX_BOOST_ROOT. Maybe other variables that contain paths should be updated as well?

Specifications

@hkaiser
Copy link
Member

hkaiser commented May 24, 2024

@kordejong could you please try with the V1.10.0 release candidate? I'dlike to make sure that this issue is fixed there.

@kordejong
Copy link
Contributor Author

I ran into this issue some time ago with 1.9.0 and am now testing whether 1.10.0 will work for us on all platforms we care about. The log I linked above is from a build against HPX 1.10.0-rc2.

@hkaiser
Copy link
Member

hkaiser commented May 24, 2024

@kordejong I have added a commit to the branch release-1.10.X that should fix this issue. Please verify.

@kordejong
Copy link
Contributor Author

All is fine now, thanks!

@hkaiser
Copy link
Member

hkaiser commented May 29, 2024

This was fixed on the release branch.

@hkaiser hkaiser closed this as completed May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants