bochs-2.7 make编译时出错cannot generate system identifier for public text "-//OASIS//DTD DocBook V4.1//EN"

问题错误日志

在使用命令sudo make编译 bochs-2.7 时,遇到以下报错:

make -C doc/docbook
make[1]: Entering directory '/opt/bochs-2.7/doc/docbook'
mkdir -p development
cd development; openjade -t sgml -i html -d /opt/bochs-2.7/doc/docbook/include/docbook-utils.dsl#html    development.dbk
openjade:development.dbk:9:55:W: cannot generate system identifier for public text "-//OASIS//DTD DocBook V4.1//EN"
openjade:development.dbk:15:0:E: reference to entity "BOOK" for which no system identifier could be generated
openjade:development.dbk:9:0: entity was defined here
openjade:development.dbk:15:0:E: DTD did not contain element declaration for document type name
openjade:development.dbk:16:5:E: element "BOOK" undefined
openjade:development.dbk:17:9:E: element "BOOKINFO" undefined
openjade:development.dbk:18:9:E: element "TITLE" undefined
openjade:development.dbk:19:15:E: element "AUTHORGROUP" undefined
openjade:development.dbk:20:10:E: element "AUTHOR" undefined
openjade:development.dbk:20:21:E: element "FIRSTNAME" undefined
openjade:development.dbk:20:47:E: element "SURNAME" undefined
openjade:development.dbk:21:10:E: element "AUTHOR" undefined
openjade:development.dbk:21:21:E: element "FIRSTNAME" undefined
openjade:development.dbk:21:47:E: element "SURNAME" undefined
openjade:development.dbk:22:10:E: element "AUTHOR" undefined
openjade:development.dbk:22:21:E: element "FIRSTNAME" undefined
openjade:development.dbk:22:52:E: element "SURNAME" undefined
openjade:development.dbk:23:10:E: element "EDITOR" undefined
(重复内容就省略了...)
openjade:development.dbk:276:15:E: element "TITLE" undefined
openjade:development.dbk:277:5:E: element "PARA" undefined
openjade:I: maximum number of errors (200) reached; change with -E option
openjade:/usr/share/sgml/docbook/stylesheet/dsssl/modular/html/../common/dbtable.dsl:224:13:E: 2nd argument for primitive "ancestor" of wrong type: "#node-list()" not a singleton node list
make[1]: *** [Makefile:61: development/index.html] Error 1
make[1]: Leaving directory '/opt/bochs-2.7/doc/docbook'
make: *** [Makefile:452: build_docbook] Error 2

灵光一闪

在官方文档 Bochs User Manual 3.4. Compiling Bochs 看到一个参数:

Option Default Comments
--enable-docbook detected Build the docbook documentation in doc/docbook. The configure script will enable this option automatically if you have a program called docbook2html installed.

然后,我又看了一下我以前安装bochs-2.7成功的Ubuntu 20.04系统发现输入命令 openjade -v 时找不到该命令。

解决方案

所以我的解决方案就是删除 openjade,然后就不会执行 build-docbook 任务了。

sudo apt purge openjade

为什么删除的是 openjade

首先,/opt/bochs-2.7/Makefile 文件中,命令 build-docbook 如下:

对应报错日志中的 make -C doc/docbook

然后,就看 /opt/bochs-2.7/doc/docbook/Makefile,先看任务 all:

再看变量 SECTION_HTML,如下图所示:

需要触发三个任务 user/index.html,documentation/index.html,development/index.html,如下图所示:

对应报错日志中的

mkdir -p development
cd development; openjade -t sgml -i html -d /opt/bochs-2.7/doc/docbook/include/docbook-utils.dsl#html    development.dbk

如果变量 DOCBOOK2HTML 不存在,自然就不用执行了,也就不会报错了:

然后,我就考虑把 openjade 删除了,这样就可以跳过这个错误了~当然,我主要就是不想解决这个错误了,如果有人知道不删除 openjade 的解决方法,可以给我评论并附上博客链接。

posted @ 2022-10-20 19:59  极客子羽  阅读(162)  评论(0编辑  收藏  举报