Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error under Linux #12

Closed
nafigator opened this issue Dec 10, 2012 · 1 comment
Closed

Build error under Linux #12

nafigator opened this issue Dec 10, 2012 · 1 comment

Comments

@nafigator
Copy link

I have compile error under Debian squize 64-bit:
[ 96%] Building C object CMakeFiles/glcpp.dir/src/glsl/glcpp/glcpp.c.o
In file included from /home/alex/src/glsl-optimizer-master/src/glsl/glcpp/glcpp.c:29:
/home/alex/src/glsl-optimizer-master/src/glsl/glcpp/../standalone_scaffolding.h:36: error: expected identifier or ‘(’ before string constant
/home/alex/src/glsl-optimizer-master/src/glsl/glcpp/../standalone_scaffolding.h:40: error: expected identifier or ‘(’ before string constant
/home/alex/src/glsl-optimizer-master/src/glsl/glcpp/../standalone_scaffolding.h:43: error: expected identifier or ‘(’ before string constant
make[2]: *** [CMakeFiles/glcpp.dir/src/glsl/glcpp/glcpp.c.o] Error 1
make[1]: *** [CMakeFiles/glcpp.dir/all] Error 2
make: *** [all] Error 2

if i try to enclose definitions in standalone_scaffolding.h like this:

ifdef _cplusplus

extern "C" {

endif

void _mesa_reference_shader(struct gl_context _ctx, struct gl_shader *_ptr,
struct gl_shader *sh);

ifdef _cplusplus

}

endif

i have another compilie error later:
[ 97%] Building CXX object CMakeFiles/glsl_compiler.dir/src/glsl/main.cpp.o
Linking CXX executable glsl_compiler
libglsl_optimizer.a(builtin_function.cpp.o): In function read_builtins(unsigned int, char const*, char const**, unsigned int)': builtin_function.cpp:(.text+0x74): undefined reference to_mesa_new_shader'
libglsl_optimizer.a(linker.cpp.o): In function link_shaders(gl_context*, gl_shader_program*)': linker.cpp:(.text+0x1dcb): undefined reference to_mesa_reference_shader'
linker.cpp:(.text+0x1e17): undefined reference to `_mesa_reference_shader'
collect2: ld returned 1 exit status
make[2]: *** [glsl_compiler] Error 1
make[1]: *** [CMakeFiles/glsl_compiler.dir/all] Error 2
make: *** [all] Error 2

@aras-p
Copy link
Owner

aras-p commented Dec 11, 2012

glcpp.c & main.cpp should not be compiled at all. I've just removed glcpp.c from the source tree.

In any case, I'm not maintaining the Linux build; it's quite possible there are errors. Win & Mac builds should work just fine, and Linux part should compile same set of files as Win & Mac ones.

@aras-p aras-p closed this as completed Dec 11, 2012
casseveritt pushed a commit to casseveritt/glsl-optimizer that referenced this issue Jan 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants