Repository: spack/spack

Issue:
mac osx issues?
It's my first time really trying spack. I'm on mac
```
uname -a
Darwin loki 16.7.0 Darwin Kernel Version 16.7.0: Thu Jan 11 22:59:40 PST 2018; root:xnu-3789.73.8~1/RELEASE_X86_64 x86_64
```

First of all cloning the repo and running the seup_env.sh file does not seem to work on mac, I have to manually add the path to my mac

Now I tried to install hdf5 as per your first example.

I get:

```
> spack install hdf5
==> Installing pkgconf
==> Fetching https://distfiles.dereferenced.org/pkgconf/pkgconf-1.4.0.tar.xz
################################################################################################################################################## 100.0%
==> Staging archive: /git/spack/var/spack/stage/pkgconf-1.4.0-tengbb33gehtiyetbc22a3znib66zszk/pkgconf-1.4.0.tar.xz
==> Created stage in /git/spack/var/spack/stage/pkgconf-1.4.0-tengbb33gehtiyetbc22a3znib66zszk
==> No patches needed for pkgconf
==> Building pkgconf [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Executing phase: 'build'
==> Executing phase: 'install'
==> Successfully installed pkgconf
  Fetch: 1.82s.  Build: 12.98s.  Total: 14.80s.
[+] /git/spack/opt/spack/darwin-sierra-x86_64/clang-8.1.0-apple/pkgconf-1.4.0-tengbb33gehtiyetbc22a3znib66zszk
==> Installing xz
==> Fetching http://tukaani.org/xz/xz-5.2.3.tar.bz2
################################################################################################################################################## 100.0%################################################################################################################################################## 100.0%################################################################################################################################################## 100.0%################################################################################################################################################## 100.0%################################################################################################################################################## 100.0%
==> Staging archive: /git/spack/var/spack/stage/xz-5.2.3-5xaogvjybobt4kmdgeyv5nfpclfmjgqa/xz-5.2.3.tar.bz2
==> Created stage in /git/spack/var/spack/stage/xz-5.2.3-5xaogvjybobt4kmdgeyv5nfpclfmjgqa
==> No patches needed for xz
==> Building xz [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Executing phase: 'build'
==> Executing phase: 'install'
==> Successfully installed xz
  Fetch: 5.34s.  Build: 31.17s.  Total: 36.51s.
[+] /git/spack/opt/spack/darwin-sierra-x86_64/clang-8.1.0-apple/xz-5.2.3-5xaogvjybobt4kmdgeyv5nfpclfmjgqa
==> zlib is already installed in /git/spack/opt/spack/darwin-sierra-x86_64/clang-8.1.0-apple/zlib-1.2.11-kugj5icwtvhlfrkdy4qwa5reztj3poq2
==> Installing libxml2
==> Fetching http://xmlsoft.org/sources/libxml2-2.9.4.tar.gz
################################################################################################################################################## 100.0%
==> Staging archive: /git/spack/var/spack/stage/libxml2-2.9.4-wjf52tiqr2ooqredkgu4nptytsyhefyb/libxml2-2.9.4.tar.gz
==> Created stage in /git/spack/var/spack/stage/libxml2-2.9.4-wjf52tiqr2ooqredkgu4nptytsyhefyb
==> No patches needed for libxml2
==> Building libxml2 [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Executing phase: 'build'
==> Executing phase: 'install'
==> Successfully installed libxml2
  Fetch: 22.97s.  Build: 57.88s.  Total: 1m 20.86s.
[+] /git/spack/opt/spack/darwin-sierra-x86_64/clang-8.1.0-apple/libxml2-2.9.4-wjf52tiqr2ooqredkgu4nptytsyhefyb
==> Installing libsigsegv
==> Fetching https://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.11.tar.gz
################################################################################################################################################## 100.0%
==> Staging archive: /git/spack/var/spack/stage/libsigsegv-2.11-vbtxh6u35vmkzwc2cno557w3ulgu3n2n/libsigsegv-2.11.tar.gz
==> Created stage in /git/spack/var/spack/stage/libsigsegv-2.11-vbtxh6u35vmkzwc2cno557w3ulgu3n2n
==> No patches needed for libsigsegv
==> Building libsigsegv [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Executing phase: 'build'
==> Executing phase: 'install'
==> Successfully installed libsigsegv
  Fetch: 2.12s.  Build: 10.30s.  Total: 12.43s.
[+] /git/spack/opt/spack/darwin-sierra-x86_64/clang-8.1.0-apple/libsigsegv-2.11-vbtxh6u35vmkzwc2cno557w3ulgu3n2n
==> Installing m4
==> Fetching https://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.gz
################################################################################################################################################## 100.0%
==> Staging archive: /git/spack/var/spack/stage/m4-1.4.18-vwblkonajep2vr5tyikyrdeuhja2azvy/m4-1.4.18.tar.gz
==> Created stage in /git/spack/var/spack/stage/m4-1.4.18-vwblkonajep2vr5tyikyrdeuhja2azvy
==> Applied patch gnulib-pgi.patch
==> Building m4 [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Executing phase: 'build'
==> Executing phase: 'install'
==> Successfully installed m4
  Fetch: 8.68s.  Build: 1m 1.89s.  Total: 1m 10.57s.
[+] /git/spack/opt/spack/darwin-sierra-x86_64/clang-8.1.0-apple/m4-1.4.18-vwblkonajep2vr5tyikyrdeuhja2azvy
==> Installing ncurses
==> Fetching http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz
################################################################################################################################################## 100.0%
==> Staging archive: /git/spack/var/spack/stage/ncurses-6.0-ek4ah2g3rdrbj5h6cxqvurhtsibyacsf/ncurses-6.0.tar.gz
==> Created stage in /git/spack/var/spack/stage/ncurses-6.0-ek4ah2g3rdrbj5h6cxqvurhtsibyacsf
==> Applied patch sed_pgi.patch
==> Building ncurses [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Executing phase: 'build'
==> Executing phase: 'install'
==> Successfully installed ncurses
  Fetch: 8.44s.  Build: 1m 33.64s.  Total: 1m 42.08s.
[+] /git/spack/opt/spack/darwin-sierra-x86_64/clang-8.1.0-apple/ncurses-6.0-ek4ah2g3rdrbj5h6cxqvurhtsibyacsf
==> Installing readline
==> Fetching https://ftp.gnu.org/gnu/readline/readline-7.0.tar.gz
################################################################################################################################################## 100.0%
==> Staging archive: /git/spack/var/spack/stage/readline-7.0-vpcmf6bk4jl6aqleufiz7pwub54wjgma/readline-7.0.tar.gz
==> Created stage in /git/spack/var/spack/stage/readline-7.0-vpcmf6bk4jl6aqleufiz7pwub54wjgma
==> No patches needed for readline
==> Building readline [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Executing phase: 'build'
==> Executing phase: 'install'
==> Successfully installed readline
  Fetch: 4.42s.  Build: 17.42s.  Total: 21.84s.
[+] /git/spack/opt/spack/darwin-sierra-x86_64/clang-8.1.0-apple/readline-7.0-vpcmf6bk4jl6aqleufiz7pwub54wjgma
==> Installing gdbm
==> Warning: Suspicious requests to set or unset 'CC' found
==> Warning: 	    	env.set('CC', join_path(link_dir, compiler.link_paths['cc'])) at /git/spack/lib/spack/spack/build_environment.py:146
==> Warning: 	--->	spack_env.set('CC', spack_cc) at /git/spack/var/spack/repos/builtin/packages/gdbm/package.py:49
==> Fetching http://ftp.gnu.org/gnu/gdbm/gdbm-1.14.1.tar.gz
################################################################################################################################################## 100.0%
==> Staging archive: /git/spack/var/spack/stage/gdbm-1.14.1-6zse4dhahz7j4dzaunpqlqvpvnhsecfw/gdbm-1.14.1.tar.gz
==> Created stage in /git/spack/var/spack/stage/gdbm-1.14.1-6zse4dhahz7j4dzaunpqlqvpvnhsecfw
==> No patches needed for gdbm
==> Building gdbm [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Executing phase: 'build'
==> Executing phase: 'install'
==> Successfully installed gdbm
  Fetch: 2.22s.  Build: 18.50s.  Total: 20.71s.
[+] /git/spack/opt/spack/darwin-sierra-x86_64/clang-8.1.0-apple/gdbm-1.14.1-6zse4dhahz7j4dzaunpqlqvpvnhsecfw
==> Installing perl
==> Fetching http://www.cpan.org/src/5.0/perl-5.24.1.tar.gz
################################################################################################################################################## 100.0%
==> Fetching http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7042.tar.gz
################################################################################################################################################## 100.0%
==> Staging archive: /git/spack/var/spack/stage/perl-5.24.1-2zifdxuvr55cu6r2tz7knaw6jspb5zto/perl-5.24.1.tar.gz
==> Created stage in /git/spack/var/spack/stage/perl-5.24.1-2zifdxuvr55cu6r2tz7knaw6jspb5zto
==> Staging archive: /git/spack/var/spack/stage/resource-cpanm-2zifdxuvr55cu6r2tz7knaw6jspb5zto/App-cpanminus-1.7042.tar.gz
==> Created stage in /git/spack/var/spack/stage/resource-cpanm-2zifdxuvr55cu6r2tz7knaw6jspb5zto
==> Moving resource stage
	source : /git/spack/var/spack/stage/resource-cpanm-2zifdxuvr55cu6r2tz7knaw6jspb5zto/App-cpanminus-1.7042/
	destination : /git/spack/var/spack/stage/perl-5.24.1-2zifdxuvr55cu6r2tz7knaw6jspb5zto/perl-5.24.1/cpanm/cpanm
==> No patches needed for perl
==> Building perl [Package]
==> Executing phase: 'configure'
==> Executing phase: 'build'
==> Executing phase: 'install'
==> Successfully installed perl
  Fetch: 20.85s.  Build: 3m 5.31s.  Total: 3m 26.15s.
[+] /git/spack/opt/spack/darwin-sierra-x86_64/clang-8.1.0-apple/perl-5.24.1-2zifdxuvr55cu6r2tz7knaw6jspb5zto
==> Installing autoconf
==> Fetching http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
################################################################################################################################################## 100.0%
==> Staging archive: /git/spack/var/spack/stage/autoconf-2.69-fsrvyn2mqeezaxtcazduiomajtmfvvho/autoconf-2.69.tar.gz
==> Created stage in /git/spack/var/spack/stage/autoconf-2.69-fsrvyn2mqeezaxtcazduiomajtmfvvho
==> Ran patch() for autoconf
==> Building autoconf [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Executing phase: 'build'
==> Executing phase: 'install'
==> Successfully installed autoconf
  Fetch: 4.50s.  Build: 6.83s.  Total: 11.33s.
[+] /git/spack/opt/spack/darwin-sierra-x86_64/clang-8.1.0-apple/autoconf-2.69-fsrvyn2mqeezaxtcazduiomajtmfvvho
==> Installing automake
==> Fetching http://ftp.gnu.org/gnu/automake/automake-1.15.1.tar.gz
################################################################################################################################################## 100.0%
==> Staging archive: /git/spack/var/spack/stage/automake-1.15.1-ssgpaw6nbs4fkxgybkrx6vo2jzir4px4/automake-1.15.1.tar.gz
==> Created stage in /git/spack/var/spack/stage/automake-1.15.1-ssgpaw6nbs4fkxgybkrx6vo2jzir4px4
==> Ran patch() for automake
==> Building automake [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Executing phase: 'build'
==> Executing phase: 'install'
==> Successfully installed automake
  Fetch: 5.19s.  Build: 6.23s.  Total: 11.42s.
[+] /git/spack/opt/spack/darwin-sierra-x86_64/clang-8.1.0-apple/automake-1.15.1-ssgpaw6nbs4fkxgybkrx6vo2jzir4px4
==> Installing libtool
==> Fetching http://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz
################################################################################################################################################## 100.0%
==> Staging archive: /git/spack/var/spack/stage/libtool-2.4.6-q23qd54bfr5xuap4czntyfaysgxduc53/libtool-2.4.6.tar.gz
==> Created stage in /git/spack/var/spack/stage/libtool-2.4.6-q23qd54bfr5xuap4czntyfaysgxduc53
==> No patches needed for libtool
==> Building libtool [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Executing phase: 'build'
==> Executing phase: 'install'
==> Successfully installed libtool
  Fetch: 4.82s.  Build: 19.19s.  Total: 24.01s.
[+] /git/spack/opt/spack/darwin-sierra-x86_64/clang-8.1.0-apple/libtool-2.4.6-q23qd54bfr5xuap4czntyfaysgxduc53
==> Installing numactl
==> Fetching https://github.com/numactl/numactl/archive/v2.0.11.tar.gz
-=O=#    #     #       #                                                                                                                                
==> Staging archive: /git/spack/var/spack/stage/numactl-2.0.11-2ib7cgkbqdu3f6ijmqpmn7yutpzheh4q/v2.0.11.tar.gz
==> Created stage in /git/spack/var/spack/stage/numactl-2.0.11-2ib7cgkbqdu3f6ijmqpmn7yutpzheh4q
==> No patches needed for numactl
==> Building numactl [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    'make' '-j8'

27 errors found in build log:
     28     libtoolize: copying file 'm4/ltsugar.m4'
     29     libtoolize: copying file 'm4/ltversion.m4'
     30     libtoolize: copying file 'm4/lt~obsolete.m4'
     31     autoreconf: running: /git/spack/opt/spack/darwin-sierra-x86_64/clang-8.1.0-apple/autoconf-2.69-fsrvyn2mqeezaxtcazduiomajtmfvvho/bin/autoconf
             --include=/git/spack/opt/spack/darwin-sierra-x86_64/clang-8.1.0-apple/pkgconf-1.4.0-tengbb33gehtiyetbc22a3znib66zszk/share/aclocal --force
     32     autoreconf: running: /git/spack/opt/spack/darwin-sierra-x86_64/clang-8.1.0-apple/autoconf-2.69-fsrvyn2mqeezaxtcazduiomajtmfvvho/bin/autohead
            er --include=/git/spack/opt/spack/darwin-sierra-x86_64/clang-8.1.0-apple/pkgconf-1.4.0-tengbb33gehtiyetbc22a3znib66zszk/share/aclocal --forc
            e
     33     autoreconf: running: automake --add-missing --copy --force-missing
  >> 34     configure.ac:13: installing 'build-aux/compile'
  >> 35     configure.ac:13: installing 'build-aux/config.guess'
  >> 36     configure.ac:13: installing 'build-aux/config.sub'
  >> 37     configure.ac:9: installing 'build-aux/install-sh'
  >> 38     configure.ac:9: installing 'build-aux/missing'
     39     Makefile.am: installing 'build-aux/depcomp'
     40     parallel-tests: installing 'build-aux/test-driver'
     41     autoreconf: Leaving directory `.'
     42     ==> Executing phase: 'configure'
     43     ==> '/git/spack/var/spack/stage/numactl-2.0.11-2ib7cgkbqdu3f6ijmqpmn7yutpzheh4q/numactl-2.0.11/configure' '--prefix=/git/spack/opt/spack/dar
            win-sierra-x86_64/clang-8.1.0-apple/numactl-2.0.11-2ib7cgkbqdu3f6ijmqpmn7yutpzheh4q'
     44     checking for a BSD-compatible install... /usr/bin/install -c

     ...

     157    #define howmany(x,y) (((x)+((y)-1))/(y))
     158            ^
     159    /usr/include/sys/types.h:184:9: note: previous definition is here
     160    #define howmany(x, y)   __DARWIN_howmany(x, y)  /* # y's == x bits? */
     161            ^
     162      CC       shm.o
  >> 163    rtnetlink.c:3:10: fatal error: 'linux/rtnetlink.h' file not found
     164    #include <linux/rtnetlink.h>
     165             ^
     166    In file included from distance.c:24:
     167    ./numaint.h:53:9: warning: 'howmany' macro redefined [-Wmacro-redefined]
     168    #define howmany(x,y) (((x)+((y)-1))/(y))
     169            ^
     170    /usr/include/sys/types.h:184:9: note: previous definition is here
     171    #define howmany(x, y)   __DARWIN_howmany(x, y)  /* # y's == x bits? */
     172            ^
  >> 173    syscall.c:18:10: fatal error: 'asm/unistd.h' file not found
     174    #include <asm/unistd.h>
     175             ^
     176    1 error generated.
  >> 177    make[1]: *** [rtnetlink.lo] Error 1
     178    make[1]: *** Waiting for unfinished jobs....
     179    In file included from shm.c:34:
     180    ./numaint.h:53:9: warning: 'howmany' macro redefined [-Wmacro-redefined]
     181    #define howmany(x,y) (((x)+((y)-1))/(y))
     182            ^
     183    /usr/include/sys/types.h:184:9: note: previous definition is here

     ...

     203    shm.c:163:11: warning: implicit declaration of function 'mmap64' is invalid in C99 [-Wimplicit-function-declaration]
     204            shmptr = mmap64(NULL, shmlen, PROT_READ, MAP_SHARED, shmfd, shmoffset);
     205                     ^
     206    shm.c:163:9: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
     207            shmptr = mmap64(NULL, shmlen, PROT_READ, MAP_SHARED, shmfd, shmoffset);
     208                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  >> 209    affinity.c:40:10: fatal error: 'linux/rtnetlink.h' file not found
     210    #include <linux/rtnetlink.h>
     211             ^
  >> 212    make[1]: *** [syscall.lo] Error 1
     213    1 error generated.
  >> 214    make[1]: *** [affinity.lo] Error 1
     215    1 warning generated.
     216    1 warning generated.
     217    5 warnings generated.
     218    1 warning generated.
     219    In file included from libnuma.c:37:
     220    ./numaint.h:53:9: warning: 'howmany' macro redefined [-Wmacro-redefined]
     221    #define howmany(x,y) (((x)+((y)-1))/(y))
     222            ^
     223    /usr/include/sys/types.h:184:9: note: previous definition is here
     224    #define howmany(x, y)   __DARWIN_howmany(x, y)  /* # y's == x bits? */
     225            ^
  >> 226    libnuma.c:317:1: error: only weak aliases are supported on darwin
     227    make_internal_alias(numa_pagesize);
     228    ^
     229    ./numaint.h:18:73: note: expanded from macro 'make_internal_alias'
     230    #define make_internal_alias(x) extern __typeof (x) x##_int __attribute((alias(#x), visibility("hidden")))
     231                                                                            ^
  >> 232    libnuma.c:670:1: error: only weak aliases are supported on darwin
     233    make_internal_alias(numa_max_node);
     234    ^
     235    ./numaint.h:18:73: note: expanded from macro 'make_internal_alias'
     236    #define make_internal_alias(x) extern __typeof (x) x##_int __attribute((alias(#x), visibility("hidden")))
     237                                                                            ^
  >> 238    libnuma.c:691:1: error: only weak aliases are supported on darwin
     239    make_internal_alias(numa_max_possible_node_v1);
     240    ^
     241    ./numaint.h:18:73: note: expanded from macro 'make_internal_alias'
     242    #define make_internal_alias(x) extern __typeof (x) x##_int __attribute((alias(#x), visibility("hidden")))
     243                                                                            ^
  >> 244    libnuma.c:692:1: error: only weak aliases are supported on darwin
     245    make_internal_alias(numa_max_possible_node_v2);
     246    ^
     247    ./numaint.h:18:73: note: expanded from macro 'make_internal_alias'
     248    #define make_internal_alias(x) extern __typeof (x) x##_int __attribute((alias(#x), visibility("hidden")))
     249                                                                            ^
  >> 250    libnuma.c:780:1: error: only weak aliases are supported on darwin
     251    make_internal_alias(numa_node_size64);
     252    ^
     253    ./numaint.h:18:73: note: expanded from macro 'make_internal_alias'
     254    #define make_internal_alias(x) extern __typeof (x) x##_int __attribute((alias(#x), visibility("hidden")))
     255                                                                            ^
  >> 256    libnuma.c:857:1: error: only weak aliases are supported on darwin
     257    make_internal_alias(numa_police_memory);
     258    ^
     259    ./numaint.h:18:73: note: expanded from macro 'make_internal_alias'
     260    #define make_internal_alias(x) extern __typeof (x) x##_int __attribute((alias(#x), visibility("hidden")))
     261                                                                            ^
     262    libnuma.c:873:8: warning: implicit declaration of function 'mremap' is invalid in C99 [-Wimplicit-function-declaration]
     263            mem = mremap(old_addr, old_size, new_size, MREMAP_MAYMOVE);
     264                  ^
  >> 265    libnuma.c:873:45: error: use of undeclared identifier 'MREMAP_MAYMOVE'
     266            mem = mremap(old_addr, old_size, new_size, MREMAP_MAYMOVE);
     267                                                       ^
  >> 268    libnuma.c:916:1: error: only weak aliases are supported on darwin
     269    make_internal_alias(numa_alloc_interleaved_subset_v1);
     270    ^
     271    ./numaint.h:18:73: note: expanded from macro 'make_internal_alias'
     272    #define make_internal_alias(x) extern __typeof (x) x##_int __attribute((alias(#x), visibility("hidden")))
     273                                                                            ^
  >> 274    libnuma.c:917:1: error: only weak aliases are supported on darwin
     275    make_internal_alias(numa_alloc_interleaved_subset_v2);
     276    ^
     277    ./numaint.h:18:73: note: expanded from macro 'make_internal_alias'
     278    #define make_internal_alias(x) extern __typeof (x) x##_int __attribute((alias(#x), visibility("hidden")))
     279                                                                            ^
  >> 280    libnuma.c:1051:1: error: only weak aliases are supported on darwin
     281    make_internal_alias(numa_set_membind_v2);
     282    ^
     283    ./numaint.h:18:73: note: expanded from macro 'make_internal_alias'
     284    #define make_internal_alias(x) extern __typeof (x) x##_int __attribute((alias(#x), visibility("hidden")))
     285                                                                            ^
  >> 286    libnuma.c:1157:1: error: only weak aliases are supported on darwin
     287    make_internal_alias(numa_get_mems_allowed);
     288    ^
     289    ./numaint.h:18:73: note: expanded from macro 'make_internal_alias'
     290    #define make_internal_alias(x) extern __typeof (x) x##_int __attribute((alias(#x), visibility("hidden")))
     291                                                                            ^
  >> 292    libnuma.c:1399:1: error: only weak aliases are supported on darwin
     293    make_internal_alias(numa_node_to_cpus_v1);
     294    ^
     295    ./numaint.h:18:73: note: expanded from macro 'make_internal_alias'
     296    #define make_internal_alias(x) extern __typeof (x) x##_int __attribute((alias(#x), visibility("hidden")))
     297                                                                            ^
  >> 298    libnuma.c:1400:1: error: only weak aliases are supported on darwin
     299    make_internal_alias(numa_node_to_cpus_v2);
     300    ^
     301    ./numaint.h:18:73: note: expanded from macro 'make_internal_alias'
     302    #define make_internal_alias(x) extern __typeof (x) x##_int __attribute((alias(#x), visibility("hidden")))
     303                                                                            ^
  >> 304    libnuma.c:1538:1: error: only weak aliases are supported on darwin
     305    make_internal_alias(numa_run_on_node_mask_v2);
     306    ^
     307    ./numaint.h:18:73: note: expanded from macro 'make_internal_alias'
     308    #define make_internal_alias(x) extern __typeof (x) x##_int __attribute((alias(#x), visibility("hidden")))
     309                                                                            ^
     310    2 warnings and 14 errors generated.
  >> 311    make[1]: *** [libnuma.lo] Error 1
  >> 312    make: *** [all] Error 2

