我最近听说了 Maynard 桌面,它是 Raspberry Pi 上 LXDE 的替代品,我非常喜欢它。我原本打算将它安装在我的 Pi 上,直到我发现我可以为我的 PC 编译它,我决定按照说明进行操作这里。
但是,当我运行 git clone 附带的 autogen.sh 脚本时,出现一个错误,阻止我进行编译。
./autogen.sh --prefix $PREFIX
返回:
Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf2.50 line 196.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf2.50 line 196.
autoreconf2.50: Entering directory `.'
autoreconf2.50: configure.ac: not using Gettext
autoreconf2.50: running: aclocal --force -I m4 ${ACLOCAL_FLAGS}
autoreconf2.50: configure.ac: tracing
autoreconf2.50: configure.ac: not using Libtool
autoreconf2.50: running: /usr/bin/autoconf --force
autoreconf2.50: running: /usr/bin/autoheader --force
autoreconf2.50: running: automake --add-missing --copy --force-missing
cursor/Makefile.am:1: Libtool library used but `LIBTOOL' is undefined
cursor/Makefile.am:1: The usual way to define `LIBTOOL' is to add `LT_INIT'
cursor/Makefile.am:1: to `configure.ac' and run `aclocal' and `autoconf' again.
cursor/Makefile.am:1: If `LT_INIT' is in `configure.ac', make sure
cursor/Makefile.am:1: its definition is in aclocal's search path.
src/Makefile.am:1: Libtool library used but `LIBTOOL' is undefined
src/Makefile.am:1: The usual way to define `LIBTOOL' is to add `LT_INIT'
src/Makefile.am:1: to `configure.ac' and run `aclocal' and `autoconf' again.
src/Makefile.am:1: If `LT_INIT' is in `configure.ac', make sure
src/Makefile.am:1: its definition is in aclocal's search path.
autoreconf2.50: automake failed with exit status: 1
autogen.sh 脚本如下:
#! /bin/sh
test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
(
cd "$srcdir" &&
autoreconf --force -v --install
) || exit
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
并且 $PREFIX 变量是/home/nate/maynard-dev/_inst
问题是什么?为什么自动生成脚本不起作用?
编辑:答案让我摆脱了最初的错误,但现在我又遇到了另一个错误。以下是新的完整输出:
autoreconf2.50: Entering directory `.'
autoreconf2.50: configure.ac: not using Gettext
autoreconf2.50: running: aclocal --force -I m4 ${ACLOCAL_FLAGS}
autoreconf2.50: configure.ac: tracing
autoreconf2.50: running: libtoolize --install --copy --force
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./config.guess'
libtoolize: copying file `./config.sub'
libtoolize: copying file `./install-sh'
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
autoreconf2.50: running: /usr/bin/autoconf --force
autoreconf2.50: running: /usr/bin/autoheader --force
autoreconf2.50: running: automake --add-missing --copy --force-missing
autoreconf2.50: Leaving directory `.'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... powerpc-unknown-linux-gnu
checking host system type... powerpc-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert powerpc-unknown-linux-gnu file names to powerpc-unknown-linux-gnu format... func_convert_file_noop
checking how to convert powerpc-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
./configure: line 11408: syntax error near unexpected token `PKG_CHECK_MODULES'
./configure: line 11408: `PKG_CHECK_MODULES(FFI, libffi)'
答案1
您的autogen.sh
脚本失败,因为您必须安装libtool
提供该libtoolize
实用程序的软件包:
sudo apt-get update
sudo apt-get install libtool
然后再试一次./autogen.sh --prefix $PREFIX
答案2
由于我无法对@Sylvain Pineau 的上述回答发表评论,因此为后续问题创建一个新的答案
sudo apt-get update
sudo apt-get install libtool
然后再试一次
sh autogen.sh
如果您看到以下错误 ./configure: 第 11408 行:意外标记 PKG_CHECK_MODULES 附近的语法错误'
安装 pkg-config:
sudo apt-get install pkg-config
sh autogen.sh
./configure && make
这应该可以解决一切问题。