“Wrong libjpeg version in zathura develop branch.”

huangapple go评论42阅读模式
英文:

Wrong libjpeg version in zathura develop branch

问题

这是关于Zathura在ArchLinux上使用时出现问题的信息。问题是Zathura开发分支需要libjpeg9来正确渲染PDF中的JPEG图像。用户尝试手动安装libjpeg9,但Zathura仍然需要“libjpeg.so.8”来运行。他们手动将“libjpeg.so.8”链接到“libjpeg.so.9”,但仍然遇到错误。最后,他们不确定是配置Zathura时出现了问题,还是Zathura的共享库管理存在问题。

如果需要进一步帮助或解决此问题,请提供更多上下文。

英文:

Version:

$ zathura --version
zathura 0.5.2
girara 0.3.7 (runtime: 0.3.9)
(plugin) pdf-mupdf (0.4.0) (/usr/lib/zathura/libpdf-mupdf.so)

I'm using ArchLinux and Zathura-develop. However, Zathura of develop branch requires libjpeg9 to render jpeg in PDF correctly. When I open a PDF file with zathura in terminal , all JPG pictures are rendered black and zathura says:

$ zathura -l debug file.pdf
debug: ../girara/template.c:311: base_changed(): Variable 'session' not set.
debug: ../zathura/plugin.c:279: register_plugin(): plugin: filetype mapping added: application/pdf
debug: ../zathura/plugin.c:279: register_plugin(): plugin: filetype mapping added: application/oxps
debug: ../zathura/plugin.c:279: register_plugin(): plugin: filetype mapping added: application/epub+zip
debug: ../zathura/plugin.c:279: register_plugin(): plugin: filetype mapping added: application/x-fictionbook+xml
debug: ../zathura/plugin.c:279: register_plugin(): plugin: filetype mapping added: application/xml
debug: ../zathura/plugin.c:173: load_plugin(): Successfully loaded plugin from '/usr/lib/zathura/libpdf-mupdf.so'.
debug: ../zathura/plugin.c:174: load_plugin(): plugin pdf-mupdf: version 0.4.0
debug: ../girara/config.c:373: girara_config_parse(): reading configuration file '/etc/xdg/zathurarc'
debug: ../girara/config.c:270: config_parse(): failed to open config file '/etc/xdg/zathurarc'
debug: ../girara/config.c:373: girara_config_parse(): reading configuration file '/etc/zathurarc'
debug: ../girara/config.c:270: config_parse(): failed to open config file '/etc/zathurarc'
debug: ../girara/config.c:373: girara_config_parse(): reading configuration file '/home/rqdmap/.config/zathura/zathurarc'
debug: ../zathura/zathura.c:447: zathura_init(): Sandbox deactivated.
debug: ../girara/session.c:935: girara_set_window_icon(): Loading window icon with name: org.pwmt.zathura
debug: ../zathura/zathura.c:374: init_database(): Using plain database backend.
debug: ../zathura/zathura.c:203: zathura_update_view_ppi(): monitor width: 673 mm, pixels: 2560, ppi: 96.62
debug: ../zathura/zathura.c:203: zathura_update_view_ppi(): monitor width: 673 mm, pixels: 2560, ppi: 96.62
debug: ../zathura/dbus-interface.c:105: bus_acquired(): Bus acquired at 'org.pwmt.zathura.PID-8086'.
debug: ../zathura/zathura.c:203: zathura_update_view_ppi(): monitor width: 673 mm, pixels: 2560, ppi: 96.62
debug: ../zathura/dbus-interface.c:132: name_acquired(): Acquired 'org.pwmt.zathura.PID-8086' on session bus.
debug: ../zathura/content-type.c:72: guess_type_magic(): magic detected filetype: application/pdf
debug: ../zathura/file-monitor.c:126: zathura_filemonitor_new(): using glib file monitor
debug: ../zathura/zathura.c:1177: document_open(): starting file monitor
debug: ../zathura/zathura.c:686: setup_renderer(): starting renderer with cache size 15
debug: ../zathura/zathura.c:203: zathura_update_view_ppi(): monitor width: 673 mm, pixels: 2560, ppi: 96.62
debug: ../zathura/render.c:923: render_all(): Queuing resize for page 0 to 574 x 766 (595.28 x 793.70).
debug: ../zathura/render.c:923: render_all(): Queuing resize for page 1 to 574 x 766 (595.28 x 793.70).
debug: ../zathura/render.c:923: render_all(): Queuing resize for page 2 to 574 x 766 (595.28 x 793.70).
debug: ../zathura/render.c:923: render_all(): Queuing resize for page 3 to 574 x 766 (595.28 x 793.70).
debug: ../zathura/render.c:923: render_all(): Queuing resize for page 4 to 574 x 766 (595.28 x 793.70).
debug: ../zathura/render.c:923: render_all(): Queuing resize for page 5 to 574 x 766 (595.28 x 793.70).
debug: ../zathura/render.c:923: render_all(): Queuing resize for page 6 to 574 x 766 (595.28 x 793.70).
debug: ../zathura/render.c:923: render_all(): Queuing resize for page 7 to 574 x 766 (595.28 x 793.70).
debug: ../zathura/render.c:923: render_all(): Queuing resize for page 8 to 574 x 766 (595.28 x 793.70).
debug: ../zathura/callbacks.c:235: cb_widget_screen_changed(): called
debug: ../zathura/zathura.c:1305: document_open(): Failed to load bookmarks.
debug: ../zathura/jumplist.c:160: zathura_jumplist_load(): No jumplist for this file in the database yet
debug: ../zathura/render.c:971: page_cache_is_cached(): Page 1 is a cache miss
debug: ../zathura/render.c:1070: zathura_renderer_page_cache_add(): Page 1 is cached at cache index 0
debug: ../zathura/render.c:971: page_cache_is_cached(): Page 2 is a cache miss
debug: ../zathura/render.c:1070: zathura_renderer_page_cache_add(): Page 2 is cached at cache index 1
debug: ../zathura/render.c:971: page_cache_is_cached(): Page 3 is a cache miss
debug: ../zathura/render.c:1070: zathura_renderer_page_cache_add(): Page 3 is cached at cache index 2
debug: ../zathura/render.c:896: render_job(): Rendering page 3 ...
debug: ../zathura/render.c:896: render_job(): Rendering page 2 ...
debug: ../zathura/render.c:519: emit_completed_signal(): Emitting signal for page 3
debug: ../zathura/render.c:896: render_job(): Rendering page 1 ...
debug: ../zathura/render.c:519: emit_completed_signal(): Emitting signal for page 2
error: jpeg error: Wrong JPEG library version: library is 80, caller expects 90
warning: read error; treating as end of file
warning: padding truncated image
error: jpeg error: Wrong JPEG library version: library is 80, caller expects 90
warning: read error; treating as end of file
warning: padding truncated image
debug: ../zathura/render.c:519: emit_completed_signal(): Emitting signal for page 1

