opus
opus copied to clipboard
undefined reference to `__stack_chk_guard'
Operating system: windows 10 Compiler: C:/Qt/Qt5.12.4/Tools/mingw730_32/bin/i686-w64-mingw32-gcc.exe Compiler versoin: 7.3.0 opus version: 1.3.1
cmake .. -DCMAKE_INSTALL_PREFIX=/d/Source/RabbitIm/ThirdLibrary/build_script/../windows_mingw730_x86_qt5.12.4_Release -DCMAKE_BUILD_TYPE=Release -G"MSYS Makefiles" -DBUILD_SHARED_LIBS=ON -DCMAKE_TOOLCHAIN_FILE=/d/Source/RabbitIm/ThirdLibrary/build_script/../windows_mingw730_x86_qt5.12.4_Release/../build_script/cmake/platforms/toolchain-mingw.cmake
The error information:
D:/Source/RabbitIm/ThirdLibrary/src/libopus/celt/float_cast.h:130:10: warning: #warning "Replacing these functions with a standard C cast." [-Wcpp]
#warning "Replacing these functions with a standard C cast."
^~~~~~~
[100%] Linking C shared library libopus.dll
CMakeFiles/opus.dir/objects.a(opus_decoder.c.obj):opus_decoder.c:(.text+0x34): undefined reference to __stack_chk_guard' CMakeFiles/opus.dir/objects.a(opus_decoder.c.obj):opus_decoder.c:(.text+0x3a2): undefined reference to
__stack_chk_guard'
CMakeFiles/opus.dir/objects.a(opus_decoder.c.obj):opus_decoder.c:(.text+0x111b): undefined reference to __stack_chk_fail' CMakeFiles/opus.dir/objects.a(opus_decoder.c.obj):opus_decoder.c:(.text+0x125c): undefined reference to
__stack_chk_guard'
CMakeFiles/opus.dir/objects.a(opus_decoder.c.obj):opus_decoder.c:(.text+0x1274): undefined reference to __stack_chk_guard' CMakeFiles/opus.dir/objects.a(opus_decoder.c.obj):opus_decoder.c:(.text+0x12b3): undefined reference to
__stack_chk_fail'
[KangLin]
[100%] Linking C shared library libopus.dll CMakeFiles/opus.dir/objects.a(opus_decoder.c.obj):opus_decoder.c:(.text+0x34): undefined reference to
__stack_chk_guard' CMakeFiles/opus.dir/objects.a(opus_decoder.c.obj):opus_decoder.c:(.text+0x3a2): undefined reference to
__stack_chk_guard' CMakeFiles/opus.dir/objects.a(opus_decoder.c.obj):opus_decoder.c:(.text+0x111b): undefined reference to__stack_chk_fail' CMakeFiles/opus.dir/objects.a(opus_decoder.c.obj):opus_decoder.c:(.text+0x125c): undefined reference to
__stack_chk_guard' CMakeFiles/opus.dir/objects.a(opus_decoder.c.obj):opus_decoder.c:(.text+0x1274): undefined reference to__stack_chk_guard' CMakeFiles/opus.dir/objects.a(opus_decoder.c.obj):opus_decoder.c:(.text+0x12b3): undefined reference to
__stack_chk_fail'
According to <URL:https://stackoverflow.com/questions/27290086/gcc-canaries-undefined-reference-to-stack-chk-guard > these are related to the stack protector option for gcc. I guess either you need to turn off that option, or define the two requested global symbols.
-- Happy hacking Petter Reinholdtsen
Yes, disable it is ok.
Yes, disable it is ok. What commands did you run to disable it?
https://github.com/xiph/opus/commit/b83dd52868326a401c8578041e3dbea439d53f11 should have fixed this.