apache / apache/arrow

[C++][CMake] Invalid version script argument supplied to MSVC linker

Open
#50,449 1 comment 0 reactions 1 assignee Claimed by @johnwparent View on GitHub
Component: C++ Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the bug, including details regarding any error messages, version, and platform.

Arrow's CPP CMake currently determines linker version script argument support by assessing the current CMake version, or interrogating the linker via `check_linker_flag`.
When using MSVC, `link.exe` will not fail if given an unrecognized argument, so `check_linker_flag` always succeeds, and supplies an invalid argument to the linker.

Normally, since the linker doesn't crash on unrecognized arguments, this is fine, just produces some linker stdout noise, however if there's a space in the path to the project root, the linker will crash as it fails to correctly process an unquoted path with a space.

Example of build failure: https://gitlab.spack.io/spack/spack-packages/-/jobs/22969196

### Component(s)

C++

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.