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

macOS Fixes, main branch (2024.08.14.) #677

Merged
merged 2 commits into from
Aug 15, 2024

Conversation

krasznaa
Copy link
Member

@krasznaa krasznaa commented Aug 14, 2024

Triggered by @paulgessinger pointing out that the latest version of the code doesn't work on macOS, this is what I had to do to fix that.

As it happens, the _LIBCUDACXX_STRING_H_HAS_CONST_OVERLOADS definition makes the code, or at least the part of it that we use, work on macOS. So I added a bit of code that would add _LIBCUDACXX_STRING_H_HAS_CONST_OVERLOADS to the _Thrust_Thrust target, if it seems that it's needed. I decided to do this only for the case where we build Thrust / CCCL ourselves. Since on macOS we would always do this. (With CUDA not actually supporting macOS.) Plus we can really only vouch for the behaviour of _LIBCUDACXX_STRING_H_HAS_CONST_OVERLOADS on the exact version of CCCL that we download ourselves. On any other version all bets are off with how it would work on macOS. 🤔

The fix in clustering_config.hpp is a much more straight forward affair on the other hand. 😉

@beomki-yeo and @paulgessinger: I'm happy for one of you to set up a macOS CI for the repository. I was not keen on bothering with that myself. (We only need Boost on macOS that may not be available right away on the CI machines.)

Note: It might be worth noting that it's the following code that _LIBCUDACXX_STRING_H_HAS_CONST_OVERLOADS affects:

https://github.com/NVIDIA/cccl/blob/v2.5.0/libcudacxx/include/cuda/std/detail/libcxx/include/string.h#L73

Deep, deep inside of the CCCL code...

@krasznaa krasznaa added build This relates to the build system cpu Changes related to CPU code labels Aug 14, 2024
Copy link
Member

@paulgessinger paulgessinger left a comment

Choose a reason for hiding this comment

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

Pretty hacky but I guess it gets the job done.

@krasznaa krasznaa force-pushed the macOSFixes-main-20240814 branch from 0c4e5db to 94b5d89 Compare August 14, 2024 14:06
@krasznaa
Copy link
Member Author

Curiously, while a "Makefile based" build works fine for me (latest macOS + Xcode) with these changes

Screenshot 2024-08-14 at 4 34 35 PM

, I can not generate an Xcode project for the code as it seems.

...
-- Building Acts as part of the TRACCC project
-- Are C++20 concepts supported
-- Are C++20 concepts supported - no
-- Found Boost: /Users/krasznaa/Software/Boost/1.83.0/lib/cmake/Boost-1.83.0/BoostConfig.cmake (found suitable version "1.83.0", minimum required is "1.71.0")  
-- Looking for C++ include filesystem
-- Looking for C++ include filesystem - found
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED - Failed
-- Performing Test CXX_FILESYSTEM_STDCPPFS_NEEDED
-- Performing Test CXX_FILESYSTEM_STDCPPFS_NEEDED - Failed
-- Performing Test CXX_FILESYSTEM_CPPFS_NEEDED
-- Performing Test CXX_FILESYSTEM_CPPFS_NEEDED - Failed
CMake Error at /Users/krasznaa/ATLAS/projects/traccc/build-xcode/_deps/acts-src/cmake/FindFilesystem.cmake:248 (message):
  Cannot run simple program using std::filesystem
Call Stack (most recent call first):
  /Users/krasznaa/ATLAS/projects/traccc/build-xcode/_deps/acts-src/CMakeLists.txt:241 (find_package)


-- Configuring incomplete, errors occurred!
See also "/Users/krasznaa/ATLAS/projects/traccc/build-xcode/CMakeFiles/CMakeOutput.log".
See also "/Users/krasznaa/ATLAS/projects/traccc/build-xcode/CMakeFiles/CMakeError.log".

Is this tested in the Acts CI? That -G Xcode would work...?

@paulgessinger
Copy link
Member

Is this tested in the Acts CI? That -G Xcode would work...?

No, we don't support Xcode on macOS at all.

@krasznaa
Copy link
Member Author

No, we don't support Xcode on macOS at all.

Which is just as well. Since it seems to have some nasty issues. 😦 As you can see in the log, before failing on std::filesystem, it also cannot make use of C++20 concepts.

But I'm not willing to debug that any further.

In a way that is not completely specific to macOS.
As revealed when compiling the code on macOS.
@krasznaa krasznaa force-pushed the macOSFixes-main-20240814 branch from 94b5d89 to 7e448c3 Compare August 14, 2024 18:12
@krasznaa krasznaa merged commit 2e24139 into acts-project:main Aug 15, 2024
23 checks passed
@krasznaa krasznaa deleted the macOSFixes-main-20240814 branch August 15, 2024 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build This relates to the build system cpu Changes related to CPU code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants