glsl-optimizer
glsl-optimizer copied to clipboard
Build error
When I try to build master on Ubuntu 12/04, I get the following error:
behdad:glsl-optimizer 2 (master)$ make [ 3%] Built target glcpp-library [ 7%] Built target mesa [ 97%] Built target glsl_optimizer [ 98%] Built target glsl_compiler [ 99%] Built target glsl_test [100%] Building CXX object CMakeFiles/glslopt.dir/contrib/glslopt/Main.cpp.o cc1plus: warning: /home/behdad/src/github/glsl-optimizer/src/mapi: No such file or directory [enabled by default] /home/behdad/src/github/glsl-optimizer/contrib/glslopt/Main.cpp: In function ‘bool init()’: /home/behdad/src/github/glsl-optimizer/contrib/glslopt/Main.cpp:20:37: error: cannot convert ‘bool’ to ‘glslopt_target’ for argument ‘1’ to ‘glslopt_ctx* glslopt_initialize(glslopt_target)’ compilation terminated due to -Wfatal-errors. make[2]: *** [CMakeFiles/glslopt.dir/contrib/glslopt/Main.cpp.o] Error 1 make[1]: *** [CMakeFiles/glslopt.dir/all
Anyone else who runs across this - realize that the stuff in /contrib
is not maintained, and is not necessary to do a build. When using cmake/make, exclude the directory or remove it to get a successful build.
My problem is not in contrib. Though, trying now, I get this different error:
Linking CXX executable glsl_compiler
libglsl_optimizer.a(glsl_parser_extras.cpp.o): In function do_common_optimization(exec_list*, bool, bool, unsigned int, gl_shader_compiler_options const*)': /home/behdad/src/github/glsl-optimizer/src/glsl/glsl_parser_extras.cpp:1523: undefined reference to
do_vectorize(exec_list*)'
collect2: ld returned 1 exit status
I'm seeing the same build error with the node extension, both in master as well as in the published npm module.
CC(target) Release/obj.target/glsl_optimizer_lib/src/mesa/program/symbol_table.o
LIBTOOL-STATIC Release/glsl_optimizer_lib.a
CXX(target) Release/obj.target/glslOptimizer/src/node/binding.o
CXX(target) Release/obj.target/glslOptimizer/src/node/compiler.o
../src/node/compiler.cpp:10:13: error: no matching function for call to 'glslopt_initialize'
_binding = glslopt_initialize(essl);
^~~~~~~~~~~~~~~~~~
../src/glsl/glsl_optimizer.h:45:14: note: candidate function not viable: no known conversion from 'bool' to 'glslopt_target' for 1st argument
glslopt_ctx* glslopt_initialize (glslopt_target target);