Skip to content

Instantly share code, notes, and snippets.

@jonsterling
Created July 6, 2013 19:40
Show Gist options
  • Select an option

  • Save jonsterling/5941001 to your computer and use it in GitHub Desktop.

Select an option

Save jonsterling/5941001 to your computer and use it in GitHub Desktop.
Homebrew libffi installation errors

brew --config:

HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew.git
HEAD: 0c1bf5fc5158d39e7e83ca2a779c4b4e9a2897fc
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit haswell
OS X: 10.8.4-x86_64
Xcode: 4.6.3
CLT: 4.6.0.0.1.1365549073
LLVM-GCC: build 2336
Clang: 4.2 build 425
X11: N/A
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /Users/jon/.rbenv/shims/ruby

Build Output

sh-3.2$ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install libffi 2>&1
==> Downloading http://mirrors.kernel.org/sources.redhat.com/libffi/libffi-3.0.13.tar.gz
Already downloaded: /Library/Caches/Homebrew/libffi-3.0.13.tar.gz
tar xf /Library/Caches/Homebrew/libffi-3.0.13.tar.gz
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/libffi/3.0.13
./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/libffi/3.0.13
checking build system type... x86_64-apple-darwin12.4.1
checking host system type... x86_64-apple-darwin12.4.1
checking target system type... x86_64-apple-darwin12.4.1
continue configure in default builddir "./x86_64-apple-darwin12.4.1"
....exec /bin/sh .././configure "--srcdir=.." "--enable-builddir=x86_64-apple-darwin12.4.1" "darwin12.4.1"
checking build system type... x86_64-apple-darwin12.4.1
checking host system type... x86_64-apple-darwin12.4.1
checking target system type... x86_64-apple-darwin12.4.1
checking for gsed... sed
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... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... cc
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 cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of cc... none
checking dependency style of cc... none
checking whether cc understands -c and -o together... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/local/Library/ENV/4.3/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-apple-darwin12.4.1 file names to x86_64-apple-darwin12.4.1 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin12.4.1 file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... no
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... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from cc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... no
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... cc -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 cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fno-common -DPIC
checking if cc PIC flag -fno-common -DPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin12.4.1 dyld
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 size of size_t... 8
checking for C compiler vendor... clang

********************************************************
* WARNING: Don't know the best CFLAGS for this system  *
* Use ./configure CFLAGS=... to specify your own flags *
* (otherwise, a default of CFLAGS=-O3 will be used)    *
********************************************************

checking whether C compiler accepts -O3... yes
checking CFLAGS for maximum warnings... -Wall
checking whether to enable maintainer-specific portions of Makefiles... no
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for mmap... yes
checking for sys/mman.h... (cached) yes
checking for mmap... (cached) yes
checking whether read-only mmap of a plain file works... yes
checking whether mmap from /dev/zero works... no
checking for MAP_ANON(YMOUS)... yes
checking whether mmap with MAP_ANON(YMOUS) works... yes
checking for ANSI C header files... (cached) yes
checking for memcpy... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking size of double... 8
checking size of long double... 16
checking whether byte ordering is bigendian... no
checking assembler .cfi pseudo-op support... yes
checking whether .eh_frame section should be read-only... expr: syntax error
no
checking for __attribute__((visibility("hidden")))... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating include/Makefile
config.status: creating include/ffi.h
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating man/Makefile
config.status: creating libffi.pc
config.status: creating fficonfig.h
config.status: linking ../src/x86/ffitarget.h to include/ffitarget.h
config.status: executing buildir commands
config.status: create top_srcdir/Makefile guessed from local Makefile
config.status: buggy sed found - it deletes tab in "a" text parts
config.status: build in x86_64-apple-darwin12.4.1 (HOST=)
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing include commands
config.status: executing src commands
==> make install
make install 
MAKE x86_64-apple-darwin12.4.1 :        0 * install
Making install in include
make[3]: Nothing to be done for `install-exec-am'.
 ../../install-sh -c -d '/usr/local/Cellar/libffi/3.0.13/lib/libffi-3.0.13/include'
 /usr/bin/install -c -m 644 ffi.h ffitarget.h '/usr/local/Cellar/libffi/3.0.13/lib/libffi-3.0.13/include'
Making install in testsuite
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
Making install in man
make[3]: Nothing to be done for `install-exec-am'.
 ../../install-sh -c -d '/usr/local/Cellar/libffi/3.0.13/share/man/man3'
 /usr/bin/install -c -m 644 ../../man/ffi.3 ../../man/ffi_call.3 ../../man/ffi_prep_cif.3 ../../man/ffi_prep_cif_var.3 '/usr/local/Cellar/libffi/3.0.13/share/man/man3'
/bin/sh ./libtool --tag=CC   --mode=compile cc -DHAVE_CONFIG_H -I. -I..  -I. -I../include -Iinclude -I../src   -O3  -Wall -fexceptions -c -o src/prep_cif.lo ../src/prep_cif.c
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -Wall -fexceptions -c ../src/prep_cif.c  -fno-common -DPIC -o src/.libs/prep_cif.o
brew: superenv removed: -O3 -Wall
clang: error: unable to execute command: posix_spawn failed: No such file or directory
clang: error: lipo command failed due to signal (use -v to see invocation)
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.4.1
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg: Error generating preprocessed source(s) - cannot generate preprocessed source with multiple -arch options.
make[2]: *** [src/prep_cif.lo] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2
==> Configuration
HOMEBREW_VERSION: 0.9.4
HEAD: 0c1bf5fc5158d39e7e83ca2a779c4b4e9a2897fc
CPU: quad-core 64-bit haswell
OS X: 10.8.4-x86_64
Xcode: 4.6.3
CLT: 4.6.0.0.1.1365549073
X11: N/A
==> ENV
HOMEBREW_CC: clang
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.8
HOMEBREW_MAKE_JOBS: 1
ACLOCAL_PATH: /usr/local/share/aclocal
OBJC: cc
PATH: /usr/local/Library/ENV/4.3:/usr/bin:/bin:/usr/sbin:/sbin

Error: libffi did not build

These open issues may also help:
    https://github.com/mxcl/homebrew/pull/21041
sh-3.2$ 

Log from /Library/Logs/Homebrew/libffi

There was no log here.

Output of brew doctor

sh-3.2$ brew doctor
Warning: Some directories in /usr/local/share/man aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
directories, then the install will fail during the link step.
You should probably `chown` them:

    /usr/local/share/man/de
    /usr/local/share/man/de/man1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment