godotengine / godotengine/godot
LLVM builds selects different version for tools
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
master
### System information
Debian testing; SCons 4.5.2; Python 3.12.6
### Issue description
First of all I am not sure if it is bug of godot or rather a bug of SCons but anyway users (me) are affected
I have installed several llvm versions: 15,16,18. If I use llvm without lto everything is fine but if I try to enable lto I get these strange errors:
```
Ranlib Library modules/libmodule_csg.linuxbsd.template_release.x86_64.llvm.a ...
bfd plugin: LLVM gold plugin has failed to create LTO module: Unknown attribute kind (86) (Producer: 'LLVM16.0.6' Reader: 'LLVM 15.0.7')
bfd plugin: LLVM gold plugin has failed to create LTO module: Unknown attribute kind (86) (Producer: 'LLVM16.0.6' Reader: 'LLVM 15.0.7')
bfd plugin: LLVM gold plugin has failed to create LTO module: Unknown attribute kind (86) (Producer: 'LLVM16.0.6' Reader: 'LLVM 15.0.7')
```
It selects one version for creating (what it creates `*.o` files?) and uses another version to link a library from them. It is weird especially in my case because it uses a lower version which can't understand format of higher version. If I remove `llvm-15*` packages everything starts to work correctly but emscripten depends on `llvm-15` (at least for now in debian testing). It also a bit strange that it uses 16 because I also installed 18.
### Steps to reproduce
N/A
### Minimal reproduction project (MRP)
N/A
Contributor guide
Research direction
No source file, test, or reproduction project is named. Start by reproducing the LTO build on Debian testing with LLVM 15, 16, and 18 installed, then trace how the build selects LLVM for object creation and library linking. Done means the build uses compatible LLVM versions consistently or the issue is confirmed to belong to SCons.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, debian, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100