-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
求助:关于编译libjxl的问题~ #14
Comments
libjxl/libjxl#995 libjxl本身只使用std::thread并不依赖pthread,但是它的cmake编译脚本里有些hack会强制链接pthread |
按照您说的方法,加上下面这2句,不过还是不行,运行mpv.exe报错信息和之前一样,缺少libwinpthread-1.dll和libgcc_s_seh-1.dll。
|
先别管mpv,编译下libjxl那些cjxl djxl之类的工具看看会不会依赖winpthread |
编译libjxl时的log
|
把pthread.h删了行不行?或者干脆就像vapoursynth那样用msvc编译得了
eko5624 ***@***.***> 于 2022年5月9日周一 18:42写道:
… 编译libjxl时的log
-- The C compiler identification is GNU 12.1.1
-- The CXX compiler identification is GNU 12.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/ucrt64/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/ucrt64/bin/g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_SYSTEM_PROCESSOR is AMD64
-- Performing Test CXX_FUZZERS_SUPPORTED
-- Performing Test CXX_FUZZERS_SUPPORTED - Failed
-- Performing Test CXX_CONSTRUCTOR_ALIASES_SUPPORTED
-- Performing Test CXX_CONSTRUCTOR_ALIASES_SUPPORTED - Failed
-- Performing Test CXX_MACRO_PREFIX_MAP
-- Performing Test CXX_MACRO_PREFIX_MAP - Success
-- Performing Test CXX_NO_RTTI_SUPPORTED
-- Performing Test CXX_NO_RTTI_SUPPORTED - Success
-- Found PkgConfig: D:/msys64/usr/bin/pkg-config.exe (found version "1.8.0")
-- Compiled IDs C:GNU, C++:GNU
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Performing Test ATOMICS_LOCK_FREE_INSTRUCTIONS
-- Performing Test ATOMICS_LOCK_FREE_INSTRUCTIONS - Success
-- Found HWY: D:/msys64/opt/lib/libhwy.a (found suitable version "0.16.0", minimum required is "0.15.0")
-- Checking for module 'libbrotlicommon'
-- Package 'libbrotlicommon', required by 'virtual:world', not found
-- Checking for module 'libbrotlienc'
-- Package 'libbrotlienc', required by 'virtual:world', not found
-- Checking for module 'libbrotlidec'
-- Package 'libbrotlidec', required by 'virtual:world', not found
-- Found Brotli: D:/msys64/opt/include
-- Found LCMS2: D:/msys64/opt/lib/liblcms2.a (found suitable version "2.13", minimum required is "2.13")
-- Found ZLIB: D:/msys64/opt/lib/libz.a (found version "1.2.12")
-- Found PNG: D:/msys64/opt/lib/libpng.a (found version "1.6.38.git")
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR) (Required is at least version "5.1")
-- Found JPEG: D:/msys64/opt/lib/libjpeg.a (found version "62")
-- Checking for module 'OpenEXR'
-- Package 'OpenEXR', required by 'virtual:world', not found
-- Building with JPEGXL_VERSION=ff65c387 (auto-updated)
-- Building tools:
-- Configuring done
-- Generating done
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKH7M7JCE7KAQLJCIEDDLLVJDTXXANCNFSM5VKQ6SBQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
删了toolchain里的pthread.h后还不行,log如下,只能尝试别的法子了。
|
等等,如果是这样那你得先确认问题的确出在libjxl上,看这log它确实没使用pthread |
你帮我看一下我写的libjxl那个PKGBUILD是不是写的不对。因为加入了好几件组件的编译。比如brotli highway lcms libjpeg libpng zlib这些。 因为不知道哪些组件是libjxl必须的,所以我按照shinchiro的代码把以上几个都加进去了,也极有可能是以上几个组件的依赖问题。 |
visual studio打开cmake生成的工程文件后不是可以自己指定编译啥的麽,还有图形化的cmake-gui |
@nyfair |
如果这是这个,建议检查下使用的各种三方补丁里有没有什么奇奇怪怪的cflags和ldflags |
@nyfair 我贴出libjxl的编译代码,您帮我看一下是哪里的问题。
下面是ffmpeg的编译代码
|
其实看不太懂,单纯给点建议
brotli早就不是什么数据压缩业界的版本答案了,明年又会有新的一波人拿h.266/zstd或者其他什么新玩具搞新格式 |
@nyfair
需要用到 libbrotlicommon libbrotlienc libbrotlidec这三个文件。可是编译libjxl时产生的lib文件夹里并没有这3个文件的影子。所以单独把brotli摘出来编译的。 |
@nyfair 问题解决了,只需在编译ffmpeg的PKGBUILD里加一句--extra-ldflags="-static -static-libgcc -static-libstdc++"就行了。 |
不好意思又来麻烦您了,您对我的帮助真的很大了,谢谢~
我参考shinchiro的代码试着自己编译libjxl,也成功了。不过运行mpv时会提示缺少libwinpthread-1.dll和libgcc_s_seh-1.dll这两个文件。我把toolchain里的这2个文件复制到mpv.exe所在的目录就能成功运行了。
怎么才能解决对这2个dll文件的依赖呢。我在csdn上搜索得到一个答案是这样,加一句:
关键是这一句要加在何处呢?怎么才能验证这一句是否起作用呢?我不懂编程,就是想通过编译mpv来学一些东西,以点带面。
这个问题困扰我好几天了,因为确实不知道怎么解决,所以特来求助,先谢谢了!
附仓库地址:
https://github.com/eko5624/mpv-win64/tree/test-libjxl
The text was updated successfully, but these errors were encountered: