【问题标题】:Compiling zathura pdf plugin on mac ld error在mac ld错误上编译zathura pdf插件
【发布时间】:2015-04-06 01:39:14
【问题描述】:

我正在尝试在运行 Yosemite 的 Mac OS X 上安装 zathura-pdf-poppler-0.2.5。当我尝试制作时,我收到以下错误:

LD pdf.so 架构 x86_64 的未定义符号: “_zathura_document_get_data”,引用自: _pdf_page_links_get in links.o page.o 中的 _pdf_page_init “_zathura_document_get_password”,引用自: _pdf_document_open 在 document.o 中 “_zathura_document_get_path”,引用自: _pdf_document_open 在 document.o 中 “_zathura_document_information_entry_list_new”,引用自: meta.o 中的_pdf_document_get_information “_zathura_document_information_entry_new”,引用自: meta.o 中的_pdf_document_get_information “_zathura_document_set_data”,引用自: _pdf_document_open 在 document.o 中 _pdf_document_free 在 document.o “_zathura_document_set_number_of_pages”,引用自: _pdf_document_open 在 document.o 中 “_zathura_index_element_new”,引用自: index.o 中的 _pdf_document_index_generate index.o 中的 _build_index “_zathura_link_free”,引用自: _pdf_page_links_get in links.o “_zathura_link_new”,引用自: utils.o 中的 _poppler_link_to_zathura_link “_zathura_page_get_document”,引用自: _pdf_page_links_get in links.o page.o 中的 _pdf_page_init “_zathura_page_get_height”,引用自: _pdf_page_links_get in links.o search.o 中的_pdf_page_search_text “_zathura_page_get_index”,引用自: page.o 中的 _pdf_page_init “_zathura_page_set_data”,引用自: page.o 中的 _pdf_page_init “_zathura_page_set_height”,引用自: page.o 中的 _pdf_page_init “_zathura_page_set_width”,引用自: page.o 中的 _pdf_page_init “_zathura_plugin_add_mimetype”,引用自: _zathura_plugin_register 在 plugin.o “_zathura_plugin_set_name”,引用自: _zathura_plugin_register 在 plugin.o “_zathura_plugin_set_register_functions_function”,引用自: _zathura_plugin_register 在 plugin.o ld:未找到架构 x86_64 的符号 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用) 制作:*** [pdf.so] 错误 1

我在 $PKG_CONFIG_PATH 中设置了以下路径:

/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig:/usr/local/Cellar/zlib/1.2.8/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.10

有谁知道如何解决这个问题。

非常感谢

【问题讨论】:

  • 你的意思是zathura-pdf-poppler?如果有,是否安装了依赖,主要是:zathura (>= 0.2.0)?
  • 是的,我已经安装了 zathera 0.3.2,现在我正在尝试安装插件 zathura-pdf-poppler(0.2.5) 以便我可以查看 pdf。

标签: c++ macos pdf linker osx-yosemite


【解决方案1】:

我不知道发生这种情况的确切原因,但我已经为 MacPort 的 makefile 和 config.mk 应用了一个补丁。您可以以纯文本格式下载它们并使用patch Makefile < make.diffpatch config.mk < config.diff 来应用补丁。

patch files

我必须在make install 之后将/usr/lib/zathura/pdf.dylib 更改为/usr/lib/zathura/pdf.so 以使zathura 显示pdf 文件。

【讨论】:

  • 感谢 Ray,我现在已经能够成功运行 make,但是当我运行 sudo make install 时,我收到一条错误消息,指出在 pkg-config 搜索路径中找不到包 xcb-shm。但是,我在 PKG_CONFIG_PATH 中的目录/opt/X11/lib/pkgconfig 中运行了export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig:/usr/local/Cellar/zlib/1.2.8/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.10xcb-shm。有什么想法吗?
  • sudo -E make install -E 保留您的环境
  • 谢谢雷。这行得通,但是当我运行 zathura 打开支持 zathura file.pdf``, I get the following error message: Dynamic 会话查找但失败的 pdf 时:launchd 没有提供套接字路径,请验证 org.freedesktop.dbus-session.plist 是否已加载!错误:未知文件类型:'(null)'`
  • 我将org.freedesktop.dbus-session.plist 移动到/Library/LaunchAgents/ 并运行launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist。现在 zathura file-pdf.pdf 启动 X11 没有错误,但它不显示窗口或 pdf。
  • 你试过把/usr/lib/zathura/pdf.dylib改成/usr/lib/zathura/pdf.so
猜你喜欢
  • 2011-10-02
  • 2013-03-25
  • 1970-01-01
  • 2016-03-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-04-26
  • 1970-01-01
相关资源
最近更新 更多