glsl-optimizer icon indicating copy to clipboard operation
glsl-optimizer copied to clipboard

Link fails on Mac OS X w/clang

Open asmaloney opened this issue 8 years ago • 1 comments

duplicate symbol __mesa_error_no_memory in:
    CMakeFiles/glsl_compiler.dir/src/glsl/main.cpp.o
    libglsl_optimizer.a(standalone_scaffolding.cpp.o)
ld: 1 duplicate symbol for architecture x86_64
$ clang -v
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

asmaloney avatar Mar 10 '16 14:03 asmaloney

I confirm this happens on ubuntu 16.04 with clang++ 3.8 and g++ 6.1.1.

Here's the log:

[ 98%] Linking CXX executable glslopt
[ 99%] Linking CXX executable glsl_compiler
[ 99%] Built target glslopt
libglsl_optimizer.a(standalone_scaffolding.cpp.o): In function `_mesa_error_no_memory':
standalone_scaffolding.cpp:(.text+0x5): multiple definition of `_mesa_error_no_memory'
CMakeFiles/glsl_compiler.dir/src/glsl/main.cpp.o:main.cpp:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
CMakeFiles/glsl_compiler.dir/build.make:97: recipe for target 'glsl_compiler' failed
make[2]: *** [glsl_compiler] Error 1
CMakeFiles/Makefile2:259: recipe for target 'CMakeFiles/glsl_compiler.dir/all' failed
make[1]: *** [CMakeFiles/glsl_compiler.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Linking CXX executable glsl_test
[100%] Built target glsl_test

cpcdoy avatar Jul 24 '16 23:07 cpcdoy