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

Linker detection fails for wr-cc (VxWorks) without a file input #13218

Open
petwu opened this issue May 16, 2024 · 0 comments
Open

Linker detection fails for wr-cc (VxWorks) without a file input #13218

petwu opened this issue May 16, 2024 · 0 comments

Comments

@petwu
Copy link

petwu commented May 16, 2024

Describe the bug
I wanted to build fribidi for VxWorks via the respective conan recipe. Unfortunately, the configure step failed with the following error:

Detecting linker via: `wr-cc -Wl,--version` -> 0

..\src\meson.build:1:0: ERROR: Unable to detect linker for compiler `wr-cc -Wl,--version`
stdout: 
stderr: 

The problem is, that without a file argument (actually, any string will do, it doesn't need to be the path to an existing file), the command just exits without printing anything. See the difference:

C:\VxWorks\V7.2303>wr-cc -Wl,--version

C:\VxWorks\V7.2303>wr-cc -Wl,--version foo
GNU ld (GNU Binutils) 2.40
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

To Reproduce
Any hello-world project will do. Though, I'm afraid VxWorks is proprietary and paid, which may limit testability on your side. So I am happy to help out if you need any testing done.

Expected behavior
I have noticed, that for some compilers you already pass a dummy file path when detecting the linker version (see here, here, here and here). Doing something similar for the wr-cc/wr-c++ compiler would solve the issue.

As this requirement to pass a file seems somewhat common across different compilers/linkers, maybe you could implement the linker detection with a fallback, that adds a file path argument to the command if the detection without fails. This way it would be linker-agnostic and would not require handling every special case out there. Just a suggestion.

system parameters

  • Is this a cross build or just a plain native build (for the same computer)?: cross build
  • what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.): Windows 10
  • what Python version are you using e.g. 3.8.0: 3.11.2
  • what meson --version: 1.2.1
  • what ninja --version if it's a Ninja build: 1.11.1
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

No branches or pull requests

1 participant