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

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

Open
jakirkham opened this issue Oct 23, 2023 · 3 comments · May be fixed by #632
Open

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

jakirkham opened this issue Oct 23, 2023 · 3 comments · May be fixed by #632

Comments

@jakirkham
Copy link

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):

lstopo_win_CFLAGS = $(lstopo_CFLAGS) -mwindows

Initially thought this might be a Clang bug ( llvm/llvm-project#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.

@bgoglin
Copy link
Contributor

bgoglin commented Oct 23, 2023

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 added a commit to bgoglin/hwloc that referenced this issue Oct 24, 2023
Clang can be used in "MSVC mode" to build hwloc using autotools.
That mode doesn't support -mwindows just like MSVC doesn't.
-mwindows is the only difference between lstopo-win and lstopo,
so just disable lstopo-win instead of building both identically.

Closes open-mpi#631

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
@bgoglin bgoglin linked a pull request Oct 24, 2023 that will close this issue
@bgoglin
Copy link
Contributor

bgoglin commented Oct 24, 2023

@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 added a commit to bgoglin/hwloc that referenced this issue Oct 24, 2023
Clang can be used in "MSVC mode" to build hwloc using autotools.
That mode doesn't support -mwindows just like MSVC doesn't.
-mwindows is the only difference between lstopo-win and lstopo,
so just disable lstopo-win instead of building both identically.

Closes open-mpi#631

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
bgoglin added a commit to bgoglin/hwloc that referenced this issue Oct 24, 2023
Clang can be used in "MSVC mode" to build hwloc using autotools.
That mode doesn't support -mwindows just like MSVC doesn't.

Closes open-mpi#631

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
bgoglin added a commit to bgoglin/hwloc that referenced this issue Oct 24, 2023
Clang can be used in "MSVC mode" to build hwloc using autotools.
That mode doesn't support -mwindows just like MSVC doesn't.
-mwindows is the only difference between lstopo-win and lstopo,
so just disable lstopo-win instead of building both identically.

Closes open-mpi#631

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
@bgoglin
Copy link
Contributor

bgoglin commented Nov 20, 2023

@jakirkham Did you have a chance to test this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants