• 締切済み

configureエラー

http://samuraism.jp/diary/2007/04/14/1176560157667.html 上記のサイトのとおりにOCRopusのインストールを行ったのですが、ocropusの「./configure」をおこなうと、 checking for err_exit in -ltesseract_full... no configure: error: Could not find tesseract! Choose --without-tesseract if you do not want to use it. のように出てうまくいきません。このようなエラーはどのようにすれば解決するのでしょうか? tesseractというやつもきちんとコンパイルしたはずなんですが・・・ 使用したOSはubuntu10.04です。 回答よろしくお願いします。

みんなの回答

  • kmee
  • ベストアンサー率55% (1857/3366)
回答No.2

たぶん、そのログのもうすこし上に具体的なエラーがついてると思います。 ファイルを検索する場所は gccなら gcc -print-search-dirs としたら表示されます。librariesという欄にあるディレクトリを順番に探してみましょう。 ./configureで何も指定しないと、大抵 prefix=/usr/local になっていて、ライブラリは /usr/local/lib 以下にインストールされます。 上の librariesに /usr/local/lib が含まれているかを確認しましょう。 もし含まれていないようなら、./configure を LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include ./configure と実行するとどうでしょうか?

bluckb1
質問者

お礼

とても全部はのりそうにないです;; configure:2954: result: yes configure:2988: checking for style of include used by make configure:3016: result: GNU configure:3044: checking dependency style of g++ configure:3134: result: gcc3 configure:3199: checking for gcc configure:3215: found /usr/bin/gcc configure:3226: result: gcc configure:3464: checking for C compiler version configure:3471: gcc --version >&5 gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3 Copyright (C) 2009 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. configure:3474: $? = 0 configure:3481: gcc -v >&5 Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) configure:3484: $? = 0 configure:3491: gcc -V >&5 gcc: '-V' option must have argument configure:3494: $? = 1 configure:3497: checking whether we are using the GNU C compiler configure:3526: gcc -c -I/usr/local/include conftest.c >&5 configure:3532: $? = 0 configure:3549: result: yes configure:3554: checking whether gcc accepts -g configure:3584: gcc -c -g -I/usr/local/include conftest.c >&5 configure:3590: $? = 0 configure:3689: result: yes configure:3706: checking for gcc option to accept ISO C89 configure:3780: gcc -c -g -O2 -I/usr/local/include conftest.c >&5 configure:3786: $? = 0 configure:3809: result: none needed configure:3829: checking dependency style of gcc configure:3919: result: gcc3 configure:3979: checking for ranlib configure:3995: found /usr/bin/ranlib configure:4006: result: ranlib configure:4039: checking how to run the C preprocessor configure:4079: gcc -E -I/usr/local/include conftest.c configure:4085: $? = 0 configure:4116: gcc -E -I/usr/local/include conftest.c conftest.c:10:28: error: ac_nonexistent.h: No such file or directory configure:4122: $? = 1 configure: failed program was: | /* confdefs.h. */ | #define PACKAGE_NAME "ocropus" | #define PACKAGE_TARNAME "ocropus" | #define PACKAGE_VERSION "0.3" | #define PACKAGE_STRING "ocropus 0.3" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "ocropus" | #define VERSION "0.3" | /* end confdefs.h. */ | #include <ac_nonexistent.h> configure:4155: result: gcc -E configure:4184: gcc -E -I/usr/local/include conftest.c configure:4190: $? = 0 configure:4221: gcc -E -I/usr/local/include conftest.c conftest.c:10:28: error: ac_nonexistent.h: No such file or directory configure:4227: $? = 1 configure: failed program was: | /* confdefs.h. */ | #define PACKAGE_NAME "ocropus" | #define PACKAGE_TARNAME "ocropus" | #define PACKAGE_VERSION "0.3" | #define PACKAGE_STRING "ocropus 0.3" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "ocropus" | #define VERSION "0.3" | /* end confdefs.h. */ | #include <ac_nonexistent.h> configure:4265: checking for grep that handles long lines and -e configure:4339: result: /bin/grep configure:4344: checking for egrep configure:4422: result: /bin/grep -E configure:4427: checking for ANSI C header files configure:4457: gcc -c -g -O2 -I/usr/local/include conftest.c >&5 configure:4463: $? = 0 configure:4562: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib conftest.c >&5 configure:4565: $? = 0 configure:4571: ./conftest configure:4574: $? = 0 configure:4591: resul

bluckb1
質問者

補足

LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include ./configure と実行しても同じエラーが出てしまいました・・・。(tesseractが無い) その時のconfigure.logをすべて載せます;; This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by ocropus configure 0.3, which was generated by GNU Autoconf 2.61. Invocation command line was $ ./configure ## --------- ## ## Platform. ## ## --------- ## hostname = ubuntu uname -m = i686 uname -r = 2.6.32-33-generic uname -s = Linux uname -v = #72-Ubuntu SMP Fri Jul 29 21:08:37 UTC 2011 /usr/bin/uname -p = unknown /bin/uname -X = unknown /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /usr/local/sbin PATH: /usr/local/bin PATH: /usr/sbin PATH: /usr/bin PATH: /sbin PATH: /bin PATH: /usr/games ## ----------- ## ## Core tests. ## ## ----------- ## configure:1837: checking for a BSD-compatible install configure:1893: result: /usr/bin/install -c configure:1904: checking whether build environment is sane configure:1947: result: yes configure:2012: checking for gawk configure:2028: found /usr/bin/gawk configure:2039: result: gawk configure:2050: checking whether make sets $(MAKE) configure:2071: result: yes configure:2338: checking for /usr/local/include/iulib/imgio.h configure:2354: result: yes configure:2428: checking for g++ configure:2444: found /usr/bin/g++ configure:2455: result: g++ configure:2486: checking for C++ compiler version configure:2493: g++ --version >&5 g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3 Copyright (C) 2009 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. configure:2496: $? = 0 configure:2503: g++ -v >&5 Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) configure:2506: $? = 0 configure:2513: g++ -V >&5 g++: '-V' option must have argument configure:2516: $? = 1 configure:2539: checking for C++ compiler default output file name configure:2566: g++ -I/usr/local/include -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib conftest.cpp >&5 configure:2569: $? = 0 configure:2607: result: a.out configure:2624: checking whether the C++ compiler works configure:2634: ./a.out configure:2637: $? = 0 configure:2654: result: yes configure:2661: checking whether we are cross compiling configure:2663: result: no configure:2666: checking for suffix of executables configure:2673: g++ -o conftest -I/usr/local/include -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib conftest.cpp >&5 configure:2676: $? = 0 configure:2700: result: configure:2706: checking for suffix of object files configure:2732: g++ -c -I/usr/local/include conftest.cpp >&5 configure:2735: $? = 0 configure:2758: result: o configure:2762: checking whether we are using the GNU C++ compiler configure:2791: g++ -c -I/usr/local/include conftest.cpp >&5 configure:2797: $? = 0 configure:2814: result: yes configure:2819: checking whether g++ accepts -g configure:2849: g++ -c -g -I/usr/local/include conftest.cpp >&5 configure:2855: $? = 0

  • kmee
  • ベストアンサー率55% (1857/3366)
回答No.1

> tesseractというやつもきちんとコンパイルしたはずなんですが インストールはしましたか? あるいは、tesseractのビルド時に、必要なオプションを指定していない、とか。 -ltesseract_fullと指定したときのリンクされるライブラリ、 libtesseract_full.* が見付からないか、ファイルはあるが err_exit というラベルが見付からないか、と予想されます。 その原因として、上のようなことが考えられます。 エラーについては、config.log というファイルにより詳しい情報が書いてあるはずです。

bluckb1
質問者

補足

tesseractはサイトの通りに、「./runautoconf」「./configure」「make」「sudo make install」を行い、エラーも無かったです。 必要なオプションとありますが、今回の場合何を指定すればよかったのでしょうか? libtesseract_full.*というライブラリがあるかどうか分からないのでダウンロードして再度configureしてみようと思います。どこからダウンロードしてくればよいかいまいち分かりませんが^^; config.logを見てみると、一部に以下のような記述がありました。confdefs.hというファイルが間違っているようなのですが、何が間違っているのか分かりません;; configure: failed program was: | /* confdefs.h. */ | #define PACKAGE_NAME "ocropus" | #define PACKAGE_TARNAME "ocropus" | #define PACKAGE_VERSION "0.3" | #define PACKAGE_STRING "ocropus 0.3" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "ocropus" | #define VERSION "0.3" | #define STDC_HEADERS 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_FLOAT_H 1 | #define HAVE_MALLOC_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_LIBZ 1 | #define HAVE_LIBPNG 1 | #define HAVE_LIBJPEG 1 | #define HAVE_LIBTIFF 1 | #define HAVE_LIBIULIB 1 | #define HAVE_LIBPTHREAD 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char err_exit (); | int | main () | { | return err_exit (); | ; | return 0; | } configure:5817: result: no configure:5827: error: Could not find tesseract! Choose --without-tesseract if you do not want to use it.

関連するQ&A