See build log for details:
  /git/spack/var/spack/stage/numactl-2.0.11-2ib7cgkbqdu3f6ijmqpmn7yutpzheh4q/numactl-2.0.11/spack-build.out
```

[spack-build.out.txt](https://github.com/spack/spack/files/1820559/spack-build.out.txt)



Discussion:
`numactl` is known not to build on darwin, that's why we have https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/hdf5/package.py#L73-L74 
so it should not even try to install it, can you post output of
```
spack spec -I hdf5
```
?
```
spack spec -I hdf5
Input spec
--------------------------------
     hdf5

Concretized
--------------------------------
     hdf5@1.10.1%clang@8.1.0-apple~cxx~debug~fortran~hl+mpi+pic+shared~szip~threadsafe arch=darwin-sierra-x86_64 
         ^openmpi@3.0.0%clang@8.1.0-apple~cuda fabrics= ~java schedulers= ~sqlite3~thread_multiple~ucx+vt arch=darwin-sierra-x86_64 
             ^hwloc@1.11.9%clang@8.1.0-apple~cairo~cuda+libxml2~pci+shared arch=darwin-sierra-x86_64 
[+]              ^libxml2@2.9.4%clang@8.1.0-apple~python arch=darwin-sierra-x86_64 
[+]                  ^pkgconf@1.4.0%clang@8.1.0-apple arch=darwin-sierra-x86_64 
[+]                  ^xz@5.2.3%clang@8.1.0-apple arch=darwin-sierra-x86_64 
[+]                  ^zlib@1.2.11%clang@8.1.0-apple+optimize+pic+shared arch=darwin-sierra-x86_64 
                 ^numactl@2.0.11%clang@8.1.0-apple arch=darwin-sierra-x86_64 
