DanBloomberg / leptonica

Leptonica is an open source library containing software that is broadly useful for image processing and image analysis applications. The official github repository for Leptonica is: danbloomberg/leptonica. See leptonica.org for more documentation.
Other
1.8k stars 393 forks source link

leptonica-1.74.1] not compiling on centos #262

Closed mgrint2 closed 7 years ago

mgrint2 commented 7 years ago

Below error getting while compiling on centos config log is attached below. This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake.

It was created by leptonica configure 1.74.1, which was generated by GNU Autoconf 2.69. Invocation command line was

$ ./configure

---------

Platform.

---------

hostname = delhi40.bol.net.in uname -m = x86_64 uname -r = 3.10.0-123.el7.x86_64 uname -s = Linux uname -v = #1 SMP Mon Jun 30 12:09:22 UTC 2014

/usr/bin/uname -p = x86_64 /bin/uname -X = unknown

/bin/arch = x86_64 /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/lib64/qt-3.3/bin PATH: /root/perl5/bin PATH: /usr/local/sbin PATH: /usr/local/bin PATH: /usr/sbin PATH: /usr/bin PATH: /root/bin

-----------

Core tests.

-----------

configure:2350: checking build system type configure:2364: result: x86_64-unknown-linux-gnu configure:2384: checking host system type configure:2397: result: x86_64-unknown-linux-gnu configure:2438: checking how to print strings configure:2465: result: printf configure:2534: checking for gcc configure:2550: found /usr/bin/gcc configure:2561: result: gcc configure:2790: checking for C compiler version configure:2799: gcc --version >&5 gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-16) Copyright (C) 2013 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:2810: $? = 0 configure:2799: gcc -v >&5 Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.c om/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_at exit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-langua ges=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/B UILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat- linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux Thread model: posix gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) configure:2810: $? = 0 configure:2799: gcc -V >&5 gcc: error: unrecognized command line option '-V' gcc: fatal error: no input files compilation terminated. configure:2810: $? = 4 configure:2799: gcc -qversion >&5 gcc: error: unrecognized command line option '-qversion' gcc: fatal error: no input files compilation terminated. configure:2810: $? = 4 configure:2830: checking whether the C compiler works configure:2852: gcc conftest.c >&5 configure:2856: $? = 0 configure:2904: result: yes configure:2907: checking for C compiler default output file name configure:2909: result: a.out configure:2915: checking for suffix of executables configure:2922: gcc -o conftest conftest.c >&5 configure:2926: $? = 0 configure:2948: result: configure:2970: checking whether we are cross compiling configure:2978: gcc -o conftest conftest.c >&5 In file included from conftest.c:9:0: /usr/include/stdio.h:33:21: fatal error: stddef.h: No such file or directory

include

                 ^

compilation terminated. configure:2982: $? = 1 configure:2989: ./conftest ./configure: line 2991: ./conftest: No such file or directory configure:2993: $? = 127 configure:3000: error: in /root/install-tesseract-redhat-centos-master/leptonica-1.74.1': configure:3002: error: cannot run C compiled programs. If you meant to cross compile, use--host'. See `config.log' for more details

----------------

Cache variables.

----------------

ac_cv_build=x86_64-unknown-linux-gnu ac_cv_env_CC_set= ac_cv_env_CC_value= ac_cv_env_CFLAGS_set= ac_cv_env_CFLAGS_value= ac_cv_env_CPPFLAGS_set= ac_cv_env_CPPFLAGS_value= ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_LDFLAGS_set= ac_cv_env_LDFLAGS_value= ac_cv_env_LIBS_set= ac_cv_env_LIBS_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_host=x86_64-unknown-linux-gnu ac_cv_prog_ac_ct_CC=gcc

-----------------

Output variables.

-----------------

ACLOCAL='' AMDEPBACKSLASH='' AMDEP_FALSE='' AMDEP_TRUE='' AMTAR='' AM_BACKSLASH='' AM_DEFAULT_V='' AM_DEFAULT_VERBOSITY='' AM_V='' APPLE_UNIVERSAL_BUILD='' AR='' AUTOCONF='' AUTOHEADER='' AUTOMAKE='' AWK='' CC='gcc' CCDEPMODE='' CFLAGS='' CPP='' CPPFLAGS='' CYGPATH_W='' DEFS='' DEPDIR='' DLLTOOL='' DSYMUTIL='' DUMPBIN='' ECHO_C='' ECHO_N='-n' ECHO_T='' EGREP='' ENABLE_PROGRAMS_FALSE='' ENABLE_PROGRAMS_TRUE='' ENDIANNESS='' EXEEXT='' FGREP='' GDI_LIBS='' GIFLIB_LIBS='' GREP='' HAVE_LIBGIF_FALSE='' HAVE_LIBGIF_TRUE='' HAVE_LIBJP2K_FALSE='' HAVE_LIBJP2K_TRUE='' HAVE_LIBWEBP_FALSE='' HAVE_LIBWEBP_TRUE='' INSTALL_DATA='' INSTALL_PROGRAM='' INSTALL_SCRIPT='' INSTALL_STRIP_PROGRAM='' JPEG_LIBS='' LD='' LDFLAGS='' LIBJP2K_LIBS='' LIBM='' LIBOBJS='' LIBPNG_LIBS='' LIBS='' LIBTIFF_LIBS='' LIBTOOL='' LIBWEBP_LIBS='' LIPO='' LN_S='' LTLIBOBJS='' MAKEINFO='' MANIFEST_TOOL='' MKDIR_P='' NM='' NMEDIT='' OBJDUMP='' OBJEXT='' OTOOL64='' OTOOL='' PACKAGE='' PACKAGE_BUGREPORT='' PACKAGE_NAME='leptonica' PACKAGE_STRING='leptonica 1.74.1' PACKAGE_TARNAME='leptonica' PACKAGE_URL='' PACKAGE_VERSION='1.74.1' PATH_SEPARATOR=':' RANLIB='' SED='' SET_MAKE='' SHELL='/bin/sh' STRIP='' VERSION='' ZLIB_LIBS='' ac_ct_AR='' ac_ct_CC='gcc' ac_ct_DUMPBIN='' amEXEEXT_FALSE='' am__EXEEXT_TRUE='' amfastdepCC_FALSE='' amfastdepCC_TRUE='' aminclude='' amisrc='' am__leading_dot='' amnodep='' amquote='' amtar='' am__untar='' bindir='${exec_prefix}/bin' build='x86_64-unknown-linux-gnu' build_alias='' build_cpu='x86_64' build_os='linux-gnu' build_vendor='unknown' datadir='${datarootdir}' datarootdir='${prefix}/share' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' dvidir='${docdir}' exec_prefix='NONE' host='x86_64-unknown-linux-gnu' host_alias='' host_cpu='x86_64' host_os='linux-gnu' host_vendor='unknown' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' install_sh='' libdir='${exec_prefix}/lib' libexecdir='${exec_prefix}/libexec' localedir='${datarootdir}/locale' localstatedir='${prefix}/var' mandir='${datarootdir}/man' mkdir_p='' oldincludedir='/usr/include' pdfdir='${docdir}' prefix='NONE' program_transform_name='s,x,x,' psdir='${docdir}' sbindir='${exec_prefix}/sbin' sharedstatedir='${prefix}/com' sysconfdir='${prefix}/etc' target_alias=''

-----------

confdefs.h.

-----------

/ confdefs.h /

define PACKAGE_NAME "leptonica"

define PACKAGE_TARNAME "leptonica"

define PACKAGE_VERSION "1.74.1"

define PACKAGE_STRING "leptonica 1.74.1"

define PACKAGE_BUGREPORT ""

define PACKAGE_URL ""

configure: exit 1 [root@delhi40 leptonica-1.74.1]#

mgrint2 commented 7 years ago

Please help in this regard

mgrint2 commented 7 years ago

whether gcc will updated.

DanBloomberg commented 7 years ago

I also use autoconf 2.69. Don't know why it doesn't work on your system.

Suggest you try 1.74.2.

DanBloomberg commented 7 years ago

Also, you're getting configure failures right at the beginning. Things like not recognizing the '-V' arg, and not finding /lusr/include/stdio.h. Do you have such a file?

An alternative is to build this with cmake, rather than autotools. See the README.html for instructions.

And a 3rd alternative is to build with the local makefiles that I wrote by hand.

mgrint2 commented 7 years ago

Please help with detailed steps as i m new to leptonica

/usr/include/stdio.h. -----> not found in /usr/include directory Below the error getting while running cmake leptonica-1.74.1]# cd build/ [root@d3333build]# cmake .. -- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR) -- checking for module 'libwebp' -- package 'libwebp' not found -- checking for module 'libopenjp2' -- package 'libopenjp2' not found -- Configuring done -- Generating done -- Build files have been written to: /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build [root@delhi3333build]# make [ 0%] Building C object src/CMakeFiles/leptonica.dir/dewarp4.c.o In file included from /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/src/alltypes.h:31:0, from /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/src/allheaders.h:35, from /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/src/dewarp4.c:58: **/usr/include/stdio.h:33:21: fatal error: stddef.h: No such file or directory

include

                 ^**

compilation terminated. make[2]: [src/CMakeFiles/leptonica.dir/dewarp4.c.o] Error 1 make[1]: [src/CMakeFiles/leptonica.dir/all] Error 2 make: *** [all] Error 2 [root@delhi40 build]# cd build -bash: cd: build: No such file or directory [root@delhi40 build]# ls -ltr total 48 -rw-r--r--. 1 root root 383 Jun 11 10:59 LeptonicaConfig-version.cmake -rw-r--r--. 1 root root 2025 Jun 11 10:59 LeptonicaConfig.cmake -rw-r--r--. 1 root root 2050 Jun 11 10:59 LeptonicaTargets.cmake -rw-r--r--. 1 root root 15986 Jun 11 10:59 CMakeCache.txt -rw-r--r--. 1 root root 1935 Jun 11 10:59 cmake_install.cmake -rw-r--r--. 1 root root 2078 Jun 11 11:57 config_auto.h.in -rw-r--r--. 1 root root 4303 Jun 11 11:57 Makefile drwxr-xr-x. 3 root root 103 Jun 11 11:57 src drwxr-xr-x. 6 root root 4096 Jun 11 11:57 CMakeFiles

[root@delhi40 leptonica-1.74.1]# yum install libopenjp2 Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile

Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile

  • base: mirror.nbrc.ac.in
  • extras: mirror.nbrc.ac.in
  • updates: mirror.nbrc.ac.in Package libwebp-0.3.0-3.el7.x86_64 already installed and latest version Nothing to do [root@delhi3333 leptonica-1.74.1]#

Pls help @DanBloomberg

thanks

mgrint2 commented 7 years ago

[root@delhi333 Progress]# more CMakeError.log

Determining if files dlfcn.h exist failed with the following output: Change Dir: /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec3096844400/fast" /usr/bin/gmake -f CMakeFiles/cmTryCompileExec3096844400.dir/build.make CMakeFiles/cmTryCompileExec3096844400.dir/build gmake[1]: Entering directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CMak eFiles 1 Building C object CMakeFiles/cmTryCompileExec3096844400.dir/CheckIncludeFiles.c.o /usr/bin/cc -o CMakeFiles/cmTryCompileExec3096844400.dir/CheckIncludeFiles.c.o -c /root/install-tesseract-redhat-centos-master/ leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c In file included from /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2: 0: /usr/include/dlfcn.h:25:20: fatal error: stddef.h: No such file or directory

include

                ^

compilation terminated. gmake[1]: Leaving directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' gmake[1]: [CMakeFiles/cmTryCompileExec3096844400.dir/CheckIncludeFiles.c.o] Error 1 gmake: [cmTryCompileExec3096844400/fast] Error 2

Source: / /

include

int main(){return 0;}

Determining if files memory.h exist failed with the following output: Change Dir: /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec4119623111/fast" /usr/bin/gmake -f CMakeFiles/cmTryCompileExec4119623111.dir/build.make CMakeFiles/cmTryCompileExec4119623111.dir/build gmake[1]: Entering directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CMak eFiles 1 Building C object CMakeFiles/cmTryCompileExec4119623111.dir/CheckIncludeFiles.c.o /usr/bin/cc -o CMakeFiles/cmTryCompileExec4119623111.dir/CheckIncludeFiles.c.o -c /root/install-tesseract-redhat-centos-master/ leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c In file included from /usr/include/memory.h:29:0, from /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2: /usr/include/string.h:32:20: fatal error: stddef.h: No such file or directory

include

                ^

compilation terminated. gmake[1]: Leaving directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' gmake[1]: [CMakeFiles/cmTryCompileExec4119623111.dir/CheckIncludeFiles.c.o] Error 1 gmake: [cmTryCompileExec4119623111/fast] Error 2

Source: / /

include

int main(){return 0;}

Determining if files stdlib.h exist failed with the following output: Change Dir: /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec2534400084/fast" /usr/bin/gmake -f CMakeFiles/cmTryCompileExec2534400084.dir/build.make CMakeFiles/cmTryCompileExec2534400084.dir/build gmake[1]: Entering directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CMak eFiles 1 Building C object CMakeFiles/cmTryCompileExec2534400084.dir/CheckIncludeFiles.c.o /usr/bin/cc -o CMakeFiles/cmTryCompileExec2534400084.dir/CheckIncludeFiles.c.o -c /root/install-tesseract-redhat-centos-master/ leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c In file included from /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2: 0: /usr/include/stdlib.h:32:20: fatal error: stddef.h: No such file or directory

include

                ^

compilation terminated. gmake[1]: Leaving directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' gmake[1]: [CMakeFiles/cmTryCompileExec2534400084.dir/CheckIncludeFiles.c.o] Error 1 gmake: [cmTryCompileExec2534400084/fast] Error 2

Source: / /

include

int main(){return 0;}

Determining if files strings.h exist failed with the following output: Change Dir: /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec2519186371/fast" /usr/bin/gmake -f CMakeFiles/cmTryCompileExec2519186371.dir/build.make CMakeFiles/cmTryCompileExec2519186371.dir/build gmake[1]: Entering directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CMak eFiles 1 Building C object CMakeFiles/cmTryCompileExec2519186371.dir/CheckIncludeFiles.c.o /usr/bin/cc -o CMakeFiles/cmTryCompileExec2519186371.dir/CheckIncludeFiles.c.o -c /root/install-tesseract-redhat-centos-master/ leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c In file included from /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2: 0: /usr/include/strings.h:29:21: fatal error: stddef.h: No such file or directory

include

                 ^

compilation terminated. gmake[1]: Leaving directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' gmake[1]: [CMakeFiles/cmTryCompileExec2519186371.dir/CheckIncludeFiles.c.o] Error 1 gmake: [cmTryCompileExec2519186371/fast] Error 2

Source: / /

include

int main(){return 0;}

Determining if files string.h exist failed with the following output: Change Dir: /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec2065522888/fast" /usr/bin/gmake -f CMakeFiles/cmTryCompileExec2065522888.dir/build.make CMakeFiles/cmTryCompileExec2065522888.dir/build gmake[1]: Entering directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CMak eFiles 1 Building C object CMakeFiles/cmTryCompileExec2065522888.dir/CheckIncludeFiles.c.o /usr/bin/cc -o CMakeFiles/cmTryCompileExec2065522888.dir/CheckIncludeFiles.c.o -c /root/install-tesseract-redhat-centos-master/ leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c In file included from /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2: 0: /usr/include/string.h:32:20: fatal error: stddef.h: No such file or directory

include

                ^

compilation terminated. gmake[1]: Leaving directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' gmake[1]: [CMakeFiles/cmTryCompileExec2065522888.dir/CheckIncludeFiles.c.o] Error 1 gmake: [cmTryCompileExec2065522888/fast] Error 2

Source: / /

include

int main(){return 0;}

Determining if files sys/types.h exist failed with the following output: Change Dir: /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec1412137486/fast" /usr/bin/gmake -f CMakeFiles/cmTryCompileExec1412137486.dir/build.make CMakeFiles/cmTryCompileExec1412137486.dir/build gmake[1]: Entering directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CMak eFiles 1 Building C object CMakeFiles/cmTryCompileExec1412137486.dir/CheckIncludeFiles.c.o /usr/bin/cc -o CMakeFiles/cmTryCompileExec1412137486.dir/CheckIncludeFiles.c.o -c /root/install-tesseract-redhat-centos-master/ leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c In file included from /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2: 0: /usr/include/sys/types.h:146:20: fatal error: stddef.h: No such file or directory

include

                ^

compilation terminated. gmake[1]: Leaving directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' gmake[1]: [CMakeFiles/cmTryCompileExec1412137486.dir/CheckIncludeFiles.c.o] Error 1 gmake: [cmTryCompileExec1412137486/fast] Error 2

Source: / /

include <sys/types.h>

int main(){return 0;}

Determining if files unistd.h exist failed with the following output: Change Dir: /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec1939127349/fast" /usr/bin/gmake -f CMakeFiles/cmTryCompileExec1939127349.dir/build.make CMakeFiles/cmTryCompileExec1939127349.dir/build gmake[1]: Entering directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CMak eFiles 1 Building C object CMakeFiles/cmTryCompileExec1939127349.dir/CheckIncludeFiles.c.o /usr/bin/cc -o CMakeFiles/cmTryCompileExec1939127349.dir/CheckIncludeFiles.c.o -c /root/install-tesseract-redhat-centos-master/ leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c In file included from /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2: 0: /usr/include/unistd.h:226:20: fatal error: stddef.h: No such file or directory

include

                ^

compilation terminated. gmake[1]: Leaving directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' gmake[1]: [CMakeFiles/cmTryCompileExec1939127349.dir/CheckIncludeFiles.c.o] Error 1 gmake: [cmTryCompileExec1939127349/fast] Error 2

Source: / /

include

int main(){return 0;}

Determining if files openjpeg-2.0/openjpeg.h exist failed with the following output: Change Dir: /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec3194086159/fast" /usr/bin/gmake -f CMakeFiles/cmTryCompileExec3194086159.dir/build.make CMakeFiles/cmTryCompileExec3194086159.dir/build gmake[1]: Entering directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CMak eFiles 1 Building C object CMakeFiles/cmTryCompileExec3194086159.dir/CheckIncludeFiles.c.o /usr/bin/cc -o CMakeFiles/cmTryCompileExec3194086159.dir/CheckIncludeFiles.c.o -c /root/install-tesseract-redhat-centos-master/ leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2:35: fatal error: openj peg-2.0/openjpeg.h: No such file or directory

include <openjpeg-2.0/openjpeg.h>

                               ^

compilation terminated. gmake[1]: Leaving directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' gmake[1]: [CMakeFiles/cmTryCompileExec3194086159.dir/CheckIncludeFiles.c.o] Error 1 gmake: [cmTryCompileExec3194086159/fast] Error 2

Source: / /

include <openjpeg-2.0/openjpeg.h>

int main(){return 0;}

Determining if files openjpeg-2.1/openjpeg.h exist failed with the following output: Change Dir: /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec3538045833/fast" /usr/bin/gmake -f CMakeFiles/cmTryCompileExec3538045833.dir/build.make CMakeFiles/cmTryCompileExec3538045833.dir/build gmake[1]: Entering directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CMak eFiles 1 Building C object CMakeFiles/cmTryCompileExec3538045833.dir/CheckIncludeFiles.c.o /usr/bin/cc -o CMakeFiles/cmTryCompileExec3538045833.dir/CheckIncludeFiles.c.o -c /root/install-tesseract-redhat-centos-master/ leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2:35: fatal error: openj peg-2.1/openjpeg.h: No such file or directory

include <openjpeg-2.1/openjpeg.h>

                               ^

compilation terminated. gmake[1]: Leaving directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' gmake[1]: [CMakeFiles/cmTryCompileExec3538045833.dir/CheckIncludeFiles.c.o] Error 1 gmake: [cmTryCompileExec3538045833/fast] Error 2

Source: / /

include <openjpeg-2.1/openjpeg.h>

int main(){return 0;}

Determining if files openjpeg-2.2/openjpeg.h exist failed with the following output: Change Dir: /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec1657094144/fast" /usr/bin/gmake -f CMakeFiles/cmTryCompileExec1657094144.dir/build.make CMakeFiles/cmTryCompileExec1657094144.dir/build gmake[1]: Entering directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CMak eFiles 1 Building C object CMakeFiles/cmTryCompileExec1657094144.dir/CheckIncludeFiles.c.o /usr/bin/cc -o CMakeFiles/cmTryCompileExec1657094144.dir/CheckIncludeFiles.c.o -c /root/install-tesseract-redhat-centos-master/ leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2:35: fatal error: openj peg-2.2/openjpeg.h: No such file or directory

include <openjpeg-2.2/openjpeg.h>

                               ^

compilation terminated. gmake[1]: Leaving directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' gmake[1]: [CMakeFiles/cmTryCompileExec1657094144.dir/CheckIncludeFiles.c.o] Error 1 gmake: [cmTryCompileExec1657094144/fast] Error 2

Source: / /

include <openjpeg-2.2/openjpeg.h>

int main(){return 0;}

Determining if the include file stddef.h exists failed with the following output: Change Dir: /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec92422594/fast" /usr/bin/gmake -f CMakeFiles/cmTryCompileExec92422594.dir/build.make CMakeFiles/cmTryCompileExec92422594.dir/build gmake[1]: Entering directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CMak eFiles 1 Building C object CMakeFiles/cmTryCompileExec92422594.dir/CheckIncludeFile.c.o /usr/bin/cc -o CMakeFiles/cmTryCompileExec92422594.dir/CheckIncludeFile.c.o -c /root/install-tesseract-redhat-centos-master/lep tonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:20: fatal error: stddef .h: No such file or directory

include

                ^

compilation terminated. gmake[1]: Leaving directory `/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' gmake[1]: [CMakeFiles/cmTryCompileExec92422594.dir/CheckIncludeFile.c.o] Error 1 gmake: [cmTryCompileExec92422594/fast] Error 2

Determining if the system is big endian passed with the following output: Change Dir: /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec2844299631/fast" /usr/bin/gmake -f CMakeFiles/cmTryCompileExec2844299631.dir/build.make CMakeFiles/cmTryCompileExec2844299631.dir/build gmake[1]: Entering directory /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp/CMak eFiles 1 Building C object CMakeFiles/cmTryCompileExec2844299631.dir/TestEndianess.c.o /usr/bin/cc -o CMakeFiles/cmTryCompileExec2844299631.dir/TestEndianess.c.o -c /root/install-tesseract-redhat-centos-master/lept onica-1.74.1/build/CMakeFiles/CMakeTmp/TestEndianess.c Linking C executable cmTryCompileExec2844299631 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec2844299631.dir/link.txt --verbose=1 /usr/bin/cc CMakeFiles/cmTryCompileExec2844299631.dir/TestEndianess.c.o -o cmTryCompileExec2844299631 -rdynamic gmake[1]: Leaving directory/root/install-tesseract-redhat-centos-master/leptonica-1.74.1/build/CMakeFiles/CMakeTmp'

TestEndianess.c: / A 16 bit integer is required. / typedef unsigned short cmakeint16;

/ On a little endian machine, these 16bit ints will give "THIS IS LITTLE ENDIAN." On a big endian machine the characters will be exchanged pairwise. / const cmakeint16 info_little[] = {0x4854, 0x5349, 0x4920, 0x2053, 0x494c, 0x5454, 0x454c, 0x4520, 0x444e, 0x4149, 0x2e4e, 0x0000};

