osx-cross / homebrew-avr

Homebrew AVR Toolchain
BSD 2-Clause "Simplified" License
399 stars 81 forks source link

Issues with installation on 10.11.5 #29

Closed edasque closed 8 years ago

edasque commented 8 years ago

On a brand new installation of 10.11.15, I can't seem to install avr-gcc:

brew install avr-libc
==> Installing avr-libc from osx-cross/avr
==> Installing dependencies for osx-cross/avr/avr-libc: avr-gcc
==> Installing osx-cross/avr/avr-libc dependency: avr-gcc
==> Downloading ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.9.3/gcc-4.9.3.tar.bz2
Already downloaded: /Users/edasque/Library/Caches/Homebrew/avr-gcc-4.9.3.tar.bz2
==> ../configure --target=avr --prefix=/usr/local/Cellar/avr-gcc/4.9.3 --enable-languages=c,c++ --with-gnu-as --with-g
==> make
Last 15 lines from /Users/edasque/Library/Logs/Homebrew/avr-gcc/02.make:
make[2]: *** [s-opinit] Error 1
make[2]: *** Waiting for unfinished jobs....
/bin/sh ../../gcc/../move-if-change tmp-attr-common.h insn-attr-common.h
echo timestamp > s-codes
echo timestamp > s-flags
/bin/sh ../../gcc/../move-if-change tmp-attr.h insn-attr.h
echo timestamp > s-attr-common
/bin/sh ../../gcc/../move-if-change tmp-config.h insn-config.h
echo timestamp > s-attr
echo timestamp > s-config
/bin/sh ../../gcc/../move-if-change tmp-mlib.h multilib.h
echo timestamp > s-mlib
rm gcc.pod
make[1]: *** [all-gcc] Error 2
make: *** [all] Error 2

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
  https://github.com/osx-cross/homebrew-avr/issues

These open issues may also help:
Bundle avr-libc to avr-gcc to resolve sandbox issue https://github.com/osx-cross/homebrew-avr/pull/21

Any idea how I could fix it? I tried to install 48 with similar issues. It doesn't work on this work mac but works on my home Mac for some reason.

brew --version
Homebrew 0.9.9 (git revision 8282; last commit 2016-07-08)
Homebrew/homebrew-core (git revision 2302; last commit 2016-07-08)
gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
leojrfs commented 8 years ago

You still have this problem? its working for me, do you have xcode command line tools installed?

please install it with --verbose option to see the compiler output

edasque commented 8 years ago

I still have that problem on my work computer, I can give you the dump Monday.

leojrfs commented 8 years ago

Also check if you have the xcode command line tools

edasque commented 8 years ago

I sure did

edasque commented 8 years ago

Now on MacOS 10.11.6

➜  ~ xcode-select --install
xcode-select: error: command line tools are already installed,
use "Software Update" to install updates
➜  ~ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I run with verbose and capture what I thought was the interesting part:

checking for fcntl.h... echo "#define LOCALEDIR \"/usr/local/Cellar/avr-gcc/4.9.3/share/locale\"" > localedir.new
../../libcpp/../move-if-change localedir.new localedir.h
make[2]: ../../libcpp/../move-if-change: Permission denied
make[2]: *** [localedir.hs] Error 1
make[2]: *** Waiting for unfinished jobs....
yes
checking for unistd.h... (cached) yes
checking for sys/file.h... yes
checking for sys/time.h... yes
checking for sys/mman.h... yes
checking for sys/resource.h... yes
checking for sys/param.h... yes
checking for sys/times.h... yes
checking for sys/stat.h... (cached) yes
checking for direct.h... make[1]: *** [all-libcpp] Error 2
make[1]: *** Waiting for unfinished jobs....
no
checking for malloc.h... no
checking for langinfo.h... yes
checking for ldfcn.h... no
checking for locale.h... yes
checking for wchar.h... yes
checking for thread.h... no
checking for pthread.h... yes
checking for CHAR_BIT... yes
checking whether byte ordering is bigendian... no
checking how to run the C++ preprocessor... clang++ -E
checking for unordered_map... yes
checking for tr1/unordered_map... no
checking for ext/hash_map... yes
checking dependency style of clang++... gcc3
checking for collect2 libraries... none required
checking for library containing exc_resume... no
checking for library containing kstat_open... no
checking for library containing ldexp... none required
checking for inttypes.h... yes
checking for times... yes
checking for clock... yes
checking for kill... yes
checking for getrlimit... yes
checking for setrlimit... yes
checking for atoll... yes
checking for atoq... no
checking for sysconf... yes
checking for strsignal... yes
checking for getrusage... yes
checking for nl_langinfo... yes
checking for gettimeofday... yes
checking for mbstowcs... yes
checking for wcswidth... yes
checking for mmap... yes
checking for setlocale... yes
checking for clearerr_unlocked... yes
checking for feof_unlocked... yes
checking for ferror_unlocked... yes
checking for fflush_unlocked... no
checking for fgetc_unlocked... no
checking for fgets_unlocked... no
checking for fileno_unlocked... yes
checking for fprintf_unlocked... no
checking for fputc_unlocked... no
checking for fputs_unlocked... no
checking for fread_unlocked... no
checking for fwrite_unlocked... no
checking for getchar_unlocked... yes
checking for getc_unlocked... yes
checking for putchar_unlocked... yes
checking for putc_unlocked... yes
checking for madvise... yes
checking whether mbstowcs works... yes
checking for ssize_t... yes
checking for caddr_t... 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 pid_t... yes
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for ld used by GCC... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for shared library run path origin... done
checking for iconv... yes
checking how to link with libiconv... -liconv
checking for iconv declaration... install-shextern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for LC_MESSAGES... yes
checking for nl_langinfo and CODESET... yes
checking whether getenv is declared... yes
checking whether atol is declared... yes
checking whether asprintf is declared... yes
checking whether sbrk is declared... yes
checking whether abort is declared... yes
checking whether atof is declared... yes
checking whether getcwd is declared... yes
checking whether getwd is declared... yes
checking whether strsignal is declared... yes
checking whether strstr is declared... yes
checking whether stpcpy is declared... yes
checking whether strverscmp is declared... no
checking whether errno is declared... yes
checking whether snprintf is declared... yes
checking whether vsnprintf is declared... yes
checking whether vasprintf is declared... yes
checking whether malloc is declared... yes
checking whether realloc is declared... yes
checking whether calloc is declared... yes
checking whether free is declared... yes
checking whether basename is declared... no
checking whether getopt is declared... yes
checking whether clock is declared... yes
checking whether getpagesize is declared... yes
checking whether ffs is declared... yes
checking whether clearerr_unlocked is declared... yes
checking whether feof_unlocked is declared... yes
checking whether ferror_unlocked is declared... yes
checking whether fflush_unlocked is declared... no
checking whether fgetc_unlocked is declared... no
checking whether fgets_unlocked is declared... no
checking whether fileno_unlocked is declared... yes
checking whether fprintf_unlocked is declared... no
checking whether fputc_unlocked is declared... no
checking whether fputs_unlocked is declared... no
checking whether fread_unlocked is declared... no
checking whether fwrite_unlocked is declared... no
checking whether getchar_unlocked is declared... yes
checking whether getc_unlocked is declared... yes
checking whether putchar_unlocked is declared... yes
checking whether putc_unlocked is declared... yes
checking whether getrlimit is declared... yes
checking whether setrlimit is declared... yes
checking whether getrusage is declared... yes
checking whether ldgetname is declared... no
checking whether times is declared... yes
checking whether sigaltstack is declared... yes
checking whether madvise is declared... yes
checking for struct tms... yes
checking for clock_t... yes
checking for F_SETLKW... yes
checking if mkdir takes one argument... no
Using `../../gcc/config/avr/avr.c' for machine-specific logic.
Using `../../gcc/config/avr/avr.md' as machine description file.
Using the following target machine macro files:
    ../../gcc/config/elfos.h
    ../../gcc/config/avr/elf.h
    ../../gcc/config/avr/avr-arch.h
    ../../gcc/config/avr/avr.h
    ../../gcc/config/dbxelf.h
    ../../gcc/config/avr/avr-stdint.h
    ../../gcc/config/avr/avrlibc.h
    ../../gcc/config/initfini-array.h
Using host-darwin.o host-i386-darwin.o for host machine hooks.
checking whether NLS is requested... no
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/local/Library/Homebrew/shims/super/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by clang... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... nm
checking the name lister (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 for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for x86_64-apple-darwin15.6.0-objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for x86_64-apple-darwin15.6.0-ar... (cached) ar
checking for x86_64-apple-darwin15.6.0-strip... no
checking for strip... strip
checking for x86_64-apple-darwin15.6.0-ranlib... (cached) ranlib
checking command to parse nm output from clang object... ok
checking for x86_64-apple-darwin15.6.0-dsymutil... no
checking for dsymutil... dsymutil
checking for x86_64-apple-darwin15.6.0-nmedit... no
checking for nmedit... nmedit
checking for x86_64-apple-darwin15.6.0-lipo... no
checking for lipo... lipo
checking for x86_64-apple-darwin15.6.0-otool... no
checking for otool... otool
checking for x86_64-apple-darwin15.6.0-otool64... no
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... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if clang supports -fno-rtti -fno-exceptions... yes
checking for clang option to produce PIC... -fno-common -DPIC
checking if clang PIC flag -fno-common -DPIC works... yes
checking if clang static flag -static works... no
checking if clang supports -c -o file.o... yes
checking if clang supports -c -o file.o... (cached) yes
checking whether the clang linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin15.6.0 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... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... clang++ -E
checking for ld used by clang++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the clang++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking for clang++ option to produce PIC... -fno-common -DPIC
checking if clang++ PIC flag -fno-common -DPIC works... yes
checking if clang++ static flag -static works... no
checking if clang++ supports -c -o file.o... yes
checking if clang++ supports -c -o file.o... (cached) yes
checking whether the clang++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin15.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking what assembler to use... /usr/local/opt/avr-binutils/bin/avr-as
checking whether we are using gold... no
checking what linker to use... /usr/local/opt/avr-binutils/bin/avr-ld
checking for avr-nm... /usr/local/opt/avr-binutils/bin/avr-nm
checking what nm to use... /usr/local/opt/avr-binutils/bin/avr-nm
checking for avr-objdump... /usr/local/opt/avr-binutils/bin/avr-objdump
checking what objdump to use... /usr/local/opt/avr-binutils/bin/avr-objdump
checking for readelf... no
checking what readelf to use... not found
checking assembler flags...
checking assembler for .balign and .p2align... yes
checking assembler for .p2align with maximum skip... yes
checking assembler for .literal16... no
checking assembler for working .subsection -1... yes
checking assembler for .weak... yes
checking assembler for .weakref... yes
checking assembler for .nsubspa comdat... no
checking assembler for .hidden... yes
checking linker for .hidden support... yes
checking linker read-only and read-write section mixing... unknown
checking for .preinit_array/.init_array/.fini_array support... checking cross compile... guessing... no
checking assembler for .sleb128 and .uleb128... yes
checking assembler for cfi directives... yes
checking assembler for working cfi advance... yes
checking assembler for cfi personality directive... yes
checking assembler for cfi sections directive... yes
checking assembler for eh_frame optimization... yes
checking assembler for section merging support... yes
checking assembler for COMDAT group support (GNU as)... yes
checking assembler for line table discriminator support... yes
checking linker -Bstatic/-Bdynamic option... yes
checking linker --demangle support... yes
checking linker plugin support... 2
checking assembler for -mrmw option... yes
checking assembler for dwarf2 debug_line support... yes
checking assembler for buggy dwarf2 .file directive... no
checking assembler for --gdwarf2 option... yes
checking assembler for --gstabs option... yes
checking assembler for --debug-prefix-map option... yes
checking assembler for .lcomm with alignment... no
checking for target glibc version... 0.0
checking assembler for gnu_unique_object... yes
checking assembler for tolerance to line number 0... yes
checking linker PT_GNU_EH_FRAME support... no
checking linker CIEv3 in .eh_frame support... yes
checking linker position independent executable support... yes
checking linker EH-compatible garbage collection of sections... no
checking linker EH garbage collection of sections bug... yes
checking linker --as-needed support... yes
checking linker mapfile support for clearing hardware capabilities... yes
checking linker --build-id support... yes
checking linker *_sol2 emulation support... no
checking linker --sysroot support... yes
checking __stack_chk_fail in target C library... no
checking sys/sdt.h in the target C library... no
checking dl_iterate_phdr in target C library... unknown
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether to avoid linking multiple front-ends at once... no
Links are now set up to build a cross-compiler
 from x86_64-apple-darwin15.6.0 to avr-unknown-none.
checking for exported symbols... yes
checking for library containing dlopen... none required
checking for -fPIC -shared... yes
configure: updating cache ./config.cache
configure: creating ./config.status
config.status: creating as
config.status: creating collect-ld
config.status: creating nm
config.status: creating Makefile
config.status: creating ada/gcc-interface/Makefile
config.status: creating ada/Makefile
config.status: creating auto-host.h
config.status: linking ../../gcc/config/sol2-clearcapv2.map to clearcap.map
config.status: executing depdir commands
mkdir .deps
config.status: executing gccdepdir commands
mkdir build
mkdir build/.deps
mkdir ada/.deps
mkdir c
mkdir c/.deps
mkdir cp
mkdir cp/.deps
mkdir fortran
mkdir fortran/.deps
mkdir go
mkdir go/.deps
mkdir java
mkdir java/.deps
mkdir lto
mkdir lto/.deps
mkdir objc
mkdir objc/.deps
mkdir objcp
mkdir objcp/.deps
mkdir c-family
mkdir c-family/.deps
mkdir common
mkdir common/.deps
config.status: executing default commands
make: *** [all] Error 2
==> Formula
Tap: osx-cross/avr
Path: /usr/local/Library/Taps/osx-cross/homebrew-avr/avr-gcc.rb
==> Configuration
HOMEBREW_VERSION: 0.9.9
ORIGIN: https://github.com/Homebrew/brew
HEAD: a5a930c48bec7bb7bdc6bbf7e0fe7fe5f564a7fe
Last commit: 20 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: b0b2f78ddb59bcc3dd88664fe2321fdf23c52c8c
Core tap last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: octa-core 64-bit ivybridge
Homebrew Ruby: 2.0.0-p648
Clang: 7.3 build 703
Git: 2.7.4 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: N/A
OS X: 10.11.6-x86_64
Xcode: 7.3.1
CLT: 7.3.1.0.1.1461711523
X11: N/A
==> ENV
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
MAKEFLAGS: -j8
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
MACOSX_DEPLOYMENT_TARGET: 10.11
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/Homebrew/os/mac/pkgconfig/10.11
PATH: /usr/local/Library/Homebrew/shims/super:/usr/local/opt/avr-binutils/bin:/usr/bin:/bin:/usr/sbin:/sbin

Error: osx-cross/avr/avr-gcc 4.9.3 did not build
Logs:
     /Users/edasque/Library/Logs/Homebrew/avr-gcc/01.configure
     /Users/edasque/Library/Logs/Homebrew/avr-gcc/01.configure.cc
     /Users/edasque/Library/Logs/Homebrew/avr-gcc/02.make
     /Users/edasque/Library/Logs/Homebrew/avr-gcc/02.make.cc

These open issues may also help:
Bundle avr-libc to avr-gcc to resolve sandbox issue https://github.com/osx-cross/homebrew-avr/pull/21
edasque commented 8 years ago

Seems the first error is here:

build/genattrtab ../../gcc/config/avr/avr.md insn-conditions.md \
        -Atmp-attrtab.c -Dtmp-dfatab.c -Ltmp-latencytab.c
make[2]: build/genattrtab: Permission denied
/bin/sh ../../gcc/../move-if-change tmp-config.h insn-config.h
build/genemit ../../gcc/config/avr/avr.md \
      insn-conditions.md > tmp-emit.c
make[2]: *** [s-attrtab] Error 1
make[2]: *** Waiting for unfinished jobs....