-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
hwloc update to 2.6 (it has native CMake support) #20899
Comments
Is the CMakeLists.txt limited to windows or can it be used on all platforms? If it is limited to windows: Why is it limited? |
It's only for Windows. For other platforms, autoconf works fine, duplicating everything in cmake would require a lot of work, and nobody requested it. |
hmm vcpkg can also deal with autoconf on windows. |
autoconf builds work under MinGW/MSYS and Cygwin. We've been using the former for 10 years for publishing binary releases. Cygwin is more recent and much easier to deploy. Both support pretty much everything we have on Unix, including make check, etc. And both are very slow but we are still able to test build nightly. We distribute a basic MSVC solution but it's mostly outdated now. That's why @emmenlau asked us to ship a CMakeList based on your work. We'll keep it even if you switch to autoconf. What's wrong with CMAKE_C_FLAGS_DEBUG? I am a beginner at CMake, and I was actually trying to understand why debug flags are always enabled in one CI slave :) |
Then it should also work native on Windows. Already got it through configure. Just hitting: |
hmm funny error:
|
@bgoglin I think your |
Sidenotes:
|
I just wanted to chime in here. First, thanks a lot for the nice work! The CMakeLists.txt from vcpkg was a very good start for me to get hwloc building on Windows with Ninja, and @bgoglin could adopt it quite quickly to the latest version. Its also awesome that vcpkg can use autotools nowadays. But just to ask, if hwloc would have native cmake support for Windows is it still reasonable to adopt the autotools build? I can see that having a single build system provides some benefits, but then again autotools has its downsides on Windows, so I hope its fair to at least ask this question... |
So i get hwloc 2.5 to build nativ on windows for x64-windows-static. The x64-windows build fails with: |
So #20905 updates hwloc to 2.5 an switches it to autotools. The advantage here clearly is that all platforms are the same and pkgconfig files get generated as well as all executables. Furthermore arm builds work now. |
Dear maintainer, |
@JackBoosY Sure, use whichever build system you want. There's no plan to switch away from autotools on Unix in upstream hwloc, and we'll look at adding autotools on Windows in our CI in the future. |
firstname.lastname at inria.fr |
@bgoglin I would like to know if a more complete CMake system could be made? I use CMake exclusively for my code development and previously integrated hwloc via Conan. Unfortunately, conan is in transition from v1 to v2 and they temporarily stopped maintaining the plugin from my IDE (CLion). To avoid some pain, I decided to use the Having a correct CMakeLists.txt allows to consume hwloc in CMake projects (with CMake >= 3.24) very easily:
|
@FunMiles yes that's possible, but I am not good at CMake, hence it'll be good to keep it simple (so that I can maintain it without too much trouble) |
@bgoglin I can help a lot with CMake. I have not dug into much of how hwloc works however, so when things break I will probably need help. My new code using the approach outlined above compiles and link but crashes on an assert, which is of course frustrating... assert(hwloc_filter_check_keep_object(topology, obj)); To be honest, I think the most difficult part is the configuration files. If I understood how all the information needed to create those files is done with autotools, I could probably do it to cover almost all cases with CMake. |
@bgoglin I am making a new post as I know you won't get notified if I edit the above. |
I can provide some help on cmake side if you guys need. |
@FunMiles I cannot reproduce the failed assert on our old mac that runs the CI, neither on a M1. Can you open a proper issue at https://github.com/open-mpi/hwloc/issues ? One thing to try first: rebuild without debug, check that lstopo works, then export HWLOC_DEBUG_CHECK=1 in the environment and check that lstopo fails the assert. If so, do "lstopo foo.xml" without the export and attach foo.xml to the issue. We may also want to move the reminder of the issue to another issue at https://github.com/open-mpi/hwloc/issues to avoid discussion no-vcpkg-related things here. Regarding the configuration file, you may want to ignore a lot of autotools tests because those are related to operating systems that are old or likely won't care about CMake anytime soon. I can try to build a list of things you really want to detect for MacOS. |
Please move the discussion. This is really not a vcpkg topic ;) |
@bgoglin I opened an issue on hwloc repository demonstrating how to trigger the issue. What is the proper way to start a discussion on the CMakeLists.txt over there? @JackBoosY 's help would be welcome. |
@FunMiles the cmake discussion should just be another issue on hwloc's github, thanks. |
@FunMiles Can you please cc me on that issue or provide the issue link here? |
Library name: hwloc
New version number: 2.6
Hello
I am the upstream maintainer of hwloc. I was told about this project and we had some users requesting native CMake support for building hwloc on Windows. So I took your CMakeLists.txt as a base, updated it to hwloc 2.6 and added some additional features. See open-mpi/hwloc#484
Differences between your CMakeLists.txt and mine:
If you have some feedback before I release hwloc 2.6 officially next week, I'll be happy to update the CMakeLists. Otherwise we'll update it in future releases.
In the future, I'd like to be able to rename libhwloc.dll into libhwloc-15.dll to match other builds. If there's a need to disable that, let me know.
The text was updated successfully, but these errors were encountered: