我在 cmake 文件中设置了以下内容:
set(STACK_PROTECTOR_SUPPORTED 0)
set(FORTIFY_SOURCE_SUPPORTED 0)
然而,ffmpeg 配置此时失败:(来自配置日志)
...
...
rnx/development_exp_all/winbuilds/lib -o /tmp/ffconf.sp6O6kif/test.exe /tmp/ffconf.sp6O6kif/test.o -lopus -lm
/usr/lib64/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld: \
/home/rnx/development_exp_all/winbuilds/lib/libopus.a(PLC.c.obj):PLC.c:(.text+0x2ff): undefined reference to `__memcpy_chk'
/usr/lib64/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld: \
/home/rnx/development_exp_all/winbuilds/lib/libopus.a(bands.c.obj):bands.c:(.text+0x506e): undefined reference to `__memcpy_chk'
/usr/lib64/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld: \
/home/rnx/development_exp_all/winbuilds/lib/libopus.a(decode_core.c.obj):decode_core.c:(.text+0x284): undefined reference to `__memcpy_chk'
显示的错误是
ERROR: opus not found using pkg-config
但这并不是因为 pkg-config 找不到它。
$ pkg-config --list-all
opus Opus - Opus IETF audio codec ( build)
x264 x264 - H.264 (MPEG4 AVC) encoder library
x265 x265 - H.265/HEVC video encoder
aom aom - Alliance for Open Media AV1 codec library v3.7.0-577-gfb09b4c854.
我认为错误是由于undefined reference to __memcpy_chk'
如何设置 cmake 以避免此错误