Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

How to build LunarGLASS #65

Open
SakuraXiaMF opened this issue Jul 16, 2019 · 12 comments
Open

How to build LunarGLASS #65

SakuraXiaMF opened this issue Jul 16, 2019 · 12 comments

Comments

@SakuraXiaMF
Copy link

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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Author

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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Author

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

@SakuraXiaMF
Copy link
Author

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
Copy link
Contributor

Which commit of glslang do you have checked out?

@SakuraXiaMF
Copy link
Author

Which commit of glslang do you have checked out?

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

@SakuraXiaMF
Copy link
Author

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
Copy link
Contributor

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

@Oxygenxy
Copy link

Oxygenxy commented Mar 8, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants