Use Cygwin to help compile a large number of C + + libraries under windows (with Make:command not found, and LIBTOOL.M4 and ltmain.sh solutions with a version mismatch problem)

Source: Internet
Author: User

In order to use a library, are to download the source code, and then according to the developer's Readme manual with GCC compiled, has been unable to use makefile feel very painful, such as the recent use of Zthread

Or do you blame yourself for being too dependent on the IDE?

Recently discovered that using Cygwin can use commands such as./configure, make, and feel gray often delighted, trying to compile the Zthread library (because I found that although I have manually compiled zthread with GCC but in the process of using, Zthread always print a lot of debug information to the console, presumably the problem of compile options, I do not know which header file to find the # define DEBUG, so I want to use make, See Using the configuration files written by the Zthread author and makefile to compile can solve the problem)

Just download down Cygwin just waiting to go up to Configure+make, the problem came, input./configure after a period of time to error (see red text):

$./configurechecking Build system Type ... i686-pc-cygwinchecking host system type ... i686-pc-cygwinchecking target syste M type ... i686-pc-cygwinchecking for a bsd-compatible install .../usr/bin/install-cchecking whether build environment is Sane yeschecking for gawk ... gawkchecking whether make sets $ (make) ... yesloading M4 macros from Sharechecking for g++. .. G++checking for C + + compiler default output file name ... a.exechecking whether the C + + compiler works ... yeschecking wheth Er we is cross compiling ... nochecking for suffix of executables .... exechecking for suffix of object files ... ochecking whether we are using the GNU C + + compiler ... yeschecking whether g++ a Ccepts-g ... yeschecking for style's include used by make ... Gnuchecking dependency style of g++ ... gcc3checking for gcc ... gccchecking whether we are using the GNU C compiler ... Yesc Hecking whether GCC accepts-g ... yeschecking for GCC option to accept ANSI C ... none neededchecking dependency style of G Cc... Gcc3chEcking How to run the C preprocessor ... gcc-echecking for egrep ... grep-echecking for ANSI C header files ... yeschecking For sys/types.h ... yeschecking for sys/stat.h ... yeschecking for stdlib.h ... yeschecking for string.h ... yeschecking for Memory.h ... yeschecking for strings.h ... yeschecking for inttypes.h ... yeschecking for stdint.h ... yeschecking for UNISTD. H ... yeschecking pthread.h usability ... nochecking pthread.h presence ... nochecking for pthread.h ... nochecking for sched_ Get_priority_max in-lrt ... nochecking for Sched_yield ... nochecking for Pthread_yield ... nochecking for Pthread_key_crea Te ... nochecking for pthread_keycreate ... nochecking for doxygen ... nodetecting for ftime () functionchecking sys/time.h US  Ability ... yeschecking sys/time.h presence ... yeschecking for sys/time.h ... yeschecking for _ftime () ... yeschecking how to Run the C + + preprocessor ... g++-echecking for ANSI C header files ... (cached) yeschecking errno.h usability ... yeschecking errno.h presence ... yeSchecking for errno.h ... yeschecking for target implementation ... compile-time guesschecking for sigsetjmp () ... Nocheckin G for _beginthreadex () ... nochecking for a sed this does not truncate output .../usr/bin/sedchecking for LD used by GCC. . D:/mingw/mingw32/bin/ld.exechecking if the linker (D:/mingw/mingw32/bin/ld.exe) is GNU ld ... yeschecking for D:/mingw/mingw32/bin/ld.exe option to reload object files ...-rchecking for bsd-compatible nm .../cygdrive /d/mingw/bin/nm-bchecking whether Ln-s works ... yeschecking how to recognise dependent libraries ... file_magic ^x86 arch Ive import|^x86 dllchecking dlfcn.h usability ... nochecking dlfcn.h presence ... nochecking for dlfcn.h ... nochecking how T  o Run the C + + preprocessor ... g++-echecking for G77 ... nochecking for f77 ... nochecking for xlf ... nochecking for frt ... Nochecking for pgf77 ... nochecking for fort77 ... nochecking for fl32 ... nochecking for af77 ... nochecking for f90 ... noch Ecking for xlf90 ... nochecking for pgf90 ... nochecking For epcf90 ... nochecking for f95 ... nochecking for fort ... nochecking for xlf95 ... nochecking for IFC ... nochecking for E FC ... nochecking for pgf95 ... nochecking for lf95 ... nochecking for Gfortran ... nochecking whether we are using the GNU Fo  Rtran77compiler nochecking Whether accepts-g ... nochecking the maximum length of command line arguments ...8192checking command to Parse/cygdrive/d/mingw/bin/nm-b output from GCC object ... okchecking for objdir .... Libschecking for ar ... Archecking for ranlib ... ranlibchecking for strip ... stripchecking for correct ltmain.sh version ... Grep:character class Syntax is[[: Space:]], not[: space:]No* * * Gentoo sanity check failed! ****** libtool.m4 and ltmain.sh have a version mismatch! ****** (libtool.m4 = 1.5.10, ltmain.sh =) ***please run:libtoolize--copy--forceif appropriate, please contact the maintainer of this Package (or your distribution) for help.

Input: libtoolize--copy--force hint Libtoolize:command not found

Do how Search for the related problems, it is because the installation of Cygwin is not installed Libtool

Rerun Cygwin-setup (note that without uninstalling, rerun Setup, select the package you do not have installed), search for Libtool, tick and install, problem solving

Then run Libtoolize--copy--force again, and error:

 $ libtoolize--copy--forcelibtoolize:putting auxiliary files in '. libtoolize:copying file './ltmain.sh ' libtoolize:you should add the contents of the follow ing files to ' aclocal.m4 ': libtoolize: '/usr/share/aclocal/libtool.m4 ' libtoolize: '/USR/SHARE/ACLOCAL/LTOPTIONS.M4 ' Libtoolize: '/usr/share/aclocal/ltversion.m4 ' libtoolize: '/usr/share/aclocal/ltsugar.m4 ' libtoolize: '/usr/share/ Aclocal/lt~obsolete.m4 '  libtoolize:consider adding ' Ac_config_macro_dir ( [ "  ) ' To Configure.ac andlibtoolize:rerunning libtoolize ,  to keep the correct Libtool Macros In-tree.libtoolize:consider Adding '-I M4 ' to Aclocal_amflags in makefile.am.  

Another search, in this blog said is because not installed autoconf reasons, and then go back to install autoconf,

Try it once more./configure

Then enter make install and prompt Make:command not found

Or the same routine, check the make package and install it.

Use Cygwin to help compile a large number of C + + libraries under windows (with Make:command not found, and LIBTOOL.M4 and ltmain.sh solutions with a version mismatch problem)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.