NTP编译报错 Error in template /usr/local/share/autogen/cmd-doc.tlib, line 219

调试 ntp-4.2.8p7 源码,编译报错

cd /ntpd/sntp && env PATH="/prj/ntpd/__build/obj/sntp:/opt/gcc-4.4.7-gnu/bin/:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin" AUTOGEN_DNE_DATE=-D autogen -L include -L ag-tpl --writable -DMAN_SECTION=1sntpmdoc -Tagmdoc-cmd.tpl sntp-opts.def
Error in template /usr/local/share/autogen/cmd-doc.tlib, line 219
DEFINITIONS ERROR in /usr/local/share/autogen/cmd-doc.tlib line 219 for sntp-opts.mdoc:
Cannot locate converter for mdoc
Failing Guile command: = = = = =
(define sec-type (string-upcase (get “ds-type”)))
(define sec-name (name-to-fname sec-type))
(define cvt-fn (find-file (string-append
(get “ds-format” “man”) “2mdoc”)))
(if (not (defined? 'cvt-fn))
(error (sprintf “Cannot locate converter for %s”
(get “ds-format” “man”))))
(define sec-file (string-append tmp-dir “/SEC/” sec-name))
(access? sec-file R_OK)
=================================

参考解决方案-Google 网上论坛

I'm cross-compiling ntp-4.2.8p10 for aarch64 using Debian as the build machine. I can build it fine with the native compiler, but using the ARM cross-compiler I get this:

8<-----------8<------------8<
make[4]: Leaving directory '/home/asmith/xds/rootfs85-arm/sandbox/ntp/xbuild/sntp/libopts'
make[4]: Entering directory '/home/asmith/xds/rootfs85-arm/sandbox/ntp/xbuild/sntp'
cd /home/asmith/xds/rootfs85-arm/sandbox/ntp/sntp &&        env PATH="/home/asmith/xds/rootfs85-arm/sandbox/ntp/xbuild/sntp:/home/asmith/bin:/home/asmith/xds/toolchain-16.3.0.0/bin:/home/asmith/xds/rootfs85-arm/sandbox/xds-scripts/:/home/asmith/bin:/home/asmith/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/lib/jvm/java-6-sun-1.6.0.03/bin:/usr/NX/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/lib/jvm/java-6-sun-1.6.0.03/bin:/usr/NX/bin" AUTOGEN_DNE_DATE=-D autogen -L include -L ag-tpl --writable -DMAN_SECTION=1sntpmdoc -Tagmdoc-cmd.tpl sntp-opts.def
Error in template /usr/share/autogen/cmd-doc.tlib, line 219
        DEFINITIONS ERROR in /usr/share/autogen/cmd-doc.tlib line 219 for sntp-opts.mdoc:
        Cannot locate converter for mdoc
Failing Guile command:  = = = = =

(define sec-type (string-upcase (get "ds-type")))
    (define sec-name (name-to-fname sec-type))
    (define cvt-fn (find-file (string-append
         (get "ds-format" "man") "2mdoc")))
    (if (not (defined? 'cvt-fn))
        (error (sprintf "Cannot locate converter for %s"
               (get "ds-format" "man"))))

    (define sec-file (string-append tmp-dir "/SEC/" sec-name))
    (access? sec-file R_OK)

=================================
Makefile:1580: recipe for target '/home/asmith/xds/rootfs85-arm/sandbox/ntp/sntp/sntp.1sntpmdoc' failed
make[4]: *** [/home/asmith/xds/rootfs85-arm/sandbox/ntp/sntp/sntp.1sntpmdoc] Error 2
make[4]: Leaving directory '/home/asmith/xds/rootfs85-arm/sandbox/ntp/xbuild/sntp'
Makefile:1051: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/asmith/xds/rootfs85-arm/sandbox/ntp/xbuild/sntp'
Makefile:679: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/asmith/xds/rootfs85-arm/sandbox/ntp/xbuild/sntp'
Makefile:666: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/asmith/xds/rootfs85-arm/sandbox/ntp/xbuild'
Makefile:598: recipe for target 'all' failed
make: *** [all] Error 2
Failed
8<-----------8<------------8<

Since it works for the native build, I'm wondering what I could be missing in building for ARM64. I can get past this error by commenting the mdoc portions of sntp-opts.def and the other def files that fail after doing so, but I'm not happy with that kind of hack.

I've used this ARM64 toolchain to build many other projects successfully.  Any help appreciated,

--
@@ron
$ autogen --version
autogen (GNU AutoGen) 5.18.12

$ aarch64-bcm-linux-gnueabi-gcc --version
aarch64-bcm-linux-gnueabi-gcc (crosstool-NG crosstool-ng-1.23.0) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

主要参考下面这句话解决的,但是不清除./bootstrap 这个命令有什么作用。。😟

Resolved by running ./bootstrap in top-level directory of pristine source.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值