hwloc icon indicating copy to clipboard operation
hwloc copied to clipboard

unsupported option '-mwindows' for target 'x86_64-pc-windows-msvc'

Open jakirkham opened this issue 2 years ago • 4 comments

What version of hwloc are you using?

Building 2.9.3 from source

Which operating system and hardware are you running on?

Microsoft Windows Server 2022 (x86_64)

Details of the problem

Attempted to build from source with MSVC + Clang, but ran into an issue with the -mwindows flag (please see line below):

https://github.com/open-mpi/hwloc/blob/fed97f603afc0a8fab2c6f846e3fda9f54f6e0d1/utils/lstopo/Makefile.am#L63

Initially thought this might be a Clang bug ( https://github.com/llvm/llvm-project/issues/69964 ), but was advised that the -mwindows flag was only intended for MinGW (not MSVC).

Additional information

The build script runs this activation script on Windows followed by this shell script using MinGW's bash + Clang.

Here is the full build log.

jakirkham avatar Oct 23 '23 21:10 jakirkham

It should be easy to disable this option when not building with GCC, but it would be nice to have the equivalent option for Clang. Otherwise there's no point in building both lstopo and lstopo-win.

bgoglin avatar Oct 23 '23 21:10 bgoglin

@jakirkham Can you try the tarball available at https://ci.inria.fr/hwloc/job/basic/view/change-requests/job/PR-632/ ? It should disable the build of lstopo-win entirely when it finds that the compiler says it's MSVC.

bgoglin avatar Oct 24 '23 08:10 bgoglin

@jakirkham Did you have a chance to test this?

bgoglin avatar Nov 20 '23 13:11 bgoglin

@jakirkham I updated the pull request, a tarball is available at https://ci.inria.fr/hwloc/job/basic/view/change-requests/job/PR-632/ Can you check if your problem still occurs?

bgoglin avatar Jun 12 '24 08:06 bgoglin