You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In MacOS, /usr/bin/g++ actually invokes clang++. A simple test project using dds build -t :gcc compiles successfully, but fails to link as it cannot find libstdc++fs (and even if it could it probably wouldn't work).
Steps to Reproduce
Write a simple test project
Attempt to build with dds build -t :gcc
Receive linker error message
dds Output
22:35:15] [info ] [example] Compile: example.test.cpp
[22:35:16] [info ] [example] Compile: example.test.cpp - 757ms [1/1]
[22:35:16] [info ] Compilation completed in 801ms
[22:35:16] [info ] Archiving completed in 0ms
[22:35:16] [info ] [example] Link: test/example
[22:35:16] [info ] [example] Link: test/example - 86ms
[22:35:16] [error] Failed to link executable [/Users/tristan/Coding/dds-experiments/example/_build/test/./example]. Link command was [g++ -fPIC -fdiagnostics-color /Users/tristan/Coding/dds-experiments/example/_build/obj/example.test.cpp.o /Users/tristan/Coding/dds-experiments/example/_build/_test-driver/v1/catch2/catch-main.cpp.o -pthread -lstdc++fs -o/Users/tristan/Coding/dds-experiments/example/_build/test/./example] [Exited 1], produced output:
ld: library not found for -lstdc++fs
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[22:35:16] [error] Linking a runtime binary (executable/shared library/DLL) failed
[22:35:16] [error]
Linking a runtime binary file failed. There are a variety of possible causes
for this error. Refer to the documentation for more information.
[22:35:16] [error] Refer: https://vector-of-bool.github.io/docs/dds/err/link-failure.html
Desktop (please complete the following information):
Operating System: MacOS
Compiler: Clang pretending to be GCC
dds Version: 0.1.0-alpha.2
Additional context
Perhaps on MacOS, the built-in :gcc toolchain should be special-cased to use the Clang Compiler-ID setting, rather than GNU? (Which also doesn't work right now, but that's #11 )
The text was updated successfully, but these errors were encountered:
Urgh. This is one of those very aggravating platform quirks.
In this case, I think things will be fixed by removing -lstdc++fs as a default link flag. This was a flag that I needed for my own case but should never have been applied universally. Other than that, gcc being aliased to AppleClang should "just work."
Describe the bug
In MacOS,
/usr/bin/g++
actually invokesclang++
. A simple test project usingdds build -t :gcc
compiles successfully, but fails to link as it cannot findlibstdc++fs
(and even if it could it probably wouldn't work).Steps to Reproduce
dds build -t :gcc
dds
OutputDesktop (please complete the following information):
dds
Version:0.1.0-alpha.2
Additional context
Perhaps on MacOS, the built-in
:gcc
toolchain should be special-cased to use the ClangCompiler-ID
setting, rather thanGNU
? (Which also doesn't work right now, but that's #11 )The text was updated successfully, but these errors were encountered: