我无法编译字典转换在 Haiku nightly hrev46922 上。我以前从未尝试过。
首先,它抱怨不知道操作系统是什么。所以我按照说明更换了config.sub
新config.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 应该可以按预期为您工作。