second-state / SOLL

SOLL is a new compiler for generate Ewasm from solidity and yul. See a demo here: https://asciinema.org/a/ezJqNLicn5fya02zwu4VXIo8a
https://www.secondstate.io/
377 stars 23 forks source link

compile error , can you help me? #12

Closed BigMonsterYY closed 4 years ago

BigMonsterYY commented 4 years ago

ubuntu 20.04 , my llvm version is llvm-10 ,maybe my llvm version was too hight , can you tell the correct version ?

the output is:

@ubuntu:~/gopath/src/github.com/second-state/soll/build$ make -j4 [ 4%] Built target SHA3 [ 19%] Built target sollBasic [ 22%] Built target sollLex [ 45%] Built target sollAST [ 53%] Built target sollSema [ 62%] Built target sollParse [ 80%] Built target sollFrontend [ 82%] Building CXX object lib/CodeGen/CMakeFiles/sollCodeGen.dir/BackendUtil.cpp.o /home/ch/gopath/src/github.com/second-state/soll/lib/CodeGen/BackendUtil.cpp:65:29: error: ‘CodeGenFileType’ in ‘class llvm::TargetMachine’ does not name a type 65 | static llvm::TargetMachine::CodeGenFileType | ^~~~~~~ /home/ch/gopath/src/github.com/second-state/soll/lib/CodeGen/BackendUtil.cpp: In member function ‘bool soll::EmitAssemblyHelper::AddEmitPasses(llvm::legacy::PassManager&, soll::BackendAction, llvm::raw_pwrite_stream&)’: /home/ch/gopath/src/github.com/second-state/soll/lib/CodeGen/BackendUtil.cpp:108:24: error: ‘CodeGenFileType’ is not a member of ‘llvm::TargetMachine’ 108 | llvm::TargetMachine::CodeGenFileType CGFT = getCodeGenFileType(Action); | ^~~~~~~ /home/ch/gopath/src/github.com/second-state/soll/lib/CodeGen/BackendUtil.cpp:110:59: error: ‘CGFT’ was not declared in this scope 110 | if (TM->addPassesToEmitFile(CodeGenPasses, OS, nullptr, CGFT, false)) { | ^~~~ At global scope: cc1plus: warning: unrecognized command line option ‘-Wno-unused-private-field’ cc1plus: warning: unrecognized command line option ‘-Wno-unknown-warning-option’ make[2]: [lib/CodeGen/CMakeFiles/sollCodeGen.dir/build.make:63: lib/CodeGen/CMakeFiles/sollCodeGen.dir/BackendUtil.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:603: lib/CodeGen/CMakeFiles/sollCodeGen.dir/all] Error 2 make: *** [Makefile:130: all] Error 2

hydai commented 4 years ago

Yes. Your llvm version is too high. SOLL bases on llvm-8. More details, you can get the environment information from our Dockerfile

BigMonsterYY commented 4 years ago

@hydai thanks !

hydai commented 4 years ago

@BigMonsterYY Thanks for your report. We will update our codebase from llvm-8 to llvm-10 in the next release 0.1.1.

hydai commented 4 years ago

Hi @BigMonsterYY, I've updated our codebase. You can checkout to the latest commit(SOLL >=0.1.1) for llvm-10 dependency.