cide icon indicating copy to clipboard operation
cide copied to clipboard

Third party glslang needs a CMakeLists.txt

Open Petross404 opened this issue 3 years ago • 8 comments

I am getting this error about a missing cmakelist.txt

--   Libclang C library:  /usr/local/Cellar/llvm/11.0.0/lib/libclang.dylib
--   Builtin include dir: /usr/local/Cellar/llvm/11.0.0/lib/clang/11.0.0/include
CMake Error at CMakeLists.txt:44 (add_subdirectory):
  The source directory

    /Users/petros/projects/cide/third_party/glslang

  does not contain a CMakeLists.txt file.


CMake Warning at third_party/googletest/CMakeLists.txt:54 (project):
  VERSION keyword not followed by a value or was followed by a value that
  expanded to nothing.


-- Configuring incomplete, errors occurred!
See also "/Users/petros/projects/cide/build/CMakeFiles/CMakeOutput.log".

Commenting out the line that is adding the directory leads the compilation to fail later with:

FAILED: CMakeFiles/CIDEBaseLib.dir/src/cide/glsl_parser.cc.o 
/Library/Developer/CommandLineTools/usr/bin/c++ -DCIDEBaseLib_EXPORTS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_HELP_LIB -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -I. -I../ -ICIDEBaseLib_autogen/include -I../src -I../third_party/yaml-cpp-0.6.3/include -I../third_party/googletest/include -I/usr/local/Cellar/llvm/11.0.0/include -I/usr/local/include -iframework /usr/local/opt/qt/lib -isystem /usr/local/opt/qt/lib/QtWidgets.framework/Headers -isystem /usr/local/opt/qt/lib/QtGui.framework/Headers -isystem /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/Headers -isystem /usr/local/opt/qt/lib/QtCore.framework/Headers -isystem /usr/local/opt/qt/./mkspecs/macx-clang -isystem /usr/local/opt/qt/lib/QtHelp.framework/Headers -isystem /usr/local/opt/qt/lib/QtSql.framework/Headers -isystem /usr/local/opt/qt/lib/QtSvg.framework/Headers -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -O2 -msse2 -msse3 -Wno-sign-compare -Wno-strict-overflow -fPIC -std=gnu++11 -MD -MT CMakeFiles/CIDEBaseLib.dir/src/cide/glsl_parser.cc.o -MF CMakeFiles/CIDEBaseLib.dir/src/cide/glsl_parser.cc.o.d -o CMakeFiles/CIDEBaseLib.dir/src/cide/glsl_parser.cc.o -c ../src/cide/glsl_parser.cc
../src/cide/glsl_parser.cc:147:21: error: excess elements in scalar initializer
    /* .limits = */ {
                    ^
../src/cide/glsl_parser.cc:157:6: warning: missing field 'doWhileLoops' initializer [-Wmissing-field-initializers]
    }};
     ^