/ on a big endian machine, these 16bit ints will give "THIS IS BIG ENDIAN." On a little endian machine the characters will be exchanged pairwise. / const cmakeint16 info_big[] = {0x5448, 0x4953, 0x2049, 0x5320, 0x4249, 0x4720, 0x454e, 0x4449, 0x414e, 0x2e2e, 0x0000};

ifdef __CLASSIC_C__

int main(argc, argv) int argc; char *argv[];

else

int main(int argc, char *argv[])

endif

{ int require = 0; require += info_little[argc]; require += info_big[argc]; (void)argv; return require; }

zdenop commented 7 years ago

Do you have installed glibc-devel package?

DanBloomberg commented 7 years ago

Try 1.74.3, which I just put out.

If that doesn't work on your red hat system with either autotools or cmake (see the README.html for using cmake), then just use the hand-made local makefile:

make-for-local   (in root)
make  (in src)

which you can probably run just as is (if you have jpeg, png and tiff libraries)

mgrint2 commented 7 years ago

I tried on leptonica 1.74.4 but getting the same error , please help in this regard.

leptonica-1.74.4]# ./configure checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking how to print strings... printf 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... configure: error: in /root/leptonica-1.74.4': configure: error: cannot run C compiled programs. If you meant to cross compile, use--host'. See `config.log' for more details [root@delhi40 leptonica-1.74.4]# more config.log This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake.

