LunarG / LunarGLASS

LLVM IR and optimizer for shaders, including front-end adapters for GLSL and SPIR-V and back-end adapter for GLSL
Other
173 stars 21 forks source link

How to build LunarGLASS #65

Open SakuraXiaMF opened 5 years ago

SakuraXiaMF commented 5 years ago

I have just successfully installed LLVM and glslang, but I don't know how to use cmake to build LunarGLASS.

As the Readme.md

Building LunarGLASS (the LunarGOO standalone tool) By default, this builds a command-line tool that translates GLSL -> LunarGLASS -> GLSL. Use CMake, building in the directory PathOfYourChoice/LunarGLASS/build

How should I make instructions on the Linux terminal?

Thank you very much!

johnkslang commented 5 years ago

The README does show some uses of cmake for Linux. You would need to install it, and execute it similarly to that. It is a widely used cross-platform build tool, so there is a lot more information about it out there.

SakuraXiaMF commented 5 years ago

The README does show some uses of cmake for Linux. You would need to install it, and execute it similarly to that. It is a widely used cross-platform build tool, so there is a lot more information about it out there.

Thank you very much! When I run make instruction in LunarGLASS fold,I get the same error as issue #56

I don't know if it's a problem with my fold location.My folds location is as follow:

~/Downloads/LunarGLASS/ ~/Downloads/glslang/ ~/Downloads/LunarGLASS/Core/LLVM/llvm-3.4/

SakuraXiaMF commented 5 years ago

I am sorry to bother you. However, I encountered a new problem yesterday. When I run make in ~/LunarGLASS/build/ , I get another errors: home/lijiatu/Downloads/LunarGLASS/Standalone/main.cpp:884:44: error: ‘GLSLANG_REVISION’ was not declared in this scope printf("Glslang Version: %s %s\n", GLSLANG_REVISION, GLSLANG_DATE); ^~~~ /home/lijiatu/Downloads/LunarGLASS/Standalone/main.cpp:884:44: note: suggested alternative: ‘SPV_REVISION’ printf("Glslang Version: %s %s\n", GLSLANG_REVISION, GLSLANG_DATE); ^~~~ SPV_REVISION /home/lijiatu/Downloads/LunarGLASS/Standalone/main.cpp:884:62: error: ‘GLSLANG_DATE’ was not declared in this scope printf("Glslang Version: %s %s\n", GLSLANG_REVISION, GLSLANG_DATE); ^~~~

greg-lunarg commented 5 years ago

However, I encountered a new problem yesterday.

This is possible as (I believe) no one has been making sure that this project builds with the latest glslang.

One suggestion would be using an older version of glslang consistent with the other files of this project.

SakuraXiaMF commented 5 years ago

However, I encountered a new problem yesterday.

This is possible as (I believe) no one has been making sure that this project builds with the latest glslang.

One suggestion would be using an older version of glslang consistent with the other files of this project. Thank for you replay.what is version of glslang you use? Senior!

SakuraXiaMF commented 5 years ago

I used the glslangValidator -v command in terminal. The terminal show me the glslang version is 7.12.3276

SakuraXiaMF commented 5 years ago

ok,I finished the compile,but when linking this program I get a new error : [100%] Linking CXX executable LunarGOO /usr/bin/ld: cannot find -lglslangFrontend collect2: error: ld returned 1 exit status Standalone/CMakeFiles/LunarGOO.dir/build.make:179: recipe for target 'Standalone/LunarGOO' failed make[2]: *** [Standalone/LunarGOO] Error 1 CMakeFiles/Makefile2:760: recipe for target 'Standalone/CMakeFiles/LunarGOO.dir/all' failed make[1]: *** [Standalone/CMakeFiles/LunarGOO.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2

greg-lunarg commented 5 years ago

Which commit of glslang do you have checked out?

SakuraXiaMF commented 5 years ago

Which commit of glslang do you have checked out?

Just like ReadMe.md. Can I communicate with you privately?

SakuraXiaMF commented 5 years ago

Up to now,the last error is my system can't find a dynamic libiary, which is named as glslangFrontend.so. And when I build LunarGLASS project at LunarGLASS/build/ folder,use the make commend.Then ld told me:can not find -lglslangFrontend.

johnkslang commented 5 years ago

Are you intentionally using dynamic libraries? I wonder is static linking works better, at least to start with.

Oxygenxy commented 4 years ago

I encountered some problems when I build LunarGLASS. Could you please help me ?

[ 87%] Linking CXX static library libcore.a /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libcore.a(BottomIR.cpp.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libcore.a(Options.cpp.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libcore.a(BottomIR.cpp.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libcore.a(Options.cpp.o) has no symbols [ 87%] Built target core

[100%] Linking CXX executable LunarGOO ld: library not found for -lSPIRV-Tools clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [Standalone/LunarGOO] Error 1 make[1]: [Standalone/CMakeFiles/LunarGOO.dir/all] Error 2 make: *** [all] Error 2