../src/cide/glsl_parser.cc:145:42: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    /* .maxDualSourceDrawBuffersEXT = */ 1,
                                         ^~
                                         {
../src/cide/glsl_parser.cc:343:19: error: use of undeclared identifier 'EShLangRayGen'; did you mean 'EShLangRayGenNV'?
    shaderStage = EShLangRayGen;
                  ^~~~~~~~~~~~~
                  EShLangRayGenNV
/usr/local/include/glslang/Public/ShaderLang.h:95:5: note: 'EShLangRayGenNV' declared here
    EShLangRayGenNV,
    ^
../src/cide/glsl_parser.cc:345:19: error: use of undeclared identifier 'EShLangIntersect'; did you mean 'EShLangIntersectNV'?
    shaderStage = EShLangIntersect;
                  ^~~~~~~~~~~~~~~~
                  EShLangIntersectNV
/usr/local/include/glslang/Public/ShaderLang.h:96:5: note: 'EShLangIntersectNV' declared here
    EShLangIntersectNV,
    ^
../src/cide/glsl_parser.cc:347:19: error: use of undeclared identifier 'EShLangAnyHit'; did you mean 'EShLangAnyHitNV'?
    shaderStage = EShLangAnyHit;
                  ^~~~~~~~~~~~~
                  EShLangAnyHitNV
/usr/local/include/glslang/Public/ShaderLang.h:97:5: note: 'EShLangAnyHitNV' declared here
    EShLangAnyHitNV,
    ^
../src/cide/glsl_parser.cc:349:19: error: use of undeclared identifier 'EShLangClosestHit'; did you mean 'EShLangClosestHitNV'?
    shaderStage = EShLangClosestHit;
                  ^~~~~~~~~~~~~~~~~
                  EShLangClosestHitNV
/usr/local/include/glslang/Public/ShaderLang.h:98:5: note: 'EShLangClosestHitNV' declared here
    EShLangClosestHitNV,
    ^
../src/cide/glsl_parser.cc:351:19: error: use of undeclared identifier 'EShLangMiss'; did you mean 'EShLangMissNV'?
    shaderStage = EShLangMiss;
                  ^~~~~~~~~~~
                  EShLangMissNV
/usr/local/include/glslang/Public/ShaderLang.h:99:5: note: 'EShLangMissNV' declared here
    EShLangMissNV,
    ^
../src/cide/glsl_parser.cc:353:19: error: use of undeclared identifier 'EShLangCallable'; did you mean 'EShLangCallableNV'?
    shaderStage = EShLangCallable;
                  ^~~~~~~~~~~~~~~
                  EShLangCallableNV
/usr/local/include/glslang/Public/ShaderLang.h:100:5: note: 'EShLangCallableNV' declared here
    EShLangCallableNV,
    ^
2 warnings and 7 errors generated.
[8/33] Building CXX object CMakeFiles/CIDEBaseLib.dir/src/cide/project.cc.o
ninja: build stopped: subcommand failed.

Glslang is distributed and can be installed separately (even on mac os with homebrew). Do you think linking to the bundled lib unconditionally is the best option?

Petross404 avatar Nov 22 '20 21:11 Petross404

Probably you did not check out the git submodule for glslang? Doing that should add the missing CMakeLists.txt.

Not sure whether the git submodule is better or expecting the library to be installed on the system. The former should ensure that the version is compatible.

puzzlepaint avatar Nov 23 '20 17:11 puzzlepaint

Probably you did not check out the git submodule for glslang? Doing that should add the missing CMakeLists.txt.

Not sure whether the git submodule is better or expecting the library to be installed on the system. The former should ensure that the version is compatible.

I will do.

It's almost always the better solution to expect it system-installed. The compatibility thing can be solved inside find_package or in case of a distro within the package manager.

Every big project (take for example firefox or blender) bundles some critical libraries but is giving the user the option to use the system-installed. This is especially true in source-based distros like Gentoo for example.

Petross404 avatar Nov 29 '20 16:11 Petross404

@puzzlepaint Please put a bit more love into this project or just archived it. Git submodule checkout currently fails.

ruanjiasing avatar Aug 20 '22 02:08 ruanjiasing

@3oheicrw It seems that our ideas about open source projects differ substantially. Personally, I developed CIDE mainly for my own use, but made the project available here for the case that others may be interested in it as well. I cannot guarantee maintenance at all times, however. Since I personally still use CIDE on a daily basis, it works very well for me, and I upload any changes to its code that I make here, archiving the project does not seem like the right thing to do.

If you want to have customer support, perhaps a commercial IDE might be the better option for you? Alternatively, there are also other more mature open source projects. For example, CIDE was heavily inspired by KDevelop. KDevelop usually used to work very well for me and I could recommend it as a more mature alternative.

puzzlepaint avatar Aug 20 '22 11:08 puzzlepaint

@3oheicrw It seems that our ideas about open source projects differ substantially. Personally, I developed CIDE mainly for my own use, but made the project available here for the case that others may be interested in it as well. I cannot guarantee maintenance at all times, however. Since I personally still use CIDE on a daily basis, it works very well for me, and I upload any changes to its code that I make here, archiving the project does not seem like the right thing to do.

If you want to have customer support, perhaps a commercial IDE might be the better option for you? Alternatively, there are also other more mature open source projects. For example, CIDE was heavily inspired by KDevelop. KDevelop usually used to work very well for me and I could recommend it as a more mature alternative.

At least please fix the submodule checkout so I could compile your IDE. I have everything set on MSYS2 (toolchain + qt) and still waiting for you.

ruanjiasing avatar Aug 20 '22 14:08 ruanjiasing

I may look into it someday but frankly, the tone of your messages doesn't exactly motivate me to do it. You would achieve more by formulating them in a polite way instead of making requests.

puzzlepaint avatar Aug 20 '22 21:08 puzzlepaint

I may look into it someday but frankly, the tone of your messages doesn't exactly motivate me to do it. You would achieve more by formulating them in a polite way instead of making requests.

Oh no you don't want me to polite with you. From the beginning I'm a bit tough because I was disappointed, after realized my own ignorant why this IDE requires cmake I lowered the tone and really want to help. Only this IDE moves me from surprise to another surprise my tone get a bit harder again. You don't want me to help. As you said, it's your own and you are eating your own dog food, only share here for people could use if they want (this pretty much nullify any responsibility possible of yours to maintain this project, what is I considered irresponsibility). Oh, don't repeat again the mantra open voluntarily work + work in free time, bla bla... please. I didn't request new features nor even bug fixes. I just requested being able to build. The fact is, you want me to beg you for that and I will not. And I know, even if I begged, you will not neccessarily do it. You will do it when you deemed you want won't you? No. I will not waste time with you and your pet project any longer. Eat your own dog food. Bye.

ruanjiasing avatar Aug 21 '22 03:08 ruanjiasing

It is sad to see that there are trolls on GitHub. Welcome to my blocked user list @3oheicrw.

puzzlepaint avatar Aug 21 '22 11:08 puzzlepaint