意想不到的令牌"LEPTONICA",PKG_CHECK_MODULES(LEPTONICA



我正在使用JavaCPP预设项目来构建Leptonica和Tesseract。我已经设法使用以下命令构建了Leptonica 1.7:

cd leptonica
./cppbuild.sh install leptonica
cd cppbuild/linux-x86_64/leptonica-1.72/
./configure
make && sudo make install
cd ../../../
mvn clean install
cd ..

编译的库是/usr/local/lib

当我尝试使用以下命令构建 Tesseract 时,出现此错误:

./cppbuild.sh install tesseract
./configure: line 17620: syntax error near unexpected token `LEPTONICA,'
./configure: line 17620: `PKG_CHECK_MODULES(LEPTONICA, lept >= 1.74, have_lept=true, have_lept=false)'
/opt/javacpp-presets/tesseract

然后我放了完整的跟踪:

/opt/javacpp-presets /opt/javacpp-presets/tesseract
Detected platform "linux-x86_64"
Building for platform "linux-x86_64"
Installing "tesseract"
/opt/javacpp-presets/tesseract/cppbuild /opt/javacpp-presets
Decompressing archives...
Bytes leídos en total: 12032000 (12MiB, 33MiB/s)
Running aclocal
Running /usr/bin/libtoolize
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'.
libtoolize: copying file 'config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, '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'
Running autoheader
Running automake --add-missing --copy
configure.ac:309: installing 'config/compile'
configure.ac:69: installing 'config/missing'
api/Makefile.am: installing 'config/depcomp'
Running autoconf
All done.
To build the software now, do something like:
$ ./configure [--enable-debug] [...other options]
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 g++ -m64 accepts -g... yes
fatal: Not a git repository: './.git'
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... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking whether make supports nested variables... yes
checking dependency style of g++ -m64... gcc3
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking --enable-graphics argument... yes
checking whether to disable cube... no
checking --enable-embedded argument... no
checking --enable-opencl argument... no
checking how to run the C++ preprocessor... g++ -m64 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -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 CL/cl.h usability... no
checking CL/cl.h presence... no
checking for CL/cl.h... no
checking OpenCL/cl.h usability... no
checking OpenCL/cl.h presence... no
checking for OpenCL/cl.h... no
checking tiffio.h usability... yes
checking tiffio.h presence... yes
checking for tiffio.h... yes
checking for clGetPlatformIDs in -lOpenCL... no
checking --enable-visibility argument... no
checking --enable-multiple-libraries argument... no
checking whether to use tessdata-prefix... yes
checking whether to enable debugging... no
checking how to print strings... printf
checking for gcc... gcc -m64
checking whether we are using the GNU C compiler... yes
checking whether gcc -m64 accepts -g... yes
checking for gcc -m64 option to accept ISO C89... none needed
checking whether gcc -m64 understands -c and -o together... yes
checking dependency style of gcc -m64... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc -m64... /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 how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-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 %sn
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 -m64 object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc -m64 supports -fno-rtti -fno-exceptions... no
checking for gcc -m64 option to produce PIC... -fPIC -DPIC
checking if gcc -m64 PIC flag -fPIC -DPIC works... yes
checking if gcc -m64 static flag -static works... yes
checking if gcc -m64 supports -c -o file.o... yes
checking if gcc -m64 supports -c -o file.o... (cached) yes
checking whether the gcc -m64 linker (/usr/bin/ld -m elf_x86_64) 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
checking how to run the C++ preprocessor... g++ -m64 -E
checking for ld used by g++ -m64... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ -m64 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ -m64 option to produce PIC... -fPIC -DPIC
checking if g++ -m64 PIC flag -fPIC -DPIC works... yes
checking if g++ -m64 static flag -static works... yes
checking if g++ -m64 supports -c -o file.o... yes
checking if g++ -m64 supports -c -o file.o... (cached) yes
checking whether the g++ -m64 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether byte ordering is bigendian... no
checking if compiling with clang... no
checking whether compiler supports C++11... yes
checking for snprintf... yes
checking for library containing sem_init... -lpthread
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... no
checking whether #! works in shell scripts... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for getline... yes
checking for wchar_t... yes
checking for long long int... yes
checking for off_t... yes
checking for mbstate_t... yes
./configure: line 17620: syntax error near unexpected token `LEPTONICA,'
./configure: line 17620: `PKG_CHECK_MODULES(LEPTONICA, lept >= 1.74, have_lept=true, have_lept=false)'
/opt/javacpp-presets/tesseract

我从自动会议使用的版本是 2.9。

提前致谢

今年早些时候,在 github 帐户上提出了类似的问题。一条评论回应说:

感谢您的这份报告。您在安装指南中发现了一个错误:我们没有提到软件包 pkg-config 是必需的。我在 Wiki 页面中修复了它,并将发送拉取请求以更新分发的 INSTALL* 文件。

我今天在OS X上遇到了同样的问题,安装pkg-config似乎已经解决了这个问题。

相关内容

  • 没有找到相关文章

最新更新