DarkRTA/chronos

Error when compiling on WSL

wolicodes opened this issue · 4 comments

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

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

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

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.

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