It was created by leptonica configure 1.74.4, which was generated by GNU Autoconf 2.69. Invocation command line was

$ ./configure

---------

Platform.

---------

hostname = delhi40.bol.net.in uname -m = x86_64 uname -r = 3.10.0-123.el7.x86_64 uname -s = Linux uname -v = #1 SMP Mon Jun 30 12:09:22 UTC 2014

/usr/bin/uname -p = x86_64 /bin/uname -X = unknown

/bin/arch = x86_64 /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/lib64/qt-3.3/bin PATH: /root/perl5/bin PATH: /usr/local/sbin PATH: /usr/local/bin PATH: /usr/sbin PATH: /usr/bin PATH: /root/bin

-----------

Core tests.

-----------

configure:2398: checking build system type configure:2412: result: x86_64-unknown-linux-gnu configure:2432: checking host system type configure:2445: result: x86_64-unknown-linux-gnu configure:2486: checking how to print strings configure:2513: result: printf configure:2585: checking for gcc configure:2601: found /usr/bin/gcc c**onfigure:2612: result: gcc configure:2841: checking for C compiler version configure:2850: gcc --version >&5 gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-16) Copyright (C) 2013 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:2861: $? = 0 configure:2850: gcc -v >&5 Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.c om/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_at exit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-langua ges=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/B UILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat- linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux Thread model: posix gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) configure:2861: $? = 0 configure:2850: gcc -V >&5 gcc: error: unrecognized command line option '-V' gcc: fatal error: no input files compilation terminated. configure:2861: $? = 4 configure:2850: gcc -qversion >&5 gcc: error: unrecognized command line option '-qversion' gcc: fatal error: no input files compilation terminated.** configure:2861: $? = 4 configure:2881: checking whether the C compiler works configure:2903: gcc conftest.c >&5 configure:2907: $? = 0 configure:2955: result: yes configure:2958: checking for C compiler default output file name configure:2960: result: a.out configure:2966: checking for suffix of executables configure:2973: gcc -o conftest conftest.c >&5 configure:2977: $? = 0 configure:2999: result: configure:3021: checking whether we are cross compiling configure:3029: gcc -o conftest conftest.c >&5 In file included from conftest.c:9:0: /usr/include/stdio.h:33:21: fatal error: stddef.h: No such file or directory

