我正在构建一个C automake项目。运行“ aclocal”显示以下错误。
$ aclocal
' is already registered with AC_CONFIG_FILES./usr/src/ports/autoconf2.5/autoconf2.5-2.69-3.noarch/src/autoconf-2.69/lib/autoconf/status.m4:288: AC_CONFIG_FILES is
expanded from...
configure.ac:890: the top level
autom4te-2.69: /usr/bin/m4 failed with exit status: 1
aclocal-1.15: error: echo failed with exit status: 1
Run Code Online (Sandbox Code Playgroud)
我在Windows 10上使用Cygwin。
从886行到结尾,configure.ac具有以下内容。
# ----------------------------------------------------------------------
# Create output files
#
echo $SLIM_VERSION > VERSION
AC_OUTPUT(Makefile \
src/Makefile \
src/genconfig \
src/verifier/Makefile \
src/utility/Makefile \
src/test/Makefile \
lib/Makefile \
ext/Makefile \
test/Makefile \
test/system_check/Makefile \
third_party/Makefile \
third_party/zdelta-2.1/Makefile \
third_party/google-perftools-1.8.3/Makefile \
third_party/google-perftools-1.8.3/src/google/tcmalloc.h \
third_party/google-perftools-1.8.3/src/windows/google/tcmalloc.h \
doc/Makefile \
doc/slim.1)
Run Code Online (Sandbox Code Playgroud)
按照建议,我在每个“ * .am”文件和“ configure.ac”上都使用了“ dos2unix”,但是运行“ make”会显示以下错误。
configure.ac:596: the top level
cd ../.. && /bin/sh ./config.status third_party/zdelta-2.1/Makefile depfiles
config.status: creating third_party/zdelta-2.1/Makefile
config.status: executing depfiles commands
source='deflate.c' object='deflate.o' libtool=no \
DEPDIR=.deps depmode=none /bin/sh ../../depcomp \
gcc -DHAVE_CONFIG_H -I. -I../../src -Wall -export-dynamic -O3 -fopenmp -c -o deflate.o deflate.c
../../depcomp:?2: $'\r': ?????
../../depcomp:?5: $'\r': ?????
../../depcomp:?10: $'\r': ?????
../../depcomp:?15: $'\r': ?????
../../depcomp:?20: $'\r': ?????
../../depcomp:?25: $'\r': ?????
../../depcomp:?27: $'\r': ?????
../../depcomp:?64: ?????? `$'in\r'' ???????
'./../depcomp:?64: `case "$depmode" in
make[2]: *** [Makefile:419?deflate.o] ?? 2
make[2]: ????“/cygdrive/c/LaViT2_8_9/lmntal/slim-lightweight-
hlground/third_party/zdelta-2.1”
make[1]: *** [Makefile:386?all-recursive] ?? 1
make[1]: ????“/cygdrive/c/LaViT2_8_9/lmntal/slim-lightweight-
hlground/third_party”
make: *** [Makefile:425?all-recursive] ?? 1
Run Code Online (Sandbox Code Playgroud)
这里,
?2: $'\r': ?????
Run Code Online (Sandbox Code Playgroud)
表示第2行:$'\ r':找不到命令
谁能帮我解决这个问题?
有效地确定您的问题是由DOS换行符引起的。
赠品是这个错误:
'已在AC_CONFIG_FILES中注册./usr/src/ports/autoconf2.5/autoconf2.5-2.69-3.noarch/src/autoconf-2.69/lib/autoconf/status.m4:288:AC_CONFIG_FILES为
以开头的行' is already registered with意味着在将行写入控制台的过程中,游标被发送回了行的中途-打印从DOS格式的文本文件中读取的字符串的确切行为,同时它期望它在UNIX中。格式。
git以UNIX格式签出文本文件git config --global core.autocrlf false
git config --global core.eol lf
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
747 次 |
| 最近记录: |