1

我知道我需要 zlib、libpng、libjpeg-turbo 和 yasm。

我已经成功构建并正确安装(希望如此),因为当我尝试在 Makefile 中使用以下配置“制作”libbpg 时:

# Enable compilation of Javascript decoder with Emscripten
#USE_EMCC=y
# Enable x265 for the encoder
USE_X265=y
# Enable the JCTVC code (best quality but slow) for the encoder
USE_JCTVC=y
# Compile bpgview (SDL and SDL_image libraries needed)
#USE_BPGVIEW=y
# Enable it to use bit depths > 12 (need more tests to validate encoder)
USE_JCTVC_HIGH_BIT_DEPTH=y
# Enable the cross compilation for Windows
CONFIG_WIN32=y
# Enable for compilation on MacOS X
#CONFIG_APPLE=y

在构建“bpgdec.exe”和 H265 编码器时,我没有在终端输出中看到任何严重错误。

但是,当涉及到 jctvc 时,我收到了一个很大的错误消息(大部分几乎是重复的)

......
x86_64-w64-mingw32-g++ -g -Wl,--gc-sections -o bpgenc.exe bpgenc.o x265_glue.o x265.out/8bit/libx265.a x265.out/10bit/libx265.a x265.out/12bit/libx265.a jctvc_glue.o jctvc/libjctvc.a  -lpng -ljpeg -lz
/usr/bin/x86_64-w64-mingw32-ld: jctvc/libjctvc.a(TAppEncCfg.o): in function `OptionBase':
(somewhere)/libbpg-0.9.8/jctvc/program_options_lite.h:81: undefined reference to `__gxx_personality_sj0'
/usr/bin/x86_64-w64-mingw32-ld: (somewhere)/libbpg-0.9.8/jctvc/program_options_lite.h:81: undefined reference to `_Unwind_SjLj_Register'
/usr/bin/x86_64-w64-mingw32-ld: (somewhere)/libbpg-0.9.8/jctvc/program_options_lite.h:82: undefined reference to `_Unwind_SjLj_Unregister'
/usr/bin/x86_64-w64-mingw32-ld: jctvc/libjctvc.a(TAppEncCfg.o):/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/include/c++/ext/new_allocator.h:86: undefined reference to `_Unwind_SjLj_Resume'
/usr/bin/x86_64-w64-mingw32-ld: jctvc/libjctvc.a(TAppEncCfg.o): in function `ParseFailure':
(somewhere)/libbpg-0.9.8/jctvc/program_options_lite.h:54: undefined reference to `__gxx_personality_sj0'
/usr/bin/x86_64-w64-mingw32-ld: (somewhere)/libbpg-0.9.8/jctvc/program_options_lite.h:54: undefined reference to `_Unwind_SjLj_Register'
/usr/bin/x86_64-w64-mingw32-ld: (somewhere)/libbpg-0.9.8/jctvc/program_options_lite.h:55: undefined reference to `_Unwind_SjLj_Unregister'
/usr/bin/x86_64-w64-mingw32-ld: (somewhere)/libbpg-0.9.8/jctvc/program_options_lite.h:55: undefined reference to `_Unwind_SjLj_Resume'
/usr/bin/x86_64-w64-mingw32-ld: jctvc/libjctvc.a(TAppEncCfg.o): in function `df::program_options_lite::Option<double>::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
(somewhere)/libbpg-0.9.8/jctvc/program_options_lite.h:118: undefined reference to `__gxx_personality_sj0'
/usr/bin/x86_64-w64-mingw32-ld: (somewhere)/libbpg-0.9.8/jctvc/program_options_lite.h:118: undefined reference to `_Unwind_SjLj_Register'
/usr/bin/x86_64-w64-mingw32-ld: (somewhere)/libbpg-0.9.8/jctvc/program_options_lite.h:120: undefined reference to `_Unwind_SjLj_Unregister'
/usr/bin/x86_64-w64-mingw32-ld: (somewhere)/libbpg-0.9.8/jctvc/program_options_lite.h:120: undefined reference to `_Unwind_SjLj_Resume'
/usr/bin/x86_64-w64-mingw32-ld: jctvc/libjctvc.a(TAppEncCfg.o): in function `df::program_options_lite::Option<bool>::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
......
collect2: error: ld returned 1 exit status
make: *** [Makefile:197:bpgenc.exe] errorcode 1

(举个例子)

我注意到 linux 上的 Mingw-w64 使用的是 gcc 版本,其异常处理是 dw2 而不是 sjlj,根据上面的输出,这是 jctvc 所必需的。

我试图将 libgcc_s_sjlj_1.dll 移动到 /usr/x86_64-w64-mingw32/bin 和 /usr/x86_64-w64-mingw32/lib,但它不起作用。

我知道gcc可以配置启用sjlj,但这意味着我必须修改mingw-w64,这是我不敢的。

我的环境:在“apt update&&apt upgrade”之后新安装的 debian 10。所有最新的 zlib、libjpeg-turbo、libpng、mingw-w64、libbpg 源代码。

所以我想知道是否有人知道在 libbpg 中编译 jctvc 的正确方法。非常感谢。

4

0 回答 0