The latest libjpeg package in archlinux is libjpeg8, so I uninstalled libjpeg8 and installed libjpeg9 manually. But somehow zathura needs exactly "libjpeg.so.8" to launch:

$ zathura
zathura: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory

So I linked libjpeg.so.8 to libjpeg.so.9 manually. But zathura throwed error again:

$ zathura
zathura: /usr/lib/libjpeg.so.8: version `LIBJPEG_8.0' not found (required by /usr/lib/libgdk_pixbuf-2.0.so.0)
zathura: /usr/lib/libjpeg.so.8: version `LIBJPEG_8.0' not found (required by /usr/lib/libtiff.so.6)

Now I have no ideas how to fix it. I wonder whether it's my fault of configuring zathura incorrectly or it's something wrong in zathura's shared-library management.

答案1

得分: 0

经过在互联网上的搜索,我发现类似的问题在 archlinux 论坛中早就讨论过:zathura 更新后出现 jpeg 库错误FS#34590 - [mupdf] mupdf-1.2 使用错误的 libjpeg 头文件构建

如上所述,mupdf 使用的 libjpeg 头文件将 libjpeg 版本设置为 90,而 archlinux 提供的 libjpeg 库(libjpeg-turbo) 只支持版本 80。

最终,我选择简单地从 AUR 安装 zathura-gitzathura-pdf-mupdf-git。这些软件包已经正确解决了问题,并适用于 archlinux。因为这实际上是 zathura 在 archlinux 上的一个“BUG”,所以最好使用 AUR 软件包而不是源代码来安装它。

英文:

After searching through the Internet, I found similar problems had been discussed in archlinux forums long ago:
zathura jpeg library error after update and FS#34590 - [mupdf] mupdf-1.2 is building with the wrong libjpeg header

As discussed above, the libjpeg header which mupdf builds with sets the libjpeg version to 90; while the libjpeg library(libjpeg-turbo) which archlinux ships only support version 80.

Finally I choose to simply install zathura-git and zathura-pdf-mupdf-git from AUR. These packages have solved the problem properly and fit for archlinux. Since it's somewhat a "BUG" of zathura exactly on archlinux, it's better to install it by AUR packages instead of by source.

huangapple
  • 本文由 发表于 2023年2月16日 16:08:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/75469379.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定