do a brew install gcc@6 it will install the right version of the compiler Le lundi 19 mars 2018 00:47:30 UTC, Richard McAlexander a écrit : > > That's the code recommended on the tesseract help page. > > What is weird is that it seems I do have g++ installed. > > If I type in the terminal 'g++ -v', this is what it prints: > > configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr > --with-gxx-include-dir=/usr/include/c++/4.2.1 > > Apple LLVM version 9.0.0 (clang-900.0.38) > > Target: x86_64-apple-darwin17.4.0 > > Thread model: posix > > InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/ > XcodeDefault.xctoolchain/usr/bin > > I also ran a simple hello world program called hw.cpp. I can run g++ > hw.cpp just fine. > > But for some reason it won't create an executable? Help! > > On Saturday, March 17, 2018 at 4:18:08 PM UTC-4, zdenop wrote: >> >> Why you specify compiler (especially if it can not be found)? >> >> Zdenko >> >> 2018-03-17 19:07 GMT+01:00 Richard McAlexander <richardmc...@gmail.com>: >> >>> Thanks. Anyone know how I can fix that? I have gcc/Xcode installed, not >>> sure why its not finding the command. >>> >>> On Saturday, March 17, 2018 at 9:10:38 AM UTC-4, zdenop wrote: >>>> >>>> you specified that c++ compiler is: g++-6 >>>> and your system reports: >>>> g++-6: command not found >>>> >>>> Zdenko >>>> >>>> 2018-03-17 11:57 GMT+01:00 Richard McAlexander <richardmc...@gmail.com> >>>> : >>>> >>>>> I'm having trouble compiling Tesseract 4.0. I have all dependencies >>>>> installed. The error occurs when after I run ./autogen.sh in the >>>>> terminal--that works fine. But when I run ./config I get this error: >>>>> >>>>> ./configure CC=gcc-6 CXX=g++-6 CPPFLAGS=-I/usr/local/opt/icu4c/include >>>>> LDFLAGS=-L/usr/local/opt/icu4c/lib PKG_CONFIG_PATH=/usr/local/lib/ >>>>> pkgconfig >>>>> >>>>> ./configure: line 5: .: filename argument required >>>>> >>>>> .: usage: . filename [arguments] >>>>> >>>>> Ok. Not sure what this means so I open the configure executable and I >>>>> find a . on line 5. I comment it out, then re-run. Now I get this error: >>>>> >>>>> ./configure CC=gcc-6 CXX=g++-6 CPPFLAGS=-I/usr/local/opt/icu4c/include >>>>> LDFLAGS=-L/usr/local/opt/icu4c/lib PKG_CONFIG_PATH=/usr/local/lib/ >>>>> pkgconfig >>>>> >>>>> checking whether the C++ compiler works... no >>>>> >>>>> configure: error: in `/Users/richardmcalexander/tesseract': >>>>> >>>>> configure: error: C++ compiler cannot create executables >>>>> >>>>> See `config.log' for more details >>>>> >>>>> >>>>> I reinstalled gcc, but did not fix it. >>>>> >>>>> The contents for config.log are pasted below: >>>>> >>>>> This file contains any messages produced by compilers while >>>>> running configure, to aid debugging if configure makes a mistake. >>>>> >>>>> It was created by tesseract configure -n 4.0.0-beta.1-27-g023e1 >>>>> , which was >>>>> generated by GNU Autoconf 2.69. Invocation command line was >>>>> >>>>> $ ./configure CC=gcc-6 CXX=g++-6 >>>>> CPPFLAGS=-I/usr/local/opt/icu4c/include >>>>> LDFLAGS=-L/usr/local/opt/icu4c/lib >>>>> PKG_CONFIG_PATH=/usr/local/lib/pkgconfig >>>>> >>>>> ## --------- ## >>>>> ## Platform. ## >>>>> ## --------- ## >>>>> >>>>> hostname = Richards-Air.fios-router.home >>>>> uname -m = x86_64 >>>>> uname -r = 17.4.0 >>>>> uname -s = Darwin >>>>> uname -v = Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; >>>>> root:xnu-4570.41.2~1/RELEASE_X86_64 >>>>> >>>>> /usr/bin/uname -p = i386 >>>>> /bin/uname -X = unknown >>>>> >>>>> /bin/arch = unknown >>>>> /usr/bin/arch -k = unknown >>>>> /usr/convex/getsysinfo = unknown >>>>> /usr/bin/hostinfo = Mach kernel version: >>>>> Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; >>>>> root:xnu-4570.41.2~1/RELEASE_X86_64 >>>>> Kernel configured for up to 4 processors. >>>>> 2 processors are physically available. >>>>> 4 processors are logically available. >>>>> Processor type: x86_64h (Intel x86-64h Haswell) >>>>> Processors active: 0 1 2 3 >>>>> Primary memory available: 8.00 gigabytes >>>>> Default processor set: 406 tasks, 2244 threads, 4 processors >>>>> Load average: 2.20, Mach factor: 2.02 >>>>> /bin/machine = unknown >>>>> /usr/bin/oslevel = unknown >>>>> /bin/universe = unknown >>>>> >>>>> PATH: /Users/richardmcalexander/anaconda3/bin >>>>> PATH: /Users/richardmcalexander/anaconda/bin >>>>> PATH: /Library/Frameworks/Python.framework/Versions/3.6/bin >>>>> PATH: /Library/Frameworks/Python.framework/Versions/2.7/bin >>>>> PATH: /Library/Frameworks/Python.framework/Versions/3.6/bin >>>>> PATH: /Users/richardmcalexander/anaconda/bin >>>>> PATH: /Users/richardmcalexander/anaconda/bin >>>>> PATH: /opt/local/bin >>>>> PATH: /opt/local/sbin >>>>> PATH: /usr/local/bin >>>>> PATH: /usr/bin >>>>> PATH: /bin >>>>> PATH: /usr/sbin >>>>> PATH: /sbin >>>>> PATH: /Library/TeX/texbin >>>>> PATH: /opt/X11/bin >>>>> >>>>> >>>>> ## ----------- ## >>>>> ## Core tests. ## >>>>> ## ----------- ## >>>>> >>>>> configure:2702: checking for C++ compiler version >>>>> configure:2711: g++-6 --version >&5 >>>>> ./configure: line 2713: g++-6: command not found >>>>> configure:2722: $? = 127 >>>>> configure:2711: g++-6 -v >&5 >>>>> ./configure: line 2713: g++-6: command not found >>>>> configure:2722: $? = 127 >>>>> configure:2711: g++-6 -V >&5 >>>>> ./configure: line 2713: g++-6: command not found >>>>> configure:2722: $? = 127 >>>>> configure:2711: g++-6 -qversion >&5 >>>>> ./configure: line 2713: g++-6: command not found >>>>> configure:2722: $? = 127 >>>>> configure:2742: checking whether the C++ compiler works >>>>> configure:2764: g++-6 -I/usr/local/opt/icu4c/include >>>>> -L/usr/local/opt/icu4c/lib conftest.cpp >&5 >>>>> ./configure: line 2766: g++-6: command not found >>>>> configure:2768: $? = 127 >>>>> configure:2806: result: no >>>>> configure: failed program was: >>>>> | /* confdefs.h */ >>>>> | #define PACKAGE_NAME "tesseract" >>>>> | #define PACKAGE_TARNAME "tesseract" >>>>> | #define PACKAGE_VERSION "-n 4.0.0-beta.1-27-g023e1 >>>>> | " >>>>> | #define PACKAGE_STRING "tesseract -n 4.0.0-beta.1-27-g023e1 >>>>> | " >>>>> | #define PACKAGE_BUGREPORT " >>>>> https://github.com/tesseract-ocr/tesseract/issues" >>>>> | #define PACKAGE_URL "https://github.com/tesseract-ocr/tesseract/" >>>>> | /* end confdefs.h. */ >>>>> | >>>>> | int >>>>> | main () >>>>> | { >>>>> | >>>>> | ; >>>>> | return 0; >>>>> | } >>>>> configure:2811: error: in `/Users/richardmcalexander/tesseract': >>>>> configure:2813: error: C++ compiler cannot create executables >>>>> See `config.log' for more details >>>>> >>>>> ## ---------------- ## >>>>> ## Cache variables. ## >>>>> ## ---------------- ## >>>>> >>>>> ac_cv_env_CCC_set= >>>>> ac_cv_env_CCC_value= >>>>> ac_cv_env_CC_set=set >>>>> ac_cv_env_CC_value=gcc-6 >>>>> ac_cv_env_CFLAGS_set= >>>>> ac_cv_env_CFLAGS_value= >>>>> ac_cv_env_CPPFLAGS_set=set >>>>> ac_cv_env_CPPFLAGS_value=-I/usr/local/opt/icu4c/include >>>>> ac_cv_env_CXXCPP_set= >>>>> ac_cv_env_CXXCPP_value= >>>>> ac_cv_env_CXXFLAGS_set= >>>>> ac_cv_env_CXXFLAGS_value= >>>>> ac_cv_env_CXX_set=set >>>>> ac_cv_env_CXX_value=g++-6 >>>>> ac_cv_env_ICU_I18N_CFLAGS_set= >>>>> ac_cv_env_ICU_I18N_CFLAGS_value= >>>>> ac_cv_env_ICU_I18N_LIBS_set= >>>>> ac_cv_env_ICU_I18N_LIBS_value= >>>>> ac_cv_env_ICU_UC_CFLAGS_set= >>>>> ac_cv_env_ICU_UC_CFLAGS_value= >>>>> ac_cv_env_ICU_UC_LIBS_set= >>>>> ac_cv_env_ICU_UC_LIBS_value= >>>>> ac_cv_env_LDFLAGS_set=set >>>>> ac_cv_env_LDFLAGS_value=-L/usr/local/opt/icu4c/lib >>>>> ac_cv_env_LEPTONICA_CFLAGS_set= >>>>> ac_cv_env_LEPTONICA_CFLAGS_value= >>>>> ac_cv_env_LEPTONICA_LIBS_set= >>>>> ac_cv_env_LEPTONICA_LIBS_value= >>>>> ac_cv_env_LIBS_set= >>>>> ac_cv_env_LIBS_value= >>>>> ac_cv_env_LT_SYS_LIBRARY_PATH_set= >>>>> ac_cv_env_LT_SYS_LIBRARY_PATH_value= >>>>> ac_cv_env_PKG_CONFIG_LIBDIR_set= >>>>> ac_cv_env_PKG_CONFIG_LIBDIR_value= >>>>> ac_cv_env_PKG_CONFIG_PATH_set=set >>>>> ac_cv_env_PKG_CONFIG_PATH_value=/usr/local/lib/pkgconfig >>>>> ac_cv_env_PKG_CONFIG_set= >>>>> ac_cv_env_PKG_CONFIG_value= >>>>> ac_cv_env_build_alias_set= >>>>> ac_cv_env_build_alias_value= >>>>> ac_cv_env_cairo_CFLAGS_set= >>>>> ac_cv_env_cairo_CFLAGS_value= >>>>> ac_cv_env_cairo_LIBS_set= >>>>> ac_cv_env_cairo_LIBS_value= >>>>> ac_cv_env_host_alias_set= >>>>> ac_cv_env_host_alias_value= >>>>> ac_cv_env_pango_CFLAGS_set= >>>>> ac_cv_env_pango_CFLAGS_value= >>>>> ac_cv_env_pango_LIBS_set= >>>>> ac_cv_env_pango_LIBS_value= >>>>> ac_cv_env_target_alias_set= >>>>> ac_cv_env_target_alias_value= >>>>> >>>>> ## ----------------- ## >>>>> ## Output variables. ## >>>>> ## ----------------- ## >>>>> >>>>> ' >>>>> ' >>>>> ACLOCAL='' >>>>> ADD_RT_FALSE='' >>>>> ADD_RT_TRUE='' >>>>> AMDEPBACKSLASH='' >>>>> AMDEP_FALSE='' >>>>> AMDEP_TRUE='' >>>>> AMTAR='' >>>>> AM_BACKSLASH='' >>>>> AM_CPPFLAGS='' >>>>> AM_DEFAULT_V='' >>>>> AM_DEFAULT_VERBOSITY='' >>>>> AM_LDFLAGS='' >>>>> AM_V='' >>>>> AR='' >>>>> AUTOCONF='' >>>>> AUTOHEADER='' >>>>> AUTOMAKE='' >>>>> AVX2_OPT_FALSE='' >>>>> AVX2_OPT_TRUE='' >>>>> AVX_OPT_FALSE='' >>>>> AVX_OPT_TRUE='' >>>>> AWK='' >>>>> CC='gcc-6' >>>>> CCDEPMODE='' >>>>> CFLAGS='' >>>>> CPPFLAGS='-I/usr/local/opt/icu4c/include' >>>>> CXX='g++-6' >>>>> CXXCPP='' >>>>> CXXDEPMODE='' >>>>> CXXFLAGS='' >>>>> CYGPATH_W='' >>>>> DEFS='' >>>>> DEPDIR='' >>>>> DLLTOOL='' >>>>> DSYMUTIL='' >>>>> DUMPBIN='' >>>>> ECHO_C='\c' >>>>> ECHO_N='' >>>>> ECHO_T='' >>>>> EGREP='' >>>>> EMBEDDED_FALSE='' >>>>> EMBEDDED_TRUE='' >>>>> ENABLE_TRAINING_FALSE='' >>>>> ENABLE_TRAINING_TRUE='' >>>>> EXEEXT='' >>>>> FGREP='' >>>>> FRAMEWORK_OPENCL='' >>>>> GENERIC_API_VERSION='' >>>>> GENERIC_LIBRARY_NAME='' >>>>> GENERIC_LIBRARY_VERSION='' >>>>> GENERIC_MAJOR_VERSION='' >>>>> GENERIC_RELEASE='' >>>>> GENERIC_VERSION='' >>>>> GRAPHICS_DISABLED_FALSE='' >>>>> GRAPHICS_DISABLED_TRUE='' >>>>> GREP='' >>>>> ICU_I18N_CFLAGS='' >>>>> ICU_I18N_LIBS='' >>>>> ICU_UC_CFLAGS='' >>>>> ICU_UC_LIBS='' >>>>> INSTALL_DATA='' >>>>> INSTALL_PROGRAM='' >>>>> INSTALL_SCRIPT='' >>>>> INSTALL_STRIP_PROGRAM='' >>>>> LD='' >>>>> LDFLAGS='-L/usr/local/opt/icu4c/lib' >>>>> LEPTONICA_CFLAGS='' >>>>> LEPTONICA_LIBS='' >>>>> LIBOBJS='' >>>>> LIBS='' >>>>> LIBTOOL='' >>>>> LIPO='' >>>>> LN_S='' >>>>> LTLIBOBJS='' >>>>> LT_SYS_LIBRARY_PATH='' >>>>> MAINT='' >>>>> MAINTAINER_MODE_FALSE='' >>>>> MAINTAINER_MODE_TRUE='' >>>>> MAKEINFO='' >>>>> MANIFEST_TOOL='' >>>>> MINGW_FALSE='' >>>>> MINGW_TRUE='' >>>>> MKDIR_P='' >>>>> NM='' >>>>> NMEDIT='' >>>>> NO_TESSDATA_PREFIX_FALSE='' >>>>> NO_TESSDATA_PREFIX_TRUE='' >>>>> OBJDUMP='' >>>>> OBJEXT='' >>>>> OPENCL_CPPFLAGS='' >>>>> OPENCL_LDFLAGS='' >>>>> OPENMP_CXXFLAGS='' >>>>> OSX_FALSE='' >>>>> OSX_TRUE='' >>>>> OTOOL64='' >>>>> OTOOL='' >>>>> PACKAGE='' >>>>> PACKAGE_BUGREPORT='https://github.com/tesseract-ocr/tesseract/issues' >>>>> PACKAGE_DATE='' >>>>> PACKAGE_NAME='tesseract' >>>>> PACKAGE_STRING='tesseract -n 4.0.0-beta.1-27-g023e1 >>>>> PACKAGE_TARNAME='tesseract' >>>>> PACKAGE_URL='https://github.com/tesseract-ocr/tesseract/' >>>>> PACKAGE_VERSION='-n 4.0.0-beta.1-27-g023e1 >>>>> PACKAGE_YEAR='' >>>>> PATH_SEPARATOR=':' >>>>> PKG_CONFIG='' >>>>> PKG_CONFIG_LIBDIR='' >>>>> PKG_CONFIG_PATH='/usr/local/lib/pkgconfig' >>>>> RANLIB='' >>>>> SED='' >>>>> SET_MAKE='' >>>>> SHELL='/bin/sh' >>>>> SSE41_OPT_FALSE='' >>>>> SSE41_OPT_TRUE='' >>>>> STRIP='' >>>>> T_WIN_FALSE='' >>>>> T_WIN_TRUE='' >>>>> USE_OPENCL_FALSE='' >>>>> USE_OPENCL_TRUE='' >>>>> VERSION='' >>>>> VISIBILITY_FALSE='' >>>>> VISIBILITY_TRUE='' >>>>> ac_ct_AR='' >>>>> ac_ct_CC='' >>>>> ac_ct_CXX='' >>>>> ac_ct_DUMPBIN='' >>>>> am__EXEEXT_FALSE='' >>>>> am__EXEEXT_TRUE='' >>>>> am__fastdepCC_FALSE='' >>>>> am__fastdepCC_TRUE='' >>>>> am__fastdepCXX_FALSE='' >>>>> am__fastdepCXX_TRUE='' >>>>> am__include='' >>>>> am__isrc='' >>>>> am__leading_dot='' >>>>> am__nodep='' >>>>> am__quote='' >>>>> am__tar='' >>>>> am__untar='' >>>>> bindir='${exec_prefix}/bin' >>>>> build='' >>>>> build_alias='' >>>>> build_cpu='' >>>>> build_os='' >>>>> build_vendor='' >>>>> cairo_CFLAGS='' >>>>> cairo_LIBS='' >>>>> datadir='${datarootdir}' >>>>> datarootdir='${prefix}/share' >>>>> docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' >>>>> dvidir='${docdir}' >>>>> exec_prefix='NONE' >>>>> host='' >>>>> host_alias='' >>>>> host_cpu='' >>>>> host_os='' >>>>> host_vendor='' >>>>> 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' >>>>> pango_CFLAGS='' >>>>> pango_LIBS='' >>>>> 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 "tesseract" >>>>> #define PACKAGE_TARNAME "tesseract" >>>>> #define PACKAGE_VERSION "-n 4.0.0-beta.1-27-g023e1 >>>>> " >>>>> #define PACKAGE_STRING "tesseract -n 4.0.0-beta.1-27-g023e1 >>>>> " >>>>> #define PACKAGE_BUGREPORT " >>>>> https://github.com/tesseract-ocr/tesseract/issues" >>>>> #define PACKAGE_URL "https://github.com/tesseract-ocr/tesseract/" >>>>> >>>>> configure: exit 77 >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "tesseract-ocr" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to tesseract-oc...@googlegroups.com. >>>>> To post to this group, send email to tesser...@googlegroups.com. >>>>> Visit this group at https://groups.google.com/group/tesseract-ocr. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/tesseract-ocr/d3baeeac-56c5-47a8-bdb0-c5d46a345d76%40googlegroups.com >>>>> >>>>> <https://groups.google.com/d/msgid/tesseract-ocr/d3baeeac-56c5-47a8-bdb0-c5d46a345d76%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "tesseract-ocr" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to tesseract-oc...@googlegroups.com. >>> To post to this group, send email to tesser...@googlegroups.com. >>> Visit this group at https://groups.google.com/group/tesseract-ocr. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/tesseract-ocr/72890a78-5862-4bf5-9a63-ed6e3f2307e6%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/tesseract-ocr/72890a78-5862-4bf5-9a63-ed6e3f2307e6%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >>
-- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscr...@googlegroups.com. To post to this group, send email to tesseract-ocr@googlegroups.com. Visit this group at https://groups.google.com/group/tesseract-ocr. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/91ae0502-6dc9-45fa-a148-d9f0ca5bdc4a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.