[+]                  ^autoconf@2.69%clang@8.1.0-apple arch=darwin-sierra-x86_64 
[+]                      ^m4@1.4.18%clang@8.1.0-apple patches=3877ab548f88597ab2327a2230ee048d2d07ace1062efe81fc92e91b7f39cd00 +sigsegv arch=darwin-sierra-x86_64 
[+]                          ^libsigsegv@2.11%clang@8.1.0-apple arch=darwin-sierra-x86_64 
[+]                      ^perl@5.24.1%clang@8.1.0-apple+cpanm+shared arch=darwin-sierra-x86_64 
[+]                          ^gdbm@1.14.1%clang@8.1.0-apple arch=darwin-sierra-x86_64 
[+]                              ^readline@7.0%clang@8.1.0-apple arch=darwin-sierra-x86_64 
[+]                                  ^ncurses@6.0%clang@8.1.0-apple patches=f84b2708a42777aadcc7f502a261afe10ca5646a51c1ef8b5e60d2070d926b57 ~symlinks~termlib arch=darwin-sierra-x86_64 
[+]                  ^automake@1.15.1%clang@8.1.0-apple arch=darwin-sierra-x86_64 
[+]                  ^libtool@2.4.6%clang@8.1.0-apple arch=darwin-sierra-x86_64 

```
ah, it's a recent bug (1 day) from https://github.com/spack/spack/pull/7483 @alalazo ping 😄 
Oh ok! I'll chekcout the latest release tag then. Thanks!
hum... checking out the last tagged version I get:

```
==> Installing openmpi
==> Fetching http://www.open-mpi.org/software/ompi/v3.0/downloads/openmpi-3.0.0.tar.bz2
################################################################################################################################################## 100.0%################################################################################################################################################## 100.0%
==> Staging archive: /git/spack/var/spack/stage/openmpi-3.0.0-euqkssj2u6n4gza4qvg6gvh6avu3blzv/openmpi-3.0.0.tar.bz2
==> Created stage in /git/spack/var/spack/stage/openmpi-3.0.0-euqkssj2u6n4gza4qvg6gvh6avu3blzv
==> No patches needed for openmpi
==> Building openmpi [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Error: InstallError: OpenMPI requires both C and Fortran compilers!
InstallError: InstallError: OpenMPI requires both C and Fortran compilers!

/git/spack/var/spack/repos/builtin/packages/openmpi/package.py:289, in die_without_fortran:
     4             # avoid delayed build errors in dependents.
     5             if (self.compiler.f77 is None) or (self.compiler.fc is None):
     6                 raise InstallError(
  >> 7                     'OpenMPI requires both C and Fortran compilers!'
     8                 )

See build log for details:
  /git/spack/var/spack/stage/openmpi-3.0.0-euqkssj2u6n4gza4qvg6gvh6avu3blzv/openmpi-3.0.0/spack-build.out
```

do i need to run some sort of `clean` command.
> do i need to run some sort of clean command.

nope, you need to act upon the error message:

> 'OpenMPI requires both C and Fortran compilers!'

namely, install `gcc` and setup mixed toolchain http://spack.readthedocs.io/en/latest/getting_started.html#mixed-toolchains

oh ok, sorry I'm used to conda that brings these things automagically for you.
ok took a few hours to build gcc (spack install gcc)
I still get the same error, and i can't seem to be be able to tell it to build fortran
```
/git/spack/var/spack/repos/builtin/packages/openmpi/package.py:289, in die_without_fortran:
     4             # avoid delayed build errors in dependents.
     5             if (self.compiler.f77 is None) or (self.compiler.fc is None):
     6                 raise InstallError(
  >> 7                     'OpenMPI requires both C and Fortran compilers!'
     8                 )

See build log for details:
  /git/spack/var/spack/stage/openmpi-3.0.0-euqkssj2u6n4gza4qvg6gvh6avu3blzv/openmpi-3.0.0/spack-build.out
doutriaux1@loki:[spack]:[27868]> spack install gfortran
==> Error: Package gfortran not found.
doutriaux1@loki:[spack]:[27869]> spack install fortran
==> Error: Package fortran not found.
```

Although you installed GCC with Spack, Spack doesn't automatically add it to your list of known compilers. If you run `spack find -p gcc` it will print the directory where GCC was installed to. You can then run `spack compiler add <this path>` to add it to your `compilers.yaml`. Note that GCC is sometimes buggy in macOS (it will build many but not all packages). I would personally recommend using Clang but with GFortran as your Fortran compiler. If you run `spack config edit compiler` it should open up your `compilers.yaml`. You can manually edit this and replace null or none or whatever it says for f77 and fc and replace it with the path to these compilers listed in the GCC entry.

Much of this is documented here, but I agree that we could probably make this more prominent in the docs:
http://spack.readthedocs.io/en/latest/getting_started.html#mixed-toolchains

P.S. Spack may take a bit more hand-holding than Conda or Homebrew when you're first getting started, but when you get the hang of it, it becomes much more powerful. Welcome to the Spack community @doutriaux1!

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py
--- a/var/spack/repos/builtin/packages/hwloc/package.py
+++ b/var/spack/repos/builtin/packages/hwloc/package.py
@@ -77,7 +77,7 @@ class Hwloc(AutotoolsPackage):
     depends_on('libpciaccess', when='+pci')
     depends_on('libxml2', when='+libxml2')
     depends_on('cairo', when='+cairo')
-    depends_on('numactl', when='@:1.11.9')
+    depends_on('numactl', when='@:1.11.9 platform=linux')
 
     def url_for_version(self, version):
         return "http://www.open-mpi.org/software/hwloc/v%s/downloads/hwloc-%s.tar.gz" % (version.up_to(2), version)


Test patch: