Skip to content

Instantly share code, notes, and snippets.

@AlexMax
Last active December 14, 2015 14:19
Show Gist options
  • Save AlexMax/5100238 to your computer and use it in GitHub Desktop.
Save AlexMax/5100238 to your computer and use it in GitHub Desktop.
gmp failed to build on 10.6
## The output from HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install foo
:~ alex% HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew upgrade gmp
==> Upgrading gmp
rm /usr/local/include/gmpxx.h
rm /usr/local/include/gmp.h
rm /usr/local/lib/libgmpxx.dylib
rm /usr/local/lib/libgmpxx.a
rm /usr/local/lib/libgmpxx.4.dylib
rm /usr/local/lib/libgmp.dylib
rm /usr/local/lib/libgmp.a
rm /usr/local/lib/libgmp.10.dylib
==> Downloading ftp://ftp.gmplib.org/pub/gmp-5.1.1/gmp-5.1.1.tar.bz2
Already downloaded: /Users/alex/Library/Caches/Homebrew/gmp-5.1.1.tar.bz2
/usr/bin/tar xf /Users/alex/Library/Caches/Homebrew/gmp-5.1.1.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/gmp/5.1.1 --enable-cxx
./configure --prefix=/usr/local/Cellar/gmp/5.1.1 --enable-cxx
checking build system type... core2-apple-darwin10.8.0
checking host system type... core2-apple-darwin10.8.0
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/local/bin/gmkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=64
./configure:5397: command not found: sed
./configure:5413: command not found: sed
checking whether /usr/bin/gcc-4.2 is gcc... yes
checking compiler /usr/bin/gcc-4.2 -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6 ... yes
./configure:8165: command not found: sed
checking for gcc... /usr/bin/gcc-4.2
./configure:8565: command not found: sed
./configure:8565: command not found: sed
./configure:8565: command not found: sed
checking whether the C compiler works... ./configure:8593: command not found: sed
no
./configure:8658: command not found: sed
configure: error: in `/private/tmp/gmp-ntQV/gmp-5.1.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
./configure:8662: command not found: sed
./configure:8662: command not found: sed
==> Configuration
HOMEBREW_VERSION: 0.9.4
HEAD: dfce9a6f98fde0474686158f562a51bbe5fe3aa5
CPU: dual-core 64-bit penryn
OS X: 10.6.8-i386
Xcode: 3.2.6
X11: 2.7.4 => /opt/X11
==> ENV
CC: /usr/bin/gcc-4.2
CXX: /usr/bin/g++-4.2
CFLAGS: -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6
CXXFLAGS: -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6
LDFLAGS: -L/usr/local/lib
MAKEFLAGS: -j1
MACOSX_DEPLOYMENT_TARGET: 10.6
HOMEBREW_MAKE_JOBS: 1
ACLOCAL_PATH: /usr/local/share/aclocal
OBJC: /usr/bin/gcc-4.2
PATH: /usr/local/opt/ruby/bin:/usr/local/opt/php54/bin:/usr/local/share/python:/usr/local/share/npm/bin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/bin:/usr/local/sbin:/Users/alex/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/X11/bin:/usr/local/Library/Contributions/cmd
Error: gmp did not build
Logs: /Users/alex/Library/Logs/Homebrew/gmp/config.log
ln -s ../Cellar/gmp/5.0.5/include/gmpxx.h gmpxx.h
ln -s ../Cellar/gmp/5.0.5/include/gmp.h gmp.h
ln -s ../Cellar/gmp/5.0.5/lib/libgmpxx.dylib libgmpxx.dylib
ln -s ../Cellar/gmp/5.0.5/lib/libgmpxx.a libgmpxx.a
ln -s ../Cellar/gmp/5.0.5/lib/libgmpxx.4.dylib libgmpxx.4.dylib
ln -s ../Cellar/gmp/5.0.5/lib/libgmp.dylib libgmp.dylib
ln -s ../Cellar/gmp/5.0.5/lib/libgmp.a libgmp.a
ln -s ../Cellar/gmp/5.0.5/lib/libgmp.10.dylib libgmp.10.dylib
ln -s ../../Cellar/gmp/5.0.5 gmp
ln -s ../Cellar/gmp/5.0.5 gmp
:~ alex%
## The contents of the largest numbered log in ~/Library/Logs/Homebrew/foo, for example: 03.make;
:~ alex% cat ~/Library/Logs/Homebrew/gmp/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 GNU MP configure 5.1.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/usr/local/Cellar/gmp/5.1.1 --enable-cxx
## --------- ##
## Platform. ##
## --------- ##
hostname = alex-mayfields-macbook-pro.local
uname -m = i386
uname -r = 10.8.0
uname -s = Darwin
uname -v = Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386
/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 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386
Kernel configured for up to 2 processors.
2 processors are physically available.
2 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1
Primary memory available: 8.00 gigabytes
Default processor set: 116 tasks, 532 threads, 2 processors
Load average: 1.14, Mach factor: 0.96
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/bin
PATH: /opt/X11/bin
PATH: /usr/X11/bin
PATH: /usr/local/opt/ruby/bin
PATH: /usr/local/opt/php54/bin
PATH: /usr/local/share/python
PATH: /usr/local/share/npm/bin
PATH: /usr/local/opt/coreutils/libexec/gnubin
PATH: /usr/local/sbin
PATH: /Users/alex/local/bin
PATH: /usr/local/Library/Contributions/cmd
## ----------- ##
## Core tests. ##
## ----------- ##
configure:3063: checking build system type
configure:3077: result: core2-apple-darwin10.8.0
configure:3097: checking host system type
configure:3110: result: core2-apple-darwin10.8.0
configure:3147: checking for a BSD-compatible install
configure:3215: result: /usr/bin/install -c
configure:3226: checking whether build environment is sane
configure:3276: result: yes
configure:3417: checking for a thread-safe mkdir -p
configure:3456: result: /usr/local/bin/gmkdir -p
configure:3469: checking for gawk
configure:3499: result: no
configure:3469: checking for mawk
configure:3499: result: no
configure:3469: checking for nawk
configure:3499: result: no
configure:3469: checking for awk
configure:3485: found /usr/bin/awk
configure:3496: result: awk
configure:3507: checking whether make sets $(MAKE)
configure:3529: result: yes
configure:3612: checking whether to enable maintainer-specific portions of Makefiles
configure:3621: result: no
User:
ABI=
CC=/usr/bin/gcc-4.2
CFLAGS=-Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6
CPPFLAGS=(unset)
MPN_PATH=
GMP:
abilist=64 x32 32
cclist=gcc icc cc
configure:5471: /usr/bin/gcc-4.2 -c conftest.c >&5
configure:5474: $? = 0
configure:5477: checking whether /usr/bin/gcc-4.2 is gcc
configure:5479: result: yes
configure:5493: /usr/bin/gcc-4.2 2>&1 | grep xlc >/dev/null
./configure:5494: command not found: grep
configure:5496: $? = 127
configure:5550: checking compiler /usr/bin/gcc-4.2 -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6
Test compile:
configure:5564: /usr/bin/gcc-4.2 -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6 conftest.c >&5
configure:5567: $? = 0
configure:5572: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:5575: $? = 0
Test compile: function pointer return
configure:5618: /usr/bin/gcc-4.2 -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6 conftest.c >&5
configure:5621: $? = 0
configure:5626: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:5629: $? = 0
Test compile: cmov instruction
configure:5674: /usr/bin/gcc-4.2 -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6 conftest.c >&5
configure:5677: $? = 0
configure:5682: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:5685: $? = 0
Test compile: double -> ulong conversion
configure:5731: /usr/bin/gcc-4.2 -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6 conftest.c >&5
configure:5734: $? = 0
configure:5739: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:5742: $? = 0
Test compile: double negation
configure:5786: /usr/bin/gcc-4.2 -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6 conftest.c >&5
configure:5789: $? = 0
configure:5794: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:5797: $? = 0
Test compile: double -> float conversion
configure:5842: /usr/bin/gcc-4.2 -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6 conftest.c >&5
configure:5845: $? = 0
configure:5850: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:5853: $? = 0
Test compile: gnupro alpha ev6 char spilling
configure:5927: /usr/bin/gcc-4.2 -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6 conftest.c >&5
configure:5930: $? = 0
configure:5935: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:5938: $? = 0
Test compile: __builtin_alloca availability
configure:5978: /usr/bin/gcc-4.2 -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6 conftest.c >&5
Undefined symbols:
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
configure:5981: $? = 1
failed program was:
int k; int foo () { __builtin_alloca (k); }
Test compile: abs int -> double conversion
configure:6102: /usr/bin/gcc-4.2 -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6 conftest.c >&5
configure:6105: $? = 0
configure:6110: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:6113: $? = 0
Test compile: long long reliability test 1
configure:6166: /usr/bin/gcc-4.2 -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6 conftest.c >&5
configure:6169: $? = 0
configure:6174: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:6177: $? = 0
Test compile: long long reliability test 2
configure:6226: /usr/bin/gcc-4.2 -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6 conftest.c >&5
configure:6229: $? = 0
configure:6234: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:6237: $? = 0
Test compile: mpn_lshift_com optimization
configure:6325: /usr/bin/gcc-4.2 -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6 conftest.c >&5
configure:6328: $? = 0
configure:6333: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:6336: $? = 0
Test compile: mpn_lshift_com optimization 2
configure:6433: /usr/bin/gcc-4.2 -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6 conftest.c >&5
configure:6436: $? = 0
configure:6441: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:6444: $? = 0
configure:6590: result: yes
configure:8295: checking for gcc
configure:8322: result: /usr/bin/gcc-4.2
configure:8551: checking for C compiler version
configure:8560: /usr/bin/gcc-4.2 --version >&5
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright (C) 2007 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:8571: $? = 0
configure:8560: /usr/bin/gcc-4.2 -v >&5
configure:8571: $? = 0
configure:8560: /usr/bin/gcc-4.2 -V >&5
configure:8571: $? = 1
configure:8560: /usr/bin/gcc-4.2 -qversion >&5
configure:8571: $? = 1
configure:8591: checking whether the C compiler works
configure:8613:
configure:8617: $? = 0
configure:8655: result: no
configure: failed program was:
configure:8660: error: in `/private/tmp/gmp-ntQV/gmp-5.1.1':
configure:8662: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
## ----------------- ##
## Output variables. ##
## ----------------- ##
ABI='64'
ACLOCAL='${SHELL} /private/tmp/gmp-ntQV/gmp-5.1.1/missing --run aclocal-1.11'
AMTAR='$${TAR-tar}'
AR=''
AS=''
ASMFLAGS=''
AUTOCONF='${SHELL} /private/tmp/gmp-ntQV/gmp-5.1.1/missing --run autoconf'
AUTOHEADER='${SHELL} /private/tmp/gmp-ntQV/gmp-5.1.1/missing --run autoheader'
AUTOMAKE='${SHELL} /private/tmp/gmp-ntQV/gmp-5.1.1/missing --run automake-1.11'
AWK='awk'
CALLING_CONVENTIONS_OBJS='x86call.lo x86check$U.lo'
CC='/usr/bin/gcc-4.2'
CCAS=''
CC_FOR_BUILD=''
CFLAGS='-Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6'
CPP=''
CPPFLAGS=''
CPP_FOR_BUILD=''
CXX='/usr/bin/g++-4.2'
CXXCPP=''
CXXFLAGS='-Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6'
CYGPATH_W='echo'
DEFN_LONG_LONG_LIMB='/* #undef _LONG_LONG_LIMB */'
DEFS=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_STATIC_FALSE=''
ENABLE_STATIC_TRUE=''
EXEEXT=''
EXEEXT_FOR_BUILD=''
FGREP=''
GMP_LDFLAGS=''
GMP_LIMB_BITS=''
GMP_NAIL_BITS='0'
GREP=''
HAVE_CLOCK_01=''
HAVE_CPUTIME_01=''
HAVE_GETRUSAGE_01=''
HAVE_GETTIMEOFDAY_01=''
HAVE_HOST_CPU_FAMILY_power='0'
HAVE_HOST_CPU_FAMILY_powerpc='0'
HAVE_SIGACTION_01=''
HAVE_SIGALTSTACK_01=''
HAVE_SIGSTACK_01=''
HAVE_STACK_T_01=''
HAVE_SYS_RESOURCE_H_01=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD=''
LDFLAGS='-L/usr/local/lib'
LEX=''
LEXLIB=''
LEX_OUTPUT_ROOT=''
LIBCURSES=''
LIBGMPXX_LDFLAGS=''
LIBGMP_DLL=''
LIBGMP_LDFLAGS=''
LIBM=''
LIBM_FOR_BUILD=''
LIBOBJS=''
LIBREADLINE=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
M4=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /private/tmp/gmp-ntQV/gmp-5.1.1/missing --run makeinfo'
MANIFEST_TOOL=''
MKDIR_P='/usr/local/bin/gmkdir -p'
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='gmp'
PACKAGE_BUGREPORT='gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html'
PACKAGE_NAME='GNU MP'
PACKAGE_STRING='GNU MP 5.1.1'
PACKAGE_TARNAME='gmp'
PACKAGE_URL='http://www.gnu.org/software/gmp/'
PACKAGE_VERSION='5.1.1'
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/usr/local/bin/zsh'
SPEED_CYCLECOUNTER_OBJ='pentium.lo'
STRIP=''
TAL_OBJECT=''
TUNE_LIBS=''
TUNE_SQR_OBJ=''
U_FOR_BUILD=''
VERSION='5.1.1'
WANT_CXX_FALSE=''
WANT_CXX_TRUE=''
WITH_READLINE_01=''
YACC=''
YFLAGS=''
ac_ct_AR=''
ac_ct_CC='/usr/bin/gcc-4.2'
ac_ct_CXX=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__isrc=''
am__leading_dot='.'
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build='core2-apple-darwin10.8.0'
build_alias=''
build_cpu='core2'
build_os='darwin10.8.0'
build_vendor='apple'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
gmp_srclinks=''
host='core2-apple-darwin10.8.0'
host_alias=''
host_cpu='core2'
host_os='darwin10.8.0'
host_vendor='apple'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /private/tmp/gmp-ntQV/gmp-5.1.1/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='/usr/local/bin/gmkdir -p'
mpn_objects=''
mpn_objs_in_libgmp=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local/Cellar/gmp/5.1.1'
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 "GNU MP"
#define PACKAGE_TARNAME "gmp"
#define PACKAGE_VERSION "5.1.1"
#define PACKAGE_STRING "GNU MP 5.1.1"
#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html"
#define PACKAGE_URL "http://www.gnu.org/software/gmp/"
#define PACKAGE "gmp"
#define VERSION "5.1.1"
#define WANT_FFT 1
#define HAVE_HOST_CPU_core2 1
#define HAVE_SPEED_CYCLECOUNTER 2
#define HAVE_CALLING_CONVENTIONS 1
configure: exit 77
:~ alex%
## The output from brew doctor;
:~ alex% brew doctor
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/usr/local/opt/php54/bin/php-config
:~ alex%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment