CC_FOR_BUILD 宏定义问题
admin
2023-02-19 21:20:42
0

说明

        编译indent-2.2.12出错

/indent-2.2.12/man'
o texinfo2man ./texinfo2man.c
make[2]: o: Command not found
make[2]: [Makefile:546: texinfo2man] Error 127 (ignored)
./texinfo2man ./indent.1.in ./../doc/indent.texi > indent.1
/bin/sh: ./texinfo2man: No such file or directory
make[2]: *** [Makefile:549: indent.1] Error 127
make[2]: Leaving directory '/3thrdparty/indent-2.2.12/man'
make[1]: *** [Makefile:455: all-recursive] Error 1
make[1]: Leaving directory '/3thrdparty/indent-2.2.12'
make: *** [Makefile:393: all] Error 2


排查man/Makefile编译文件

$(CC_FOR_BUILD) -o $@ ${srcdir}/texinfo2man.c

无法识别CC_FOR_BUILD

解决该问题,可以通过修改宏定义

$(CC) -o $@ ${srcdir}/texinfo2man.c


引申

autoconf cached variables (CC_FOR_BUILD),搜索autoconf脚本没有搜索到任何的信息


文件夹目录下config/config.guess中对CC_FOR_BUILD进行了详细的说明

# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
# headache to deal with in a portable fashion.

# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.


在其他的开源中定义了该宏定义

secp256k1/build-aux/m4/ax_prog_cc_for_build.m4

This macro searches for a C compiler that generates native executables,
#   that is a C compiler that surely is not a cross-compiler. This can be
#   useful if you have to generate source code at compile-time like for
#   example GCC does.
#
#   The macro sets the CC_FOR_BUILD and CPP_FOR_BUILD macros to anything
#   needed to compile or link (CC_FOR_BUILD) and preprocess (CPP_FOR_BUILD).
#   The value of these variables can be overridden by the user by specifying
#   a compiler with an environment variable (like you do for standard CC).



config.guess这里对宏定义进行了赋值

set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
 ,,)    echo "int x;" > $dummy.c ;
 for c in cc gcc c89 c99 ; do
   if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
      CC_FOR_BUILD="$c"; break ;
   fi ;
 done ;
 if test x"$CC_FOR_BUILD" = x ; then
   CC_FOR_BUILD=no_compiler_found ;
 fi
 ;;
 ,,*)   CC_FOR_BUILD=$CC ;;
 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
esac ; set_cc_for_build= ;'




相关内容

热门资讯

警方介入女游客高空秋千坠亡,家... 近日,女游客体验高空秋千坠亡事件引发关注。5月5日,四川省广安市华蓥市“5·3”事故调查组发布情况通...
存储涨价之后,如何让AI走向数... 国家数据局数据显示,从2024年到2026年,中国日均Token调用量从1000亿飙升至140万亿(...
华为MatePad Pro M... IT之家 5 月 6 日消息,华为海外账号 Huawei Mobile 今日公布了一款华为 Mate...
万象 一体化防爆气象仪:做高危... WX-FBQ2万象 一体化防爆气象仪:做高危环境的“硬核守护者” 在石油化工、油气储备及煤矿矿井等高...
母亲节好礼推荐 三星Galax... 母亲节悄然临近,一份兼具心意与实用性的礼物,成为子女们表达感恩的最佳载体。在智能手机成为生活必需品的...
视频丨联合国举行AI主题会议 ... 日,中国、赞比亚常驻联合国代表团和中国科学技术协会在纽约联合国总部共同举办“人工智能能力建设国际合作...
首发2亿RYYB长焦+XMAG... 一、前言:2亿RYYB长焦出手 华为影像旗舰的新答案 为什么有人随手一拍就是氛围感大片,而多数人反复...
谷歌、英伟达押注,这家估值 4... 作者|桦林舞王 编辑|靖宇 1956 年,一批科学家聚在达特茅斯,第一次正式讨论「机器能否思考」。...
英伟达想革光模块的命 问AI· 英伟达CPO技术如何冲击光模块市场格局? 上个月中际旭创一季报公布,营收、净利润双双翻倍...
豆包为什么选择了 “最low”... 针对付费会员,豆包官方回应称,豆包始终提供免费服务,在免费服务的基础上,豆包也在探索推出更多增值服务...