include

                 ^

compilation terminated. configure:3033: $? = 1 configure:3040: ./conftest ./configure: line 3042: ./conftest: No such file or directory configure:3044: $? = 127 configure:3051: error: in /root/leptonica-1.74.4': configure:3053: error: cannot run C compiled programs. If you meant to cross compile, use--host'. See `config.log' for more details

----------------

Cache variables.

----------------

ac_cv_build=x86_64-unknown-linux-gnu ac_cv_env_CC_set= ac_cv_env_CC_value= ac_cv_env_CFLAGS_set= ac_cv_env_CFLAGS_value= ac_cv_env_CPPFLAGS_set= ac_cv_env_CPPFLAGS_value= ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_JPEG_CFLAGS_set= ac_cv_env_JPEG_CFLAGS_value= ac_cv_env_JPEG_LIBS_set= ac_cv_env_JPEG_LIBS_value= ac_cv_env_LDFLAGS_set= ac_cv_env_LDFLAGS_value= ac_cv_env_LIBJP2K_CFLAGS_set= ac_cv_env_LIBJP2K_CFLAGS_value= ac_cv_env_LIBJP2K_LIBS_set= ac_cv_env_LIBJP2K_LIBS_value= ac_cv_env_LIBPNG_CFLAGS_set= ac_cv_env_LIBPNG_CFLAGS_value= ac_cv_env_LIBPNG_LIBS_set= ac_cv_env_LIBPNG_LIBS_value= ac_cv_env_LIBS_set= ac_cv_env_LIBS_value= ac_cv_env_LIBTIFF_CFLAGS_set= ac_cv_env_LIBTIFF_CFLAGS_value= ac_cv_env_LIBTIFF_LIBS_set= ac_cv_env_LIBTIFF_LIBS_value= ac_cv_env_LIBWEBP_CFLAGS_set= ac_cv_env_LIBWEBP_CFLAGS_value= ac_cv_env_LIBWEBP_LIBS_set= ac_cv_env_LIBWEBP_LIBS_value= ac_cv_env_PKG_CONFIG_LIBDIR_set= ac_cv_env_PKG_CONFIG_LIBDIR_value= ac_cv_env_PKG_CONFIG_PATH_set= ac_cv_env_PKG_CONFIG_PATH_value= ac_cv_env_PKG_CONFIG_set= ac_cv_env_PKG_CONFIG_value= ac_cv_env_ZLIB_CFLAGS_set= ac_cv_env_ZLIB_CFLAGS_value= ac_cv_env_ZLIB_LIBS_set= ac_cv_env_ZLIB_LIBS_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_host=x86_64-unknown-linux-gnu ac_cv_prog_ac_ct_CC=gcc

-----------------

Output variables.

-----------------

ACLOCAL='' AMDEPBACKSLASH='' AMDEP_FALSE='' AMDEP_TRUE='' AMTAR='' AM_BACKSLASH='' AM_DEFAULT_V='' AM_DEFAULT_VERBOSITY='' AM_V='' APPLE_UNIVERSAL_BUILD='' AR='' AUTOCONF='' AUTOHEADER='' AUTOMAKE='' AWK='' CC='gcc' CCDEPMODE='' CFLAGS='' CPP='' CPPFLAGS='' CYGPATH_W='' DEFS='' DEPDIR='' DLLTOOL='' DSYMUTIL='' DUMPBIN='' ECHO_C='' ECHO_N='-n' ECHO_T='' EGREP='' ENABLE_PROGRAMS_FALSE='' ENABLE_PROGRAMS_TRUE='' ENDIANNESS='' EXEEXT='' FGREP='' GDI_LIBS='' GIFLIB_LIBS='' GREP='' HAVE_LIBGIF_FALSE='' HAVE_LIBGIF_TRUE='' HAVE_LIBJP2K_FALSE='' HAVE_LIBJP2K_TRUE='' HAVE_LIBWEBP_FALSE='' HAVE_LIBWEBP_TRUE='' INSTALL_DATA='' INSTALL_PROGRAM='' INSTALL_SCRIPT='' INSTALL_STRIP_PROGRAM='' JPEG_CFLAGS='' JPEG_LIBS='' LD='' LDFLAGS='' LIBJP2K_CFLAGS='' LIBJP2K_LIBS='' LIBM='' LIBOBJS='' LIBPNG_CFLAGS='' LIBPNG_LIBS='' LIBS='' LIBTIFF_CFLAGS='' LIBTIFF_LIBS='' LIBTOOL='' LIBWEBP_CFLAGS='' LIBWEBP_LIBS='' LIPO='' LN_S='' LTLIBOBJS='' MAKEINFO='' MANIFEST_TOOL='' MKDIR_P='' NM='' NMEDIT='' OBJDUMP='' OBJEXT='' OTOOL64='' OTOOL='' PACKAGE='' PACKAGE_BUGREPORT='' PACKAGE_NAME='leptonica' PACKAGE_STRING='leptonica 1.74.4' PACKAGE_TARNAME='leptonica' PACKAGE_URL='' PACKAGE_VERSION='1.74.4' PATH_SEPARATOR=':' PKG_CONFIG='' PKG_CONFIG_LIBDIR='' PKG_CONFIG_PATH='' RANLIB='' SED='' SET_MAKE='' SHELL='/bin/sh' STRIP='' VERSION='' ZLIB_CFLAGS='' ZLIB_LIBS='' ac_ct_AR='' ac_ct_CC='gcc' ac_ct_DUMPBIN='' amEXEEXT_FALSE='' am__EXEEXT_TRUE='' amfastdepCC_FALSE='' amfastdepCC_TRUE='' aminclude='' amisrc='' am__leading_dot='' amnodep='' amquote='' amtar='' am__untar='' bindir='${exec_prefix}/bin' build='x86_64-unknown-linux-gnu' build_alias='' build_cpu='x86_64' build_os='linux-gnu' build_vendor='unknown' datadir='${datarootdir}' datarootdir='${prefix}/share' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' dvidir='${docdir}' exec_prefix='NONE' host='x86_64-unknown-linux-gnu' host_alias='' host_cpu='x86_64' host_os='linux-gnu' host_vendor='unknown' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' install_sh='' libdir='${exec_prefix}/lib' libexecdir='${exec_prefix}/libexec' localedir='${datarootdir}/locale' localstatedir='${prefix}/var' mandir='${datarootdir}/man' mkdir_p='' oldincludedir='/usr/include' pdfdir='${docdir}' prefix='NONE' program_transform_name='s,x,x,' psdir='${docdir}' sbindir='${exec_prefix}/sbin' sharedstatedir='${prefix}/com' sysconfdir='${prefix}/etc' target_alias=''

-----------

confdefs.h.

-----------

/ confdefs.h /

define PACKAGE_NAME "leptonica"

define PACKAGE_TARNAME "leptonica"

define PACKAGE_VERSION "1.74.4"

define PACKAGE_STRING "leptonica 1.74.4"

define PACKAGE_BUGREPORT ""

define PACKAGE_URL ""

configure: exit 1 [root@delhi40 leptonica-1.74.4]#

stweil commented 7 years ago

/usr/include/stdio.h:33:21: fatal error: stddef.h: No such file or directory

That problem is not related to Leptonica. It looks like your C compiler installation is broken. Try to compile a simple hello-world.c and see whether it can include stdio.h.

And please don't paste all log outputs into the comment field. Either append the log files, or indent the log output using 4 spaces. That looks better.

mgrint2 commented 7 years ago

Tried to build leptonica with rpm n getting below erro pls help

[root@delhi40 ~]# rpm -Uvh leptonica-devel-1.72-2.el7.x86_64.rpm warning: leptonica-devel-1.72-2.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY error: Failed dependencies: leptonica(x86-64) = 1.72-2.el7 is needed by leptonica-devel-1.72-2.el7.x86_64 liblept.so.4()(64bit) is needed by leptonica-devel-1.72-2.el7.x86_64

[root@delhi40 ~]# yum install liblept Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile

DanBloomberg commented 7 years ago

this problem appears to be with the centos packaging, or your redhat configuration.