user997112
user997112

Reputation: 30655

Clang 3.8 error: invalid linker name in argument '-fuse-ld=gold-2.25'

I am using Clang 3.8 on CentOS 7.4 to compile a C++ app using third party libraries and their (complicated) makefiles. When including their makefile and running my own I am getting the following error during linkage:

clang-3.8: error: invalid linker name in argument '-fuse-ld=gold-2.25'

I had a look online, some suggestions were to change this to -fuse-ld=gold, but still, that didn't work.

Could someone explain what this problem is and how I can fix it?

UPDATE

Also tried -fuse-ld=lld but I still get an error:

clang-3.8: error: invalid linker name in argument '-fuse-ld=lld'

Upvotes: 7

Views: 9519

Answers (2)

DhP
DhP

Reputation: 316

Also tried -fuse-ld=lld but I still get an error: clang-3.8: error: invalid linker name in argument '-fuse-ld=lld'

While this might be Arch specific and perhaps not applicable to CentOS:

Just minutes ago i was source-building Godot using scons platform=linuxbsd use_llvm=yes use_lld=yes, facing the same issue.

Turns out, lld apparently is a separate package. (trying ld seemed to fail in combination)

So, yay -S lld (or rather sudo pacman -S lld) , resolved the issue straight away.

[100%] Linking Program        ==> bin/godot.linuxbsd.tools.64.llvm

Upvotes: 4

Kaveh Vahedipour
Kaveh Vahedipour

Reputation: 3477

Your clang build does not support linking with gold.

Upvotes: 1

Related Questions