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

Compiling on Gentoo

Open iegor opened this issue 10 years ago • 5 comments

Hi there,

I have trouble with compiling on Gentoo, I will probably do a fork and just fix this but also want to share.

[ 98%] Building CXX object CMakeFiles/glsl_compiler.dir/src/glsl/main.cpp.o /usr/bin/x86_64-pc-linux-gnu-g++ -DNDEBUG -O2 -pipe -march=corei7-avx -fno-omit-frame-pointer -Os -DNDEBUG -I/tmp/portage/gfx-tools/glsl-optimizer-9999/work/glsl-optimizer-9999/include -I/tmp/portage/gfx-tools/glsl-optimizer-9999/work/glsl-optimizer-9999/src/mesa -I/tmp/portage/gfx-tools/glsl-optimizer-9999/work/glsl-optimizer-9999/src/mapi -I/tmp/portage/gfx-tools/glsl-optimizer-9999/work/glsl-optimizer-9999/src/glsl -I/tmp/portage/gfx-tools/glsl-optimizer-9999/work/glsl-optimizer-9999/src -o CMakeFiles/glsl_compiler.dir/src/glsl/main.cpp.o -c /tmp/portage/gfx-tools/glsl-optimizer-9999/work/glsl-optimizer-9999/src/glsl/main.cpp Linking CXX executable glsl_compiler /usr/bin/cmake -E cmake_link_script CMakeFiles/glsl_compiler.dir/link.txt --verbose=1 /usr/bin/x86_64-pc-linux-gnu-g++ -O2 -pipe -march=corei7-avx -fno-omit-frame-pointer -Os -DNDEBUG CMakeFiles/glsl_compiler.dir/src/glsl/main.cpp.o -o glsl_compiler -rdynamic libglsl_optimizer.a libglcpp-library.a libmesa.a libglsl_optimizer.a(standalone_scaffolding.cpp.o): In function _mesa_error_no_memory': standalone_scaffolding.cpp:(.text+0xf): 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 make[2]: *** [glsl_compiler] Error 1 make[2]: Leaving directory /tmp/portage/gfx-tools/glsl-optimizer-9999/work/glsl-optimizer-9999_build' make[1]: *** [CMakeFiles/glsl_compiler.dir/all] Error 2 make[1]: Leaving directory/tmp/portage/gfx-tools/glsl-optimizer-9999/work/glsl-optimizer-9999_build' make: *** [all] Error 2

Looks like the _mesa_error_no_memory function is defined in src/glsl/main.cpp and in src/glsl/standalone_scaffolding.cpp and that causes an error while linking.

Regards, Iegor

iegor avatar Mar 21 '15 21:03 iegor

Same issue on Arch x64.

zet4 avatar Mar 23 '15 15:03 zet4

same error under ubuntu 14 64bit: [ 98%] Building CXX object CMakeFiles/glsl_compiler.dir/src/glsl/main.cpp.o Linking CXX executable glsl_compiler libglsl_optimizer.a(standalone_scaffolding.cpp.o): dans la fonction « _mesa_error_no_memory »: standalone_scaffolding.cpp:(.text+0x5): définitions multiples de « _mesa_error_no_memory » CMakeFiles/glsl_compiler.dir/src/glsl/main.cpp.o:main.cpp:(.text+0x0): défini pour la première fois ici collect2: error: ld returned 1 exit status make[2]: *** [glsl_compiler] Erreur 1 make[1]: *** [CMakeFiles/glsl_compiler.dir/all] Erreur 2 make: *** [all] Erreur 2

ghost avatar Mar 29 '15 14:03 ghost

Same stuff Arch x64

ShreiderWalter avatar Aug 14 '15 17:08 ShreiderWalter

@ShreiderWalter Try this: https://github.com/bkaradzic/bgfx/issues/304#issuecomment-92420314

bkaradzic avatar Aug 14 '15 18:08 bkaradzic

See commit e480701dc39d88eff2aaa5ae03ae1941793a80a1 of open PR #91.

And / or see diff in this issue on the zz85 fork (omit the hacks in glsl_optimizer.cpp) for this and another linux build issue and merge #104 to resolve segfaults / hangs in release builds.

tschw avatar Aug 15 '15 00:08 tschw