DarkRTA / chronos

a terminal-based speedrun timer using https://github.com/livesplit/livesplit-core
MIT License
23 stars 4 forks source link

Error when compiling on WSL #11

Closed wolicodes closed 2 years ago

wolicodes commented 2 years ago

Hello, here's the error:

LINK chronos
/usr/bin/ld: error: LLVM gold plugin has failed to create LTO module: Unknown attribute kind (70) (Producer: 'LLVM13.0.0-rust-1.57.0-stable' Reader: 'LLVM 10.0.0')
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:35: chronos] Error 1
DarkRTA commented 2 years ago

This sounds more like an issue with your build environment. Can you give me information about what distro you are using under WSL.

wolicodes commented 2 years ago

It's Ubuntu, here are the versions of the different software:


GNU Make 4.2.1
Built for x86_64-pc-linux-gnu

rustc 1.57.0

gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0

clang version 10.0.0-4ubuntu1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
DarkRTA commented 2 years ago

Alright so I'm thinking -flto with clang is causing problems for your specific build environment. You should edit the first line of the Makefile and remove that flag, and optionally switch to using gcc instead of clang.

wolicodes commented 2 years ago

It was indeed the -flto option, works now even when compiling with clang. Thanks :)