I tried to install a library (RNNoise) on Cygwin with ./autogen.s - ./configure - make - make install.
Below is the result I got:
User#LAPTOP-R9ABJF4O /cygdrive/c/Windows/System32/rnnoise
$ ./autogen.sh
Updating build configuration files for rnnoise, please wait....
libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: linking file 'm4/libtool.m4'
libtoolize: linking file 'm4/ltoptions.m4'
libtoolize: linking file 'm4/ltsugar.m4'
libtoolize: linking file 'm4/ltversion.m4'
libtoolize: linking file 'm4/lt~obsolete.m4'
configure.ac:19: installing './compile'
configure.ac:22: installing './missing'
Makefile.am: installing './depcomp'
User#LAPTOP-R9ABJF4O /cygdrive/c/Windows/System32/rnnoise
$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/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 minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... 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 a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for inline... inline
checking build system type... x86_64-pc-cygwin
checking host system type... x86_64-pc-cygwin
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/x86_64-pc-cygwin/bin/ld.exe
checking if the linker (/usr/x86_64-pc-cygwin/bin/ld.exe) 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... 8192
checking how to convert x86_64-pc-cygwin file names to x86_64-pc-cygwin format... func_convert_file_noop
checking how to convert x86_64-pc-cygwin file names to toolchain format... func_convert_file_noop
checking for /usr/x86_64-pc-cygwin/bin/ld.exe option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
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 object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
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 whether make supports nested variables... (cached) yes
checking if gcc supports -pedantic flag... yes
checking if gcc supports -Wall flag... yes
checking if gcc supports -Wextra flag... yes
checking if gcc supports -Wno-sign-compare flag... yes
checking if gcc supports -Wno-parentheses flag... yes
checking if gcc supports -Wno-long-long flag... yes
checking for gcc way to treat warnings as errors... -Werror
checking if gcc supports __attribute__(( visibility("default") ))... yes
checking if gcc supports -fvisibility=hidden... yes
checking for doxygen... no
checking for dot... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating rnnoise.pc
config.status: creating rnnoise-uninstalled.pc
config.status: creating doc/Doxyfile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
configure:
------------------------------------------------------------------------
rnnoise unknown: Automatic configuration OK.
Assertions ................... no
Hidden visibility ............ yes
API code examples ............ yes
API documentation ............ yes
------------------------------------------------------------------------
User#LAPTOP-R9ABJF4O /cygdrive/c/Windows/System32/rnnoise
$ make
make all-am
make[1]: Entering directory '/cygdrive/c/Windows/System32/rnnoise'
make[1]: Leaving directory '/cygdrive/c/Windows/System32/rnnoise'
User#LAPTOP-R9ABJF4O /cygdrive/c/Windows/System32/rnnoise
$ make install
make[1]: Entering directory '/cygdrive/c/Windows/System32/rnnoise'
/usr/bin/mkdir -p '/usr/local/lib'
/bin/sh ./libtool --mode=install /usr/bin/install -c librnnoise.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/librnnoise.dll.a /usr/local/lib/librnnoise.dll.a
libtool: install: base_file=`basename librnnoise.la`
libtool: install: dlpath=`/bin/sh 2>&1 -c '. .libs/'librnnoise.la'i; echo cygrnnoise-0.dll'`
libtool: install: dldir=/usr/local/lib/`dirname ../bin/cygrnnoise-0.dll`
libtool: install: test -d /usr/local/lib/../bin || mkdir -p /usr/local/lib/../bin
libtool: install: /usr/bin/install -c .libs/cygrnnoise-0.dll /usr/local/lib/../bin/cygrnnoise-0.dll
libtool: install: chmod a+x /usr/local/lib/../bin/cygrnnoise-0.dll
libtool: install: if test -n '' && test -n 'strip --strip-unneeded'; then eval 'strip --strip-unneeded /usr/local/lib/../bin/cygrnnoise-0.dll' || exit 0; fi
libtool: install: /usr/bin/install -c .libs/librnnoise.lai /usr/local/lib/librnnoise.la
libtool: install: /usr/bin/install -c .libs/librnnoise.a /usr/local/lib/librnnoise.a
libtool: install: chmod 644 /usr/local/lib/librnnoise.a
libtool: install: ranlib /usr/local/lib/librnnoise.a
/usr/bin/mkdir -p '/usr/local/share/doc/rnnoise'
/usr/bin/install -c -m 644 COPYING AUTHORS README '/usr/local/share/doc/rnnoise'
/usr/bin/mkdir -p '/usr/local/include'
/usr/bin/install -c -m 644 include/rnnoise.h '/usr/local/include'
/usr/bin/mkdir -p '/usr/local/lib/pkgconfig'
/usr/bin/install -c -m 644 rnnoise.pc '/usr/local/lib/pkgconfig'
make[1]: Leaving directory '/cygdrive/c/Windows/System32/rnnoise'
It seems that everything works well. However, I couldn't find the library (rnnoise). I searched through pip list and imp.find_module('rnnoise').
Is the library installed successfully? How do I know the name or path of the library?
I am running the ./configure command before building the OpenFST package, which uses autoconf.
The script fails when checking for the ar interface:
$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
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... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... unknown
configure: error: could not determine ar interface
This seems related to this question but I can't understand how to make the script use the correct MacOS file so that configuration would work.
Looking inside config.log, turns out the problem was related to using the wrong ar and wrong ranlib located in /opt/local/bin/ instead of the ones in /usr/bin.
Running this solved the issue:
sudo mv /opt/local/bin/ranlib /opt/local/bin/ranlib-backup-2019-02-09
sudo mv /opt/local/bin/ar /opt/local/bin/ar-backup-2019-02-09
Based on suggestion in this discussion:
https://github.com/commercialhaskell/stack/issues/4380
Moving any system files around sounds like trouble.
I suggest to do the following, which worked in my case (appveyor testing under MacOS with gcc-6/gcc-8):
# work around bugs in this environment
export TMPDIR=$PREFIX/tmp # was set to something below the user
# have a folder with the files we're interested in linked ...
mkdir -p $PREFIX/tmp/sysbin
ln -s $PREFIX/tmp/sysbin/ar /usr/bin/ar
ln -s $$PREFIX/tmp/sysbin/ranlib /usr/bin/ranlib
# and let it be used
export PATH=$PREFIX/tmp/sysbin:$PATH
../configure
Whenever I run the configure script of GNU-Autotools by running the ./configure command. It consume all my RAM(4GB) very fast immediately during 5 second then hang my computer. I use Linux system and I test this problem with different GNU source packages and the result is same. You can see an example of running configure below:
I break the process by CTRL+C when the process reach to "checking for BSD- or MS-compatible name lister (nm)...".
My config.log: http://ashavahishta.persiangig.com/document/Text/config.log
$ ./configure
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 whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
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... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) 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 pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for gcc... gcc
checking whether we are using the GNU Objective C compiler... yes
checking whether gcc accepts -g... yes
checking dependency style of gcc... gcc3
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 a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)...
After all checking, Here Memory Finished and I break the Process by CTRL+C to Rescue My Computer.
First I reinstalled the binutils to solve the problem with nm but nothing didn't changed then I removed binutils and it's dependencies and I install it again and now everything works perfect.
I didn't find what was happened about nm but I just found that was the problem during configure process.
I hope this answer help other people too.
I have setup autools for the project: https://github.com/pmatos/OpenSMT2
There's nothing special about the Makefile.am:
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = subdir-objects
SUBDIRS = src
bin_PROGRAMS = opensmt
noinst_PROGRAMS = testsimplify testegraph1 testegraph3 testegraph4 testegraph5 gctest
opensmt_SOURCES = src/bin/opensmt.C
opensmt_LDFLAGS =
# -lgmpxx -lgmp
testsimplify_SOURCES = src/logics/TestSimplify.C
testegraph1_SOURCES = src/egraph/test.C
testegraph3_SOURCES = src/egraph/test3.C
testegraph4_SOURCES = src/egraph/test4.C
testegraph5_SOURCES = src/egraph/test5.C
gctest_SOURCES = src/egraph/GCTest.C GCTest.h
LDADD = src/libopensmt.la -lgmpxx -lgmp
or configure.ac:
AC_PREREQ(2.69)
AC_INIT([OpenSMT 2.0.svnversion], [(unstable)], [antti.hyvarinen#gmail.com])
config_flags="$*"
AC_DEFINE_UNQUOTED([CONFIG_FLAGS], ["$config_flags"], [Flags passed to configure])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE
AC_DISABLE_SHARED
AC_PROG_LIBTOOL
AC_PROG_CC
AC_PROG_CXX
AC_PROG_YACC
AM_PROG_LEX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
LT_INIT
AC_ARG_ENABLE(library,
AC_HELP_STRING([--enable-library],
[produces OpenSMT libraries (default=no)]),
want_library="yes",
want_library="no")
AM_CONDITIONAL([WANT_LIBRARY], [test "$want_library" = "yes"])
#
# Statically linked version
#
#AC_ARG_ENABLE(staticlibs,
# AC_HELP_STRING([--enable-staticlibs],
# [enable statically linked libraries (-static) #<:#yes#:>#)]),
# [:],
# [enable_staticlibs="no"])
#
#AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = "yes"])
#if test $enable_staticlibs = "yes" ; then
# config_staticlibs="-static"
#else
# config_static=""
#fi
#echo "Compile statically linked libraries... ${enable_staticlibs}"
#
#
# Profiling
#
AC_ARG_ENABLE(profiling,
AC_HELP_STRING([--enable-profiling],
[enable profiling (-pg) #<:#no#:>#]),
[:],
enable_profiling="no")
if test $enable_profiling = "yes" ;
then
config_profiling="-pg"
elif test $enable_profiling = "no" ;
then
config_profiling=""
fi
AM_CONDITIONAL([ENABLE_PROFILING], [test "$enable_profiling" = "yes"])
echo "Compile with profiling... ${enable_profiling}"
#
# Optimization
#
AC_ARG_ENABLE(optimization,
AC_HELP_STRING([--enable-optimization],
[enable optimization by compiler (-O3) #<:#yes#:>#]),
[:],
[enable_optimization="yes"])
if test $enable_optimization = "yes" ;
then
config_optimization_compiler="-O3"
config_optimization_preproc="-DOPTIMIZE -DNDEBUG"
else
config_optimization_compiler="-O0"
config_optimization_preproc=""
fi
AM_CONDITIONAL([ENABLE_OPTIMIZATION], [test "$enable_optimization" = "yes"])
echo "Setting preprocessor optimization flags to... ${config_optimization_preproc:-none}"
echo "Setting compiler optimization flags to... ${config_optimization_compiler:-none}"
#
# Proof production
#
AC_ARG_ENABLE(proof,
AC_HELP_STRING([--enable-proof],
[enable proof production #<:#no#:>#)]),
[:],
[enable_proof="no"])
if test $enable_proof = "yes" ;
then
config_proof="-DPRODUCE_PROOF"
else
config_proof=""
fi
AM_CONDITIONAL([ENABLE_PROOF], [test "$enable_proof" = "yes"])
echo "Produce proofs... ${enable_proof}"
#
# Enable Custom memory allocation for forbid lists
#
AC_ARG_ENABLE(custom_memalloc,
AC_HELP_STRING([--enable-custom_memalloc],
[enable custom memory allocation for forbid lists#<:#yes#:>#]),
[:],
[enable_custom_memalloc="yes"])
if test $enable_custom_memalloc = "yes" ;
then
config_custom_memalloc="-DCUSTOM_EL_ALLOC"
else
config_custom_memalloc=""
fi
AM_CONDITIONAL([ENABLE_CUSTOMMEMALLOC], [test "$enable_custom_memalloc" = "yes"])
echo "Use custom memory allocation for forbid lists... $enable_custom_memalloc"
#
# Enable Pedantic Assertion Checking
#
AC_ARG_ENABLE(pedantic,
AC_HELP_STRING([--enable-pedantic],
[enable pedantic assertion checking #<:#no#:>#]),
[:],
[enable_pedantic="no"])
if test $enable_pedantic = "yes" ;
then
config_pedantic_debug="-DPEDANTIC_DEBUG"
else
config_pedantic_debug=""
fi
AM_CONDITIONAL([ENABLE_PEDANTIC], [test "$enable_pedantic" = "yes"])
echo "Do pedantic assertion checks... $enable_pedantic"
#
# Enable Stupid Theory Propagation
#
AC_ARG_ENABLE(clever_theoryprop,
AC_HELP_STRING([--enable-clever_theoryprop],
[enable clever theorypropagation #<:#no#:>#]),
[:],
[enable_clever_theoryprop="no"])
if test $enable_clever_theoryprop = "no" ;
then
config_stupid_theoryprop="-DIGNORE_DL_THEORYPROPAGATION"
else
config_stupid_theoryprop=""
fi
AM_CONDITIONAL([ENABLE_STUPID_THEORYPROP], [test "$enable_clever_theoryprop" = "yes"])
echo "Propagate from theories with decision level... ${enable_clever_theoryprop}"
#
# Store explanations in terms
#
AC_ARG_ENABLE(term_explanations,
AC_HELP_STRING([--enable-term_explanations],
[store explanations in terms #<:#yes#:>#]),
[:],
[enable_term_explanations="yes"])
if test $enable_term_explanations = "yes" ;
then
config_term_explanations="-DTERMS_HAVE_EXPLANATIONS"
else
config_term_explanations=""
fi
AM_CONDITIONAL([ENABLE_TERM_EXPLANATIONS], [test "$enable_term_explanations" = "yes"])
echo "Store explanations in terms... ${enable_term_explanations}"
#
# Enable the buggy implementation of the structure sharing
#
AC_ARG_ENABLE(sharebug,
AC_HELP_STRING([--enable-sharebug],
[enable the structure sharing bug in propositional flattening #<:#no#:>#]),
[:],
[enable_sharebug="no"])
if test $enable_sharebug = "yes" ;
then
config_sharebug="-DENABLE_SHARING_BUG"
else
config_sharebug=""
fi
AM_CONDITIONAL([ENABLE_SHAREBUG], [test "$enable_sharebug" = "yes"])
echo "Enable sharing bug... ${enable_sharebug} (${config_sharebug:-none})"
AC_ARG_ENABLE(congruencesubstitution,
AC_HELP_STRING([--enable-congruencesubstitution],
[enable the top level substitutions using congruence
closure #<:#yes#:>#]),
[:],
[enable_congruencesubstitution="no"])
if test $enable_congruencesubstitution = "yes" ;
then
config_congruencesubstitution="-DENABLE_CONGRUENCESUBSTITUTION"
else
config_congruencesubstitution=""
fi
AM_CONDITIONAL([ENABLE_CONGRUENCESUBSTITUTION], [test "$enable_congruencesubstitution" = "yes"])
echo "Use congruence substitution... ${enable_congruencesubstitution}"
AC_ARG_ENABLE(oldsubstitution,
AC_HELP_STRING([--enable-oldsubstitution],
[enable old substitution #<:#yes#:>#]),
[:],
[enable_oldsubstitution="yes"])
if test $enable_oldsubstitution = "yes" ;
then
config_oldsubstitution="-DOSMT1_SUBSTITUTION"
else
config_oldsubstitution=""
fi
AM_CONDITIONAL([ENABLE_OLDSUBSTITUTION], [test "$enable_oldsubstitution" = "yes"])
echo "Use old substitution... ${enable_oldsubstitution}"
#
#
# Enable simplification debug
#
AC_ARG_ENABLE(simplification_debug,
AC_HELP_STRING([--enable-simplification_debug],
[enable simplification debug #<:#no#:>#)]),
[:],
enable_simplification_debug="no")
if test "${enable_simplification_debug}" = "yes";
then
config_simplification_debug="-DSIMPLIFY_DEBUG"
else
config_simplification_debug=""
fi
AM_CONDITIONAL([ENABLE_SIMPLIFICATION_DEBUG], [test "$enable_simplification_debug" = "yes"])
echo "Enable simplification debug... ${enable_simplification_debug}"
#
# Enable GC debug
#
AC_ARG_ENABLE(gcdebug,
AC_HELP_STRING([--enable-gcdebug],
[enable garbage collection debug #<:#no#:>#]),
[:],
[enable_gc_debug="no"])
if test $enable_gc_debug = "yes" ;
then
config_gc_debug="-DGC_DEBUG"
else
config_gc_debug=""
fi
AM_CONDITIONAL([ENABLE_GC_DEBUG], [test "$enable_gc_debug" = "yes"])
echo "Enable garbage collection debug... ${enable_gc_debug}"
#
# SMTCOMP version
#
AC_ARG_ENABLE(smtcomp,
[AC_HELP_STRING([--enable-smtcomp],
[enable smtcomp mode #<:#no#:>#])],
[:],
[enable_smtcomp="no"])
if test $enable_smtcomp = "yes" ;
then
config_smtcomp="-DSMTCOMP -march=opteron -static"
else
config_smtcomp=""
fi
echo "Compile for smtcomp... ${enable_smtcomp}"
AM_CONDITIONAL([ENABLE_SMTCOMP], [test "$enable_smtcomp" = "yes"])
# Complain if smtcomp is enabled and optimization is disabled
if test $enable_smtcomp = "yes" -a $enable_optimization = "no" ;
then
echo "Error: smtcomp requires optimizations"
exit
fi
# Complain if smtcomp is enabled and proof is enabled
if test $enable_smtcomp = "yes" -a $enable_proof = "yes" ;
then
echo "Error: cannot enable proof with smtcomp"
exit
fi
# Complain if both pedantic debug and optimization are enabled
if test $enable_pedantic = "yes" -a $enable_optimization = "yes" ;
then
echo "Error: cannot enable both pedantic debug and optimization"
exit
fi
def_flags="$config_optimization $config_pedantic_debug $config_gc_debug $config_smtcomp $config_static $config_proof $config_stupid_theoryprop $config_sharebug $config_simplification_debug $config_optimization_preproc $config_congruencesubstitution $config_oldsubstitution $config_custom_memalloc $config_term_explanations"
comp_flags="-W -Wall -g -Wno-deprecated $config_profiling $config_optimization_compiler"
def_flags=`echo ${def_flags} |sed 's/ [ ]*/ /g'`
comp_flags=`echo ${comp_flags} |sed 's/ [ ]*/ /g'`
AM_CFLAGS=""
AM_CXXFLAGS=$AM_CFLAGS
CFLAGS=""
CXXFLAGS=""
CPPFLAGS=""
# Allow user to use a GMP lib in a non-standard location
AC_ARG_WITH([gmp],
[AS_HELP_STRING([--with-gmp=prefix],
[Use this when GMP is in a non-standard location (e.g /opt/local in MacPorts)])],
[NONSTDGMPPATH=1],
[NONSTDGMPPATH=0])
if test $NONSTDGMPPATH = 1 ; then
AM_CXXFLAGS="$AM_CXXFLAGS -I$with_gmp/include"
AM_LDFLAGS="$AM_LDFLAGS -L$with_gmp/lib"
fi
# Allow user to use a GMP lib in a non-standard location
AC_ARG_WITH([readline],
[AS_HELP_STRING([--with-readline=prefix],
[Use this when readline is in a non-standard location])],
[NONSTDREADLINEPATH=1],
[NONSTDREADLINEPATH=0])
if test $NONSTDREADLINEPATH = 1 ; then
AM_CFLAGS="$AM_CFLAGS -I$with_readline/include"
AM_CXXFLAGS="$AM_CXXFLAGS -I$with_readline/include"
AM_LDFLAGS="$AM_LDFLAGS -L$with_readline/lib"
fi
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_CXXFLAGS])
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AM_LDFLAGS])
AC_SUBST([CFLAGS])
AC_SUBST([CXXFLAGS])
AC_SUBST([CPPFLAGS])
# Setup comilation/linking flags for library checks
OLDCPPFLAGS=$CPPFLAGS
CPPFLAGS=$CXXFLAGS
OLDLDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $AM_LDFLAGS"
CFLAGS="$CFLAGS $AM_CFLAGS"
# Check for GMP header
GMP_HEADER_FOUND=1
if test $NONSTDGMPPATH = 1 ; then
AC_CHECK_HEADERS($with_gmp/include/gmp.h,
,
[AC_MSG_ERROR([ The GMP header gmp.h was not found.])])
else
AC_CHECK_HEADERS(gmp.h,
,
[AC_MSG_ERROR([ The GMP header gmp.h was not found.])])
fi
# Check for GMP library
AC_CHECK_LIB(gmp, __gmpz_init, ,[AC_MSG_ERROR([GMP library not found])])
# Check for readline library
AX_LIB_READLINE
# Restore original flags
CPPFLAGS=$OLDCPPFLAGS
LDFLAGS=$OLDLDFLAGS
#
# List of directories to include
#
config_includedirs="-I\${top_srcdir}/src -I\${top_srcdir}/src/minisat/mtl -I\${top_srcdir}/src/minisat/core -I\${top_srcdir}/src/simplifiers -I\${top_srcdir}/src/common -I\${top_srcdir}/src/egraph -I\${top_srcdir}/src/sorts -I\${top_srcdir}/src/symbols -I\${top_srcdir}/src/pterms -I\${top_srcdir}/src/logics -I\${top_srcdir}/src/smtsolvers -I\${top_srcdir}/src/cnfizers -I\${top_srcdir}/src/proof -I\${top_srcdir}/src/api -I\${top_srcdir}/src/tsolvers -I\${top_srcdir}/src/tsolvers/emptysolver -I\${top_srcdir}/src/tsolvers/bvsolver -I\${top_srcdir}/src/tsolvers/bvsolver/minisatp -I\${top_srcdir}/src/tsolvers/lrasolver -I\${top_srcdir}/src/tsolvers/liasolver -I\${top_srcdir}/src/tsolvers/ctsolver -I\${top_srcdir}/src/tsolvers/axdiffsolver -I\${top_srcdir}/src/tsolvers/dlsolver -I\${top_srcdir}/src/attributes"
AM_CFLAGS="$AM_CFLAGS ${config_includedirs} ${def_flags} ${comp_flags}"
AM_CXXFLAGS="$AM_CXXFLAGS ${config_includedirs} ${def_flags} ${comp_flags}"
AC_SUBST(config_includedirs)
AC_CONFIG_FILES([ \
Makefile \
src/Makefile \
src/parsers/Makefile \
src/parsers/smt2new/Makefile \
src/pterms/Makefile \
src/cnfizers/Makefile \
src/simplifiers/Makefile \
src/smtsolvers/Makefile \
src/proof/Makefile \
src/common/Makefile \
src/egraph/Makefile \
src/sorts/Makefile \
src/logics/Makefile \
src/symbols/Makefile \
src/tsolvers/Makefile \
src/tsolvers/emptysolver/Makefile \
src/tsolvers/axdiffsolver/Makefile \
src/tsolvers/bvsolver/Makefile \
src/tsolvers/bvsolver/minisatp/Makefile \
src/tsolvers/lrasolver/Makefile \
src/tsolvers/ctsolver/Makefile \
src/tsolvers/dlsolver/Makefile \
src/api/Makefile \
test/Makefile \
])
AC_DEFINE_UNQUOTED([CONFIGTIME_DEFFLAGS], ["`echo ${def_flags} | sed 's/ */ /g'`]", [C define flags passed after configure])
AC_DEFINE_UNQUOTED([CONFIGTIME_COMPFLAGS], ["$comp_flags"], [C++ compiler flags of interest])
AC_OUTPUT
echo "=================================================="
echo "Configuring with C define flags"
echo " ${def_flags}" | sed 's/ */\n /g'
echo
echo "Configuring with [AM_CPPFLAGS] = $AM_CPPFLAGS"
echo "Configuring with [AM_CXXFLAGS] = $AM_CXXFLAGS"
echo "Configuring with [AM_CFLAGS] = $AM_CFLAGS"
echo "=================================================="
The makefile.in and configure scripts where created in a system with aclocal-1.14. When I run make in a system with older tools, it tries to run missing aclocal-1.14 and fails because it doesn't exist. Here's an example of running it in a TravisCI machine:
Using worker: worker-linux-12-2.bb.travis-ci.org:travis-linux-7
git.1
62.45s$ git clone --depth=50 --branch=master git://github.com/pmatos/OpenSMT2.git pmatos/OpenSMT2
Cloning into 'pmatos/OpenSMT2'...
remote: Counting objects: 7133, done.
remote: Compressing objects: 100% (6754/6754), done.
remote: Total 7133 (delta 6205), reused 0 (delta 0)
Receiving objects: 100% (7133/7133), 45.95 MiB | 1.54 MiB/s, done.
Resolving deltas: 100% (6322/6322), done.
Checking connectivity... done.
Checking out files: 100% (6971/6971), done.
$ cd pmatos/OpenSMT2
git.3
$ git checkout -qf 94c525663de5e2ed6f96731c62f0ebc54e9841bb
$ export CXX=g++
$ export CC=gcc
0.02s$ gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 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.
before_install.1
12.30s$ sudo apt-get update -qq
before_install.2
5.12s$ sudo apt-get install -qq libgmp-dev
Selecting previously unselected package libgmpxx4ldbl.
(Reading database ... 70559 files and directories currently installed.)
Unpacking libgmpxx4ldbl (from .../libgmpxx4ldbl_2%3a5.0.2+dfsg-2ubuntu1_amd64.deb) ...
Selecting previously unselected package libgmp-dev.
Unpacking libgmp-dev (from .../libgmp-dev_2%3a5.0.2+dfsg-2ubuntu1_amd64.deb) ...
Setting up libgmpxx4ldbl (2:5.0.2+dfsg-2ubuntu1) ...
Setting up libgmp-dev (2:5.0.2+dfsg-2ubuntu1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
8.89s$ ./configure && make -j4
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 whether make supports nested variables... yes
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 style of include used by make... GNU
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... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /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... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-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 %s\n
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 object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -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 for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
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... no
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /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++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ 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 for bison... bison -y
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
Compile with profiling... no
Setting preprocessor optimization flags to... -DOPTIMIZE -DNDEBUG
Setting compiler optimization flags to... -O3
Produce proofs... no
Use custom memory allocation for forbid lists... yes
Do pedantic assertion checks... no
Propagate from theories with decision level... no
Store explanations in terms... yes
Enable sharing bug... no (none)
Use congruence substitution... no
Use old substitution... yes
Enable simplification debug... no
Enable garbage collection debug... no
Compile for smtcomp... no
checking gmp.h usability... yes
checking gmp.h presence... yes
checking for gmp.h... yes
checking for __gmpz_init in -lgmp... yes
checking for a readline compatible library... -lreadline
checking readline.h usability... no
checking readline.h presence... no
checking for readline.h... no
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking whether readline supports history... yes
checking history.h usability... no
checking history.h presence... no
checking for history.h... no
checking readline/history.h usability... yes
checking readline/history.h presence... yes
checking for readline/history.h... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/parsers/Makefile
config.status: creating src/parsers/smt2new/Makefile
config.status: creating src/pterms/Makefile
config.status: creating src/cnfizers/Makefile
config.status: creating src/simplifiers/Makefile
config.status: creating src/smtsolvers/Makefile
config.status: creating src/proof/Makefile
config.status: creating src/common/Makefile
config.status: creating src/egraph/Makefile
config.status: creating src/sorts/Makefile
config.status: creating src/logics/Makefile
config.status: creating src/symbols/Makefile
config.status: creating src/tsolvers/Makefile
config.status: creating src/tsolvers/emptysolver/Makefile
config.status: creating src/tsolvers/axdiffsolver/Makefile
config.status: creating src/tsolvers/bvsolver/Makefile
config.status: creating src/tsolvers/bvsolver/minisatp/Makefile
config.status: creating src/tsolvers/lrasolver/Makefile
config.status: creating src/tsolvers/ctsolver/Makefile
config.status: creating src/tsolvers/dlsolver/Makefile
config.status: creating src/api/Makefile
config.status: creating test/Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
==================================================
Configuring with C define flags
-DIGNORE_DL_THEORYPROPAGATION
-DOPTIMIZE
-DNDEBUG
-DOSMT1_SUBSTITUTION
-DCUSTOM_EL_ALLOC
-DTERMS_HAVE_EXPLANATIONS
Configuring with AM_CPPFLAGS =
Configuring with AM_CXXFLAGS = -I${top_srcdir}/src -I${top_srcdir}/src/minisat/mtl -I${top_srcdir}/src/minisat/core -I${top_srcdir}/src/simplifiers -I${top_srcdir}/src/common -I${top_srcdir}/src/egraph -I${top_srcdir}/src/sorts -I${top_srcdir}/src/symbols -I${top_srcdir}/src/pterms -I${top_srcdir}/src/logics -I${top_srcdir}/src/smtsolvers -I${top_srcdir}/src/cnfizers -I${top_srcdir}/src/proof -I${top_srcdir}/src/api -I${top_srcdir}/src/tsolvers -I${top_srcdir}/src/tsolvers/emptysolver -I${top_srcdir}/src/tsolvers/bvsolver -I${top_srcdir}/src/tsolvers/bvsolver/minisatp -I${top_srcdir}/src/tsolvers/lrasolver -I${top_srcdir}/src/tsolvers/liasolver -I${top_srcdir}/src/tsolvers/ctsolver -I${top_srcdir}/src/tsolvers/axdiffsolver -I${top_srcdir}/src/tsolvers/dlsolver -I${top_srcdir}/src/attributes -DIGNORE_DL_THEORYPROPAGATION -DOPTIMIZE -DNDEBUG -DOSMT1_SUBSTITUTION -DCUSTOM_EL_ALLOC -DTERMS_HAVE_EXPLANATIONS -W -Wall -g -Wno-deprecated -O3
Configuring with AM_CFLAGS = -I${top_srcdir}/src -I${top_srcdir}/src/minisat/mtl -I${top_srcdir}/src/minisat/core -I${top_srcdir}/src/simplifiers -I${top_srcdir}/src/common -I${top_srcdir}/src/egraph -I${top_srcdir}/src/sorts -I${top_srcdir}/src/symbols -I${top_srcdir}/src/pterms -I${top_srcdir}/src/logics -I${top_srcdir}/src/smtsolvers -I${top_srcdir}/src/cnfizers -I${top_srcdir}/src/proof -I${top_srcdir}/src/api -I${top_srcdir}/src/tsolvers -I${top_srcdir}/src/tsolvers/emptysolver -I${top_srcdir}/src/tsolvers/bvsolver -I${top_srcdir}/src/tsolvers/bvsolver/minisatp -I${top_srcdir}/src/tsolvers/lrasolver -I${top_srcdir}/src/tsolvers/liasolver -I${top_srcdir}/src/tsolvers/ctsolver -I${top_srcdir}/src/tsolvers/axdiffsolver -I${top_srcdir}/src/tsolvers/dlsolver -I${top_srcdir}/src/attributes -DIGNORE_DL_THEORYPROPAGATION -DOPTIMIZE -DNDEBUG -DOSMT1_SUBSTITUTION -DCUSTOM_EL_ALLOC -DTERMS_HAVE_EXPLANATIONS -W -Wall -g -Wno-deprecated -O3
==================================================
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/travis/build/pmatos/OpenSMT2/missing aclocal-1.14 -I m4
/home/travis/build/pmatos/OpenSMT2/missing: line 81: aclocal-1.14: command not found
WARNING: 'aclocal-1.14' is missing on your system.
You should only need it if you modified 'acinclude.m4' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'aclocal' program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/>
make: *** [aclocal.m4] Error 127
The command "./configure && make -j4" failed and exited with 2 during .
Your build has been stopped.
Any ideas why this happens and how I can avoid this from happening?
There seems to be a problem compiling freetype2 with MinGW and MSYS
My attempts on a clean copy of the freetype source, and an unadulterated MinGW and MSYS give:
Andrew#MCARDLE-PC ~/documents/code
$ cd freetype-2.3.11
Andrew#MCARDLE-PC ~/documents/code/freetype-2.3.11
$ ./configure
FreeType build system -- automatic system detection
The following settings are used:
platform unix
compiler cc
configuration directory ./builds/unix
configuration rules ./builds/unix/unix.mk
If this does not correspond to your system or settings please remove the file
`config.mk' from this directory then read the INSTALL file for help.
Otherwise, simply type `c:/code/mingw/bin/make' again to build the library,
or `c:/code/mingw/bin/make refdoc' to build the API reference (the latter needs
python).
Generating modules list in ./objs/ftmodule.h...
* module: truetype (Windows/Mac font files with extension *.ttf or *.ttc)
* module: type1 (Postscript font files with extension *.pfa or *.pfb)
* module: cff (OpenType fonts with extension *.otf)
* module: cid (Postscript CID-keyed fonts, no known extension)
* module: pfr (PFR/TrueDoc font files with extension *.pfr)
* module: type42 (Type 42 font files with no known extension)
* module: winfnt (Windows bitmap fonts with extension *.fnt or *.fon)
* module: pcf (pcf bitmap fonts)
* module: bdf (bdf bitmap fonts)
* module: sfnt (helper module for TrueType & OpenType formats)
* module: autofit (automatic hinting module)
* module: pshinter (Postscript hinter module)
* module: raster (monochrome bitmap renderer)
* module: smooth (anti-aliased bitmap renderer)
* module: smooth (anti-aliased bitmap renderer for LCDs)
* module: smooth (anti-aliased bitmap renderer for vertical LCDs)
* module: psaux (Postscript Type 1 & Type 2 helper module)
* module: psnames (Postscript & Unicode Glyph name handling)
done.
cd builds/unix; ./configure
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for rm... rm -f
checking for rmdir... rmdir
checking for a BSD-compatible install... /bin/install -c
checking for grep that handles long lines and -e... /c/code/mingw/bin/grep
checking for egrep... /c/code/mingw/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 fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking size of int... 4
checking size of long... 4
checking cpp computation of bit length in ftconfig.in works... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... no
checking for memcpy... yes
checking for memmove... yes
checking for gzsetparams in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking whether CFLAGS includes -isysroot option... no
checking for a sed that does not truncate output... /c/code/mingw/bin/sed
checking for fgrep... /c/code/mingw/bin/grep -F
checking for ld used by gcc... /c/code/mingw/bin/ld
checking if the linker (/c/code/mingw/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /c/code/mingw/bin/nm
checking the name lister (/c/code/mingw/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 8192
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /c/code/mingw/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|
^x86 DLL
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /c/code/mingw/bin/nm output from gcc object... ok
checking for dlfcn.h... no
checking for as... as
checking for dlltool... dlltool
checking for objdump... (cached) objdump
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... c:\code\mingw\bin\sed.exe:
-e expression #2, char 1: unknown command: `C'
no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... c:\code\mingw\bin\sed.exe:
-e expression #2, char 1: unknown command: `C'
yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... c:\code\mingw\bin\sed.exe: -e expressio
n #2, char 1: unknown command: `C'
yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/c/code/mingw/bin/ld) supports shared libraries
... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
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
c:\code\mingw\bin\sed.exe: -e expression #1, char 1: unknown command: `C'
configure: creating ./config.status
c:\code\mingw\bin\sed.exe: -e expression #1, char 1: unknown command: `C'
config.status: creating unix-cc.mk
c:\code\mingw\bin\sed.exe: -e expression #1, char 1: unknown command: `C'
config.status: creating unix-def.mk
config.status: creating freetype-config
c:\code\mingw\bin\sed.exe: -e expression #1, char 1: unknown command: `C'
config.status: creating freetype2.pc
c:\code\mingw\bin\sed.exe: -e expression #1, char 1: unknown command: `C'
config.status: creating ftconfig.h
config.status: executing libtool commands
c:\code\mingw\bin\sed.exe: -e expression #1, char 1: unknown command: `C'
c:\code\mingw\bin\sed.exe: -e expression #1, char 1: unknown command: `C'
mv: cannot stat `libtoolT': No such file or directory
cp: cannot stat `libtoolT': No such file or directory
chmod: cannot access `libtool': No such file or directory
c:\code\mingw\bin\sed.exe: -e expression #1, char 1: unknown command: `C'
make: Nothing to be done for `unix'.
Andrew#MCARDLE-PC ~/documents/code/freetype-2.3.11
$ make
./builds/unix/libtool --mode=compile gcc -pedantic -ansi -Ic:/Users/Andrew/docu
ments/code/freetype-2.3.11/objs -I./builds/unix -Ic:/Users/Andrew/documents/code
/freetype-2.3.11/include -c -Wall -g -O2 -DFT_CONFIG_OPTION_SYSTEM_ZLIB -DFT_CON
FIG_CONFIG_H="<ftconfig.h>" -DFT2_BUILD_LIBRARY -DFT_CONFIG_MODULES_H="<ftmodule
.h>" -o c:/Users/Andrew/documents/code/freetype-2.3.11/objs/ftsystem.lo c:/User
s/Andrew/documents/code/freetype-2.3.11/src/base/ftsystem.c
/bin/sh: ./builds/unix/libtool: No such file or directory
make: *** [c:/Users/Andrew/documents/code/freetype-2.3.11/objs/ftsystem.lo] Erro
r 127
Andrew#MCARDLE-PC ~/documents/code/freetype-2.3.11
$
To my mind the two problems appear to be sed not recognising 'C', and libtool not being found.
The solution is to delete C:\mingw\bin\sed.exe so the MSYS sed will get used instead.
In your msys Environment, path/to/msys/installation/bin is mounted to /bin and MinGW is usually mounted to /mingw.
The problem is due to sed.exe coming from either /mingw/bin (or GnuWin32's bin or Git's bin, etc... if you have those installed), and not from /bin, as /bin is being included after all these in your msys Environment path.
The solution is to start your msys environment with the argument MSYS so that /bin comes before /mingw/bin (and possibly the rest as mentioned above) in your msys Environment's PATH, and hence sed.exe from /bin be used.
From your command prompt, assuming your Windows path contains /path/to/msys/installation/, use
$> msys.bat MSYS
instead of
$> msys.bat
to launch msys.
To test if everything is in order, echo $PATH under msys to see the Environment's PATH is correct.