2015-04-02 33 views
0

我想在運行Yosemite的Mac OS X上安裝zathura-pdf-poppler-0.2.5。當我嘗試做,我得到以下錯誤:在mac ld上編譯zathura pdf插件錯誤

 
LD pdf.so 
Undefined symbols for architecture x86_64: 
    "_zathura_document_get_data", referenced from: 
     _pdf_page_links_get in links.o 
     _pdf_page_init in page.o 
    "_zathura_document_get_password", referenced from: 
     _pdf_document_open in document.o 
    "_zathura_document_get_path", referenced from: 
     _pdf_document_open in document.o 
    "_zathura_document_information_entry_list_new", referenced from: 
     _pdf_document_get_information in meta.o 
    "_zathura_document_information_entry_new", referenced from: 
     _pdf_document_get_information in meta.o 
    "_zathura_document_set_data", referenced from: 
     _pdf_document_open in document.o 
     _pdf_document_free in document.o 
    "_zathura_document_set_number_of_pages", referenced from: 
     _pdf_document_open in document.o 
    "_zathura_index_element_new", referenced from: 
     _pdf_document_index_generate in index.o 
     _build_index in index.o 
    "_zathura_link_free", referenced from: 
     _pdf_page_links_get in links.o 
    "_zathura_link_new", referenced from: 
     _poppler_link_to_zathura_link in utils.o 
    "_zathura_page_get_document", referenced from: 
     _pdf_page_links_get in links.o 
     _pdf_page_init in page.o 
    "_zathura_page_get_height", referenced from: 
     _pdf_page_links_get in links.o 
     _pdf_page_search_text in search.o 
    "_zathura_page_get_index", referenced from: 
     _pdf_page_init in page.o 
    "_zathura_page_set_data", referenced from: 
     _pdf_page_init in page.o 
    "_zathura_page_set_height", referenced from: 
     _pdf_page_init in page.o 
    "_zathura_page_set_width", referenced from: 
     _pdf_page_init in page.o 
    "_zathura_plugin_add_mimetype", referenced from: 
     _zathura_plugin_register in plugin.o 
    "_zathura_plugin_set_name", referenced from: 
     _zathura_plugin_register in plugin.o 
    "_zathura_plugin_set_register_functions_function", referenced from: 
     _zathura_plugin_register in plugin.o 
ld: symbol(s) not found for architecture x86_64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 
make: *** [pdf.so] Error 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 

有誰知道如何解決這個問題。

非常感謝

+0

你的意思是'zathura-pdf-poppler'?如果是這樣,你是否安裝了依賴項,主要是:'zathura(> = 0.2.0)'? – baf 2015-04-02 13:38:40

+0

是的,我已經安裝了zathera 0.3.2,現在我正在嘗試安裝插件zathura-pdf-poppler(0.2.5),以便我可以查看pdf。 – pdoak 2015-04-02 13:47:32

回答

0

我不知道確切的原因,出現這種情況,但我已經申請從MacPort一個補丁,makefile和config.mk。您可以以明文形式下載它們,並使用patch Makefile < make.diffpatch config.mk < config.diff來應用此修補程序。

patch files

我不得不爲了使迷走星球顯示PDF文件make install後更改/usr/lib/zathura/pdf.dylib/usr/lib/zathura/pdf.so

+0

感謝Ray,我現在已經能夠成功運行make了,但是當我運行sudo make install時,出現錯誤,提示在pkg-config搜索路徑中找不到'xcb-shm'軟件包。但是,我已經運行'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.10'和'xcb-shm'在PKG_CONFIG_PATH中的目錄'/ opt/X11/lib/pkgconfig'中。有任何想法嗎? – pdoak 2015-04-06 12:07:38

+0

'sudo -E make install' -E保持您的環境 – Ray 2015-04-06 15:07:12

+0

謝謝Ray。這工作,但是當我運行zathura以'zathura file.pdf'打開PDF時,我得到以下錯誤信息:'動態會話查找支持但失敗:launchd沒有提供套接字路徑,請驗證org.freedesktop.dbus -session.plist已加載! 錯誤:未知的文件類型:'(null)'' – pdoak 2015-04-06 19:03:12