在俳句上編譯 dictconv

在俳句上編譯 dictconv

我在編譯時遇到問題字典轉換俳句每晚hrev46922。我以前從未嘗試過。

首先它抱怨不知道它是什麼作業系統。所以我按照指示更換了config.subconfig.guess的。再次運行一下,甚至還有更新的,我猜他們從 CVS 轉到了 github。

好的,再運行,這次又說找不到libxml2。所以我使用HaikuDepot來安裝libxml2。

現在我已經安裝了 libxml2 2.8.0-6,但我剛剛意識到 libxml2_x86 已經安裝,版本 2.9.1-1。儘管如此,有兩份,它仍然找不到它:

~/Desktop/dictconv-0.2> ./configure --prefix=/boot/home/Desktop/dictconv-0.2/
[...lots of checking, without errors...]
checking for libxml - version >= 2.5.0... no
*** The xml2-config script installed by LIBXML could not be found
*** If libxml was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the XML2_CONFIG environment variable to the
*** full path to xml2-config.
configure: error: You must have libxml2 >= 2.5.0 installed

嗯,我搜了一下xml2-config,沒有找到。然而,我確實找到了一個名為 的文件/boot/system/data/cmake/Modules/FindLibXml2.cmake,並且碰巧在dictconv的網站上註意到我可以使用 cmake,所以我嘗試了:

~/Desktop/dictconv-0.2/build> cmake ..
CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 2.8)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
XML2_INCLUDE_DIR
   used as include directory in directory /boot/home/Desktop/dictconv-0.2/src
XML2_LIBRARY
    linked by target "dictconv" in directory /boot/home/Desktop/dictconv-0.2/src

-- Configuring incomplete, errors occurred!

最後,我想我應該嘗試讓它使用我找到的文件:

~/Desktop/dictconv-0.2/build> cmake -P /boot/system/data/cmake/Modules/FindLibXml2.cmake ..
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_PREFIXES
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_SUFFIXES
-- Could NOT find LibXml2 (missing:  LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR) 

此時我已經不知所措,但我還是繼續尋找。我看到俳句港這兩個配方文件,但我不確定如何使用它們來最終獲得Linux下的“-devel”類型的包,這就是我認為dictconv腳本configure正在尋找的東西。

幫助?

答案1

我意識到這有點晚了,但您應該只需要安裝 libxml2_devel 套件。

預設情況下,HaikuDepot 中不顯示此內容,因此請在 HaikuDepot 的選單中前往「顯示」選項,然後選擇「開發包」。這應該會列出正確的軟體包,以便您可以安裝它。

此後 xml2-config 應該可以按預期為您工作。

相關內容