spack / spack

A flexible package manager that supports multiple versions, configurations, platforms, and compilers.
https://spack.io
Other
4.21k stars 2.24k forks source link

Build errors on OSX BigSur - A collection #19905

Open healther opened 3 years ago

healther commented 3 years ago

For now I just want to have a place to collect and track build errors and (eventually) mitigations that are connected to the new OSX. Feel free to add your experiences below

healther commented 3 years ago

First up: python@3.7.4

==> Installing python
==> No binary for python found: installing from source
==> Fetching https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
########################################################################################################################################################### 100.0%
==> python: Executing phase: 'autoreconf'
==> python: Executing phase: 'configure'
==> python: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    'make' '-j4'

2 errors found in build log:
     847    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/uio.h:103:9: note: 'preadv' has been m
            arked as being introduced in macOS 11.0 here, but the deployment target is macOS 10.16.0
     848    ssize_t preadv(int, const struct iovec *, int, off_t) __DARWIN_NOCANCEL(preadv) __API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));
     849            ^
     850    /var/folders/1q/jxx1cgcx3l13d153s6_c1zc00000gn/T/healther/spack-stage/spack-stage-python-3.7.4-v4w32a4ae37xug2zf4thapcxb3czef7b/spack-src/Modules/pos
            ixmodule.c:8294:13: note: enclose 'preadv' in a __builtin_available check to silence this warning
     851            n = preadv(fd, iov, cnt, offset);
     852                ^~~~~~
  >> 853    /var/folders/1q/jxx1cgcx3l13d153s6_c1zc00000gn/T/healther/spack-stage/spack-stage-python-3.7.4-v4w32a4ae37xug2zf4thapcxb3czef7b/spack-src/Modules/pos
            ixmodule.c:8433:15: error: implicit declaration of function 'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
     854            ret = sendfile(in, out, offset, &sbytes, &sf, flags);
     855                  ^
     856    /var/folders/1q/jxx1cgcx3l13d153s6_c1zc00000gn/T/healther/spack-stage/spack-stage-python-3.7.4-v4w32a4ae37xug2zf4thapcxb3czef7b/spack-src/Modules/pos
            ixmodule.c:8837:18: warning: 'pwritev' is only available on macOS 11.0 or newer [-Wunguarded-availability-new]
     857            result = pwritev(fd, iov, cnt, offset);
     858                     ^~~~~~~
     859    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/uio.h:104:9: note: 'pwritev' has been 
            marked as being introduced in macOS 11.0 here, but the deployment target is macOS 10.16.0
     860    ssize_t pwritev(int, const struct iovec *, int, off_t) __DARWIN_NOCANCEL(pwritev) __API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));
     861            ^
     862    /var/folders/1q/jxx1cgcx3l13d153s6_c1zc00000gn/T/healther/spack-stage/spack-stage-python-3.7.4-v4w32a4ae37xug2zf4thapcxb3czef7b/spack-src/Modules/pos
            ixmodule.c:8837:18: note: enclose 'pwritev' in a __builtin_available check to silence this warning
     863            result = pwritev(fd, iov, cnt, offset);
     864                     ^~~~~~~
     865    2 warnings and 1 error generated.
  >> 866    make: *** [Modules/posixmodule.o] Error 1
     867    make: *** Waiting for unfinished jobs....

See build log for details:
  /var/folders/1q/jxx1cgcx3l13d153s6_c1zc00000gn/T/healther/spack-stage/spack-stage-python-3.7.4-v4w32a4ae37xug2zf4thapcxb3czef7b/spack-build-out.txt

Mitigation: python@3.8.6 builds without error

omor1 commented 3 years ago

Presumably another issue will be needed for issues with Apple Silicon (ARM-based Macs) once Spackers get their hands on them.

healther commented 3 years ago

Next up: veclibfort from within an environment

healther@MacBook-Air-3 spack % spack install
==> Installing environment generalenv
[+] /Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsurIntel-skylake/apple-clang-12.0.0/libiconv-1.16-dho47kkh5d4esjwdhuqp3mxps345qnze
[+] /Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsurIntel-skylake/apple-clang-12.0.0/expat-2.2.10-5vpfrwxbb2vbh2wnvq7svuc46s2u7hmi
[+] /Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsurIntel-skylake/apple-clang-12.0.0/pkgconf-1.7.3-mwv4haohzvcpspxc72e5hvpkw5mbhy6h
[+] /Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsurIntel-skylake/apple-clang-12.0.0/xz-5.2.5-gaqfzzcf6fopwqjlr5qkg5grwrp5qut2
[+] /Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsurIntel-skylake/apple-clang-12.0.0/zlib-1.2.11-7ceah2bv6bhvqnsrcyjzdht4qw62cyue
[+] /Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsurIntel-skylake/apple-clang-12.0.0/libffi-3.3-c4pn2yyls5tmelkvbf5qr5p67gb6yukp
[+] /Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsurIntel-skylake/apple-clang-12.0.0/berkeley-db-18.1.40-ikocx5kqvmnguvzfm7bkswlmdtuj5cwq
==> Installing veclibfort
==> No binary for veclibfort found: installing from source
==> Error: Failed to install veclibfort due to RecursionError: maximum recursion depth exceeded while calling a Python object
==> Warning: Skipping build of py-numpy since veclibfort failed

Mitigation: Install outside an environment.

Not sure if this is BigSur related though.

Edit: This seems to be happening more and more, I'm not completely sure, but I think it only happens when executing through the spack-build python@3.8.6

healther commented 3 years ago

Next up: py-scikit-image

==> Installing py-scikit-image
==> No binary for py-scikit-image found: installing from source
==> Warning: microarchitecture specific optimizations are not supported yet on mixed compiler toolchains [check apple-clang@12.0.0 for further details]
==> Using cached archive: /Users/healther/Documents/git.nosync/spack/var/spack/cache/_source-cache/archive/bd/bd954c0588f0f7e81d9763dc95e06950e68247d540476e06cb77bcbcd8c2d8b3.tar.gz
==> py-scikit-image: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 1:
    '/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/python-3.8.6-kp45ednx4zz4owr3g64so4kf7oib2xyo/bin/python3.8' '-s' 'setup.py' '--no-user-cfg' 'build'

3 errors found in build log:
     581     customize UnixCCompiler using ConditionalOpenMP
     582     C compiler: /Users/healther/Documents/git.nosync/spack/lib/spack/env/clang/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -f
             wrapv -O3 -Wall -fPIC
     583     
     584     compile options: '-I/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/python-3.8.6-kp45ednx4zz4owr3g64so
             4kf7oib2xyo/include/python3.8 -c'
     585     extra options: '-fopenmp'
     586     clang: test.c
  >> 587     clang: error: unsupported option '-fopenmp'
     588     building 'skimage._shared.geometry' extension
     589     compiling C sources
     590     C compiler: /Users/healther/Documents/git.nosync/spack/lib/spack/env/clang/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -f
             wrapv -O3 -Wall -fPIC
     591     
     592     creating build/temp.macosx-10.16-x86_64-3.8/skimage
     593     creating build/temp.macosx-10.16-x86_64-3.8/skimage/_shared

     ...

     1343    skimage/restoration/unwrap_2d_ljmu.c:649:7: warning: unused variable 'image_height_minus_one' [-Wunused-variable]
     1344      int image_height_minus_one = image_height - 1;
     1345          ^
     1346    skimage/restoration/unwrap_2d_ljmu.c:646:7: warning: unused variable 'image_width_plus_one' [-Wunused-variable]
     1347      int image_width_plus_one = image_width + 1;
     1348          ^
  >> 1349    skimage/restoration/_unwrap_2d.c:2285:9: error: implicit declaration of function 'unwrap2D' is invalid in C99 [-Werror,-Wimplicit-function-declarati
             on]
     1350            unwrap2D((&(*((double *) ( /* dim=1 */ ((char *) (((double *) ( /* dim=0 */ (__pyx_v_image.data + __pyx_t_10 * __pyx_v_image.strides[0]) )) 
             + __pyx_t_11)) )))), (&(*((double *) ( /* dim=1 */ ((char *) (((double *) ( /* dim=0 */ (__pyx_v_unwrapped_image.data + __pyx_t_12 * __pyx_v_unwrapp
             ed_image.strides[0]) )) + __pyx_t_13)) )))), (&(*((unsigned char *) ( /* dim=1 */ ((char *) (((unsigned char *) ( /* dim=0 */ (__pyx_v_mask.data + _
             _pyx_t_14 * __pyx_v_mask.strides[0]) )) + __pyx_t_15)) )))), (__pyx_v_image.shape[1]), (__pyx_v_image.shape[0]), __pyx_v_wrap_around_x, __pyx_v_wrap
             _around_y, __pyx_v_use_seed, __pyx_v_cseed);
     1351            ^
     1352    1 error generated.
     1353    4 warnings generated.
  >> 1354    error: Command "/Users/healther/Documents/git.nosync/spack/lib/spack/env/clang/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -
             g -fwrapv -O3 -Wall -fPIC -I/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/py-numpy-1.19.4-eqfiwmovw3
             tyaaqqbc2qgoowalp2b7yb/lib/python3.8/site-packages/numpy/core/include -I/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/a
             pple-clang-12.0.0/py-numpy-1.19.4-eqfiwmovw3tyaaqqbc2qgoowalp2b7yb/lib/python3.8/site-packages/numpy/core/include -I/Users/healther/Documents/git.no
             sync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/python-3.8.6-kp45ednx4zz4owr3g64so4kf7oib2xyo/include/python3.8 -c skimage/restoration
             /_unwrap_2d.c -o build/temp.macosx-10.16-x86_64-3.8/skimage/restoration/_unwrap_2d.o -MMD -MF build/temp.macosx-10.16-x86_64-3.8/skimage/restoration
             /_unwrap_2d.o.d" failed with exit status 1

This is due to a) Xcode 12 treating all implicit function declarations as errors (rather than warnings) and thus failing the build (also for older versions, I had @0.14.2 before). That can be work-arounded by adding

def setup_build_environment(self, env):
        # starting with apple-clang@12.0.0 implicit function declarations are
        # treated as an error, sk-image has those, as it worked before silence
        # the warning
        if self.spec.satisfies('%apple-clang@12:'):
            env.append_flags(
                'CFLAGS', '-Wno-implicit-function-declaration')

This then fails with an

setuptools.sandbox.UnpickleableException: DistutilsClassError("command class <class 'setuptools.command.bdist_egg.bdist_egg'> must subclass Command")

not sure why that happens, I'll bisect setup toolsversions next.

For newer versions, libomp is required, which the standard apple-clang cannot use, adding llvm-openmp allows me to build this in an spack build-env py-scikit-learn environment, but I haven't managed to convince the compiler wrappers to also recognise -fopenmp.

Update2: With older versions of py-setuptools the Exception disappears but I now get an superfluous -c argument (specifying the source file to compile explicitly) in the call to the compiler wrapper...

==> Installing py-scikit-image-0.14.2-ekponiti5qbp7bxm2vu5aq4rgisyok3t
==> No binary for py-scikit-image-0.14.2-ekponiti5qbp7bxm2vu5aq4rgisyok3t found: installing from source
==> Warning: microarchitecture specific optimizations are not supported yet on mixed compiler toolchains [check apple-clang@12.0.0 for further details]
==> Using cached archive: /Users/healther/Documents/git.nosync/spack/var/spack/cache/_source-cache/archive/1a/1afd0b84eefd77afd1071c5c1c402553d67be2d7db8950b32d6f773f25850c1f.tar.gz
==> py-scikit-image: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 1:
    '/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/python-3.8.6-kp45ednx4zz4owr3g64so4kf7oib2xyo/bin/python3.8' '-s' 'setup.py' '--no-user-cfg' 'build'

2 errors found in build log:
     458    C compiler: /Users/healther/Documents/git.nosync/spack/lib/spack/env/clang/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3
             -Wall -fPIC -Wno-implicit-function-declaration -Xpreprocessor -fopenmp -Xpreprocessor
     459    
     460    creating build/temp.macosx-10.16-x86_64-3.8/skimage
     461    creating build/temp.macosx-10.16-x86_64-3.8/skimage/_shared
     462    compile options: '-I/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/py-numpy-1.19.4-oumq45onsdrrbzi33znzyxsfvg4
            dzzs2/lib/python3.8/site-packages/numpy/core/include -I/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/python-3
            .8.6-kp45ednx4zz4owr3g64so4kf7oib2xyo/include/python3.8 -c'
     463    clang: skimage/_shared/geometry.c
  >> 464    error: unknown argument: '-c'
     465    Partial import of skimage during the build process.
  >> 466    error: Command "/Users/healther/Documents/git.nosync/spack/lib/spack/env/clang/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv
             -O3 -Wall -fPIC -Wno-implicit-function-declaration -Xpreprocessor -fopenmp -Xpreprocessor -I/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigs
            ur-skylake/apple-clang-12.0.0/py-numpy-1.19.4-oumq45onsdrrbzi33znzyxsfvg4dzzs2/lib/python3.8/site-packages/numpy/core/include -I/Users/healther/Documents/git
            .nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/python-3.8.6-kp45ednx4zz4owr3g64so4kf7oib2xyo/include/python3.8 -c skimage/_shared/geometry.
            c -o build/temp.macosx-10.16-x86_64-3.8/skimage/_shared/geometry.o -MMD -MF build/temp.macosx-10.16-x86_64-3.8/skimage/_shared/geometry.o.d" failed with exit
             status 1

has anyone seen something like this before?

healther commented 3 years ago

llvm@10.X

==> Installing llvm
==> No binary for llvm found: installing from source
==> Warning: microarchitecture specific optimizations are not supported yet on mixed compiler toolchains [check apple-clang@12.0.0 for further details]
==> Fetching https://spack-llnl-mirror.s3-us-west-2.amazonaws.com/_source-cache/archive/c7/c7ccb735c37b4ec470f66a6c35fbae4f029c0f88038f6977180b1a8ddc255637.tar.gz
########################################################################################################################################################### 100.0%
==> llvm: Executing phase: 'cmake'
==> Error: ProcessError: Command exited with status 1:
    'cmake' '-G' 'Unix Makefiles' '-DCMAKE_INSTALL_PREFIX:STRING=/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/llvm-10.0.1-xxrkmzu3o65yflwozxihwc25lhfuhdqm' '-DCMAKE_BUILD_TYPE:STRING=Release' '-DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=OFF' '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' '-DCMAKE_FIND_FRAMEWORK:STRING=LAST' '-DCMAKE_FIND_APPBUNDLE:STRING=LAST' '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF' '-DCMAKE_INSTALL_RPATH:STRING=/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/llvm-10.0.1-xxrkmzu3o65yflwozxihwc25lhfuhdqm/lib;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/llvm-10.0.1-xxrkmzu3o65yflwozxihwc25lhfuhdqm/lib64;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/hwloc-2.2.0-iegd6bwf6xpujybbp6ppdvdx2qrdxrpg/lib;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/libxml2-2.9.10-7c3n2tqmzemqig2najni2vs5b7pslxqs/lib;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/libiconv-1.16-vtlbzpnwlv67xi22d4ptphby4itfjdxn/lib;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/xz-5.2.5-hsism53fwf2yzogg6ierxkkjpywp5ye7/lib;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/zlib-1.2.11-xflsouiaysa3uizi6mjcwhv54aa5m6kd/lib;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/libedit-3.1-20191231-zntmxaniuiicfkl6cpzoqyhsuudz4tpz/lib;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/ncurses-6.2-gikh646beft7ztei3wiekwymc4dtwv43/lib;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/pcre-8.44-encs2ao32u7crws6f4jkexroa4cushrk/lib;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/z3-4.8.7-zah54dnv5zf6bmh3bbrc4dxf4whjylqp/lib;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/python-3.8.6-kp45ednx4zz4owr3g64so4kf7oib2xyo/lib;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/bzip2-1.0.8-hz5q7hx4mzwuyqvtuvjlxajivhourrdi/lib;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/expat-2.2.10-sqbxwbyq7stsqflb3gcitbpw33v3fl2d/lib;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/gdbm-1.18.1-mhckngfgvmlilgxlnchozhfsem5putka/lib;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/readline-8.0-cfoqvf3uxnuhf6wjwvqz3c3qgshzuhgq/lib;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/gettext-0.21-d6a6ozbqvbijy2we6xr7bzvfpddtchzx/lib;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/libffi-3.3-j4p2j5zj2asaop2jqfn5u2f3xhysnebd/lib;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/openssl-1.1.1h-mz7f4faoacuerhyo6xh3j43enhx6j47o/lib;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/sqlite-3.33.0-ubmeoki2lu2s7agljelylxv2uinnjppv/lib' '-DCMAKE_PREFIX_PATH:STRING=/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/cmake-3.18.4-zyrvgcce7ca66qsvembyfvie53fakaqg;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/python-3.8.6-kp45ednx4zz4owr3g64so4kf7oib2xyo;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/z3-4.8.7-zah54dnv5zf6bmh3bbrc4dxf4whjylqp;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/perl-data-dumper-2.173-qhkxjer4gi6naihnh5hiikdzttwvwjrj;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/hwloc-2.2.0-iegd6bwf6xpujybbp6ppdvdx2qrdxrpg;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/ncurses-6.2-gikh646beft7ztei3wiekwymc4dtwv43;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/swig-4.0.2-4wvnhqqb6cmsvp7q2mkllbfb3trxbq4l;/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/libedit-3.1-20191231-zntmxaniuiicfkl6cpzoqyhsuudz4tpz' '-DLLVM_REQUIRES_RTTI:BOOL=ON' '-DLLVM_ENABLE_RTTI:BOOL=ON' '-DLLVM_ENABLE_EH:BOOL=ON' '-DCLANG_DEFAULT_OPENMP_RUNTIME:STRING=libomp' '-DPYTHON_EXECUTABLE:PATH=/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/python-3.8.6-kp45ednx4zz4owr3g64so4kf7oib2xyo/bin/python3.8' '-DLIBOMP_USE_HWLOC:BOOL=ON' '-DLIBOMP_HWLOC_INSTALL_DIR=/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/hwloc-2.2.0-iegd6bwf6xpujybbp6ppdvdx2qrdxrpg' '-DCUDA_TOOLKIT_ROOT_DIR:PATH=IGNORE' '-DCUDA_SDK_ROOT_DIR:PATH=IGNORE' '-DCUDA_NVCC_EXECUTABLE:FILEPATH=IGNORE' '-DLIBOMPTARGET_DEP_CUDA_DRIVER_LIBRARIES:STRING=IGNORE' '-DLLDB_ENABLE_PYTHON:Bool=OFF' '-DCLANG_DEFAULT_CXX_STDLIB=libc++' '-DLINK_POLLY_INTO_TOOLS:Bool=ON' '-DLLVM_TARGETS_TO_BUILD:STRING=NVPTX;AMDGPU;X86' '-DLLDB_USE_SYSTEM_DEBUGSERVER=ON' '-DLLVM_ENABLE_PROJECTS:STRING=clang;clang-tools-extra;openmp;lldb;lld;compiler-rt;libcxx;libcxxabi;libunwind;polly' '/private/var/folders/1q/jxx1cgcx3l13d153s6_c1zc00000gn/T/healther/spack-stage/spack-stage-llvm-10.0.1-xxrkmzu3o65yflwozxihwc25lhfuhdqm/spack-src/llvm'

1 error found in build log:
     661    -- OSX supported builtin arches: i386;x86_64;x86_64h
     662    -- Using cached valid architectures for iossim.
     663    -- ios Simulator supported builtin arches: i386;x86_64
     664    -- Using cached valid architectures for ios.
     665    -- ios supported builtin arches: arm64;armv7;armv7k;armv7s
     666    -- Builtin supported architectures: i386;x86_64;x86_64h;armv7;armv7k;armv7s;arm64
  >> 667    CMake Error at /private/var/folders/1q/jxx1cgcx3l13d153s6_c1zc00000gn/T/healther/spack-stage/spack-stage-llvm-10.0.1-xxrkmzu3o65yflwozxihwc25lhfuhdqm
            /spack-src/compiler-rt/test/builtins/CMakeLists.txt:55 (message):
     668      Target clang_rt.builtins_arm64_osx does not exist
     669    
     670    
     671    -- Configuring incomplete, errors occurred!
     672    See also "/private/var/folders/1q/jxx1cgcx3l13d153s6_c1zc00000gn/T/healther/spack-stage/spack-stage-llvm-10.0.1-xxrkmzu3o65yflwozxihwc25lhfuhdqm/spac
            k-build-xxrkmzu/CMakeFiles/CMakeOutput.log".
     673    See also "/private/var/folders/1q/jxx1cgcx3l13d153s6_c1zc00000gn/T/healther/spack-stage/spack-stage-llvm-10.0.1-xxrkmzu3o65yflwozxihwc25lhfuhdqm/spac
            k-build-xxrkmzu/CMakeFiles/CMakeError.log".

This is fixed in llvm@11.X but py-numba requires a llvm@10 for now. See also #19347

healther commented 3 years ago

tk

==> Installing tk
==> No binary for tk found: installing from source
==> Warning: microarchitecture specific optimizations are not supported yet on mixed compiler toolchains [check apple-clang@12.0.0 for further details]
==> Fetching https://spack-llnl-mirror.s3-us-west-2.amazonaws.com/_source-cache/archive/49/49e7bca08dde95195a27f594f7c850b088be357a7c7096e44e1158c7a5fd7b33.tar.gz
########################################################################################################################################################### 100.0%
==> tk: Executing phase: 'autoreconf'
==> tk: Executing phase: 'configure'
==> tk: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    'make' '-j4'

3 errors found in build log:
     290    /Users/healther/Documents/git.nosync/spack/lib/spack/env/clang/clang -c -Os -pipe    -Wall -fno-common -DBUILD_tk -I/private/var/folders/1q/jxx1cgcx3
            l13d153s6_c1zc00000gn/T/healther/spack-stage/spack-stage-tk-8.6.8-cy42dzsmq3odlliwo7tdufg36mnwxq7f/spack-src/unix/../unix -I/private/var/folders/1q/j
            xx1cgcx3l13d153s6_c1zc00000gn/T/healther/spack-stage/spack-stage-tk-8.6.8-cy42dzsmq3odlliwo7tdufg36mnwxq7f/spack-src/unix/../generic -I/private/var/f
            olders/1q/jxx1cgcx3l13d153s6_c1zc00000gn/T/healther/spack-stage/spack-stage-tk-8.6.8-cy42dzsmq3odlliwo7tdufg36mnwxq7f/spack-src/unix/../bitmaps -I/Us
            ers/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/tcl-8.6.10-mk4sosizqydc56njhr6q436nkqabtozs/share/tcl/src/
            generic -I/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/tcl-8.6.10-mk4sosizqydc56njhr6q436nkqabtozs/s
            hare/tcl/src/unix -I/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/libx11-1.6.7-47zxiocrczpcpr6fwz7vgz
            xzk6fauldg/include -DPACKAGE_NAME=\"tk\" -DPACKAGE_TARNAME=\"tk\" -DPACKAGE_VERSION=\"8.6\" -DPACKAGE_STRING=\"tk\ 8.6\" -DPACKAGE_BUGREPORT=\"\" -DH
            AVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 
            -DHAVE_UNISTD_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_ATFORK=1 -DTCL_THREADS=1 -DM
            ODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DHAVE_HIDDEN=1 -DMAC_OSX_TCL=1 -DHAVE_COREFOUNDATION=1 -DHAVE_CAST_TO_UNION=1 
            -DTCL_SHLIB_EXT=\".dylib\" -DNDEBUG=1 -DTCL_CFG_OPTIMIZED=1 -DTCL_WIDE_INT_IS_LONG=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -Dstrtod=fixstrtod -D
            HAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DHAVE_PW_GECOS=1 -DHAVE_AVAILABILITYMACROS_H=1 -DHAVE_WEAK_IMPORT=1 -D_DARWIN_C_SOURCE=1 -DHAVE_XKBKEYCODETOKEYSY
            M=1 -DXKEYCODETOKEYSYM_IS_DEPRECATED=1 -DHAVE_XSS=1      -DTCL_NO_DEPRECATED   -mdynamic-no-pic /private/var/folders/1q/jxx1cgcx3l13d153s6_c1zc00000g
            n/T/healther/spack-stage/spack-stage-tk-8.6.8-cy42dzsmq3odlliwo7tdufg36mnwxq7f/spack-src/unix/../unix/tkAppInit.c
     291    rm -f libtkstub8.6.a
     292    ar cr libtkstub8.6.a tkStubLib.o ttkStubLib.o ; ranlib libtkstub8.6.a
     293    rm -f libtk8.6.dylib
     294    /Users/healther/Documents/git.nosync/spack/lib/spack/env/clang/clang -dynamiclib -Os -pipe      -prebind -headerpad_max_install_names -Wl,-search_pat
            hs_first  -Wl,-single_module -o libtk8.6.dylib tk3d.o tkArgv.o tkAtom.o tkBind.o tkBitmap.o tkBusy.o tkClipboard.o tkCmds.o tkColor.o tkConfig.o tkCo
            nsole.o tkCursor.o tkError.o tkEvent.o tkFocus.o tkFont.o tkGet.o tkGC.o tkGeometry.o tkGrab.o tkGrid.o tkMain.o tkObj.o tkOldConfig.o tkOption.o tkP
            ack.o tkPlace.o tkSelect.o tkStyle.o tkUndo.o tkUtil.o tkVisual.o tkWindow.o tkButton.o tkEntry.o tkFrame.o tkListbox.o tkMenu.o tkMenubutton.o tkMen
            uDraw.o tkMessage.o tkPanedWindow.o tkScale.o tkScrollbar.o tkCanvas.o tkCanvArc.o tkCanvBmap.o tkCanvImg.o tkCanvLine.o tkCanvPoly.o tkCanvPs.o tkCa
            nvText.o tkCanvUtil.o tkCanvWind.o tkRectOval.o tkTrig.o tkImage.o tkImgBmap.o tkImgGIF.o tkImgPNG.o tkImgPPM.o tkImgPhoto.o tkImgPhInstance.o tkText
            .o tkTextBTree.o tkTextDisp.o tkTextImage.o tkTextIndex.o tkTextMark.o tkTextTag.o tkTextWind.o tkStubInit.o ttkBlink.o ttkButton.o ttkCache.o ttkCla
            mTheme.o ttkClassicTheme.o ttkDefaultTheme.o ttkElements.o ttkEntry.o ttkFrame.o ttkImage.o ttkInit.o ttkLabel.o ttkLayout.o ttkManager.o ttkNotebook
            .o ttkPanedwindow.o ttkProgress.o ttkScale.o ttkScrollbar.o ttkScroll.o ttkSeparator.o ttkSquare.o ttkState.o ttkTagSet.o ttkTheme.o ttkTrace.o ttkTr
            ack.o ttkTreeview.o ttkWidget.o ttkStubInit.o tkUnix.o tkUnix3d.o tkUnixButton.o tkUnixColor.o tkUnixConfig.o tkUnixCursor.o tkUnixDraw.o tkUnixEmbed
            .o tkUnixEvent.o tkUnixFocus.o  tkUnixFont.o tkUnixInit.o tkUnixKey.o tkUnixMenu.o tkUnixMenubu.o tkUnixScale.o tkUnixScrlbr.o tkUnixSelect.o tkUnixS
            end.o tkUnixWm.o tkUnixXId.o  -lpthread -framework CoreFoundation  -L/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple
            -clang-12.0.0/libx11-1.6.7-47zxiocrczpcpr6fwz7vgzxzk6fauldg/lib -lX11 -Wl,-weak-lXss -lXext  -lz  -lpthread -framework CoreFoundation  -L/Users/healt
            her/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/tcl-8.6.10-mk4sosizqydc56njhr6q436nkqabtozs/lib -ltclstub8.6  -comp
            atibility_version 8.6 -current_version 8.6.8 -install_name "/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12
            .0.0/tk-8.6.8-cy42dzsmq3odlliwo7tdufg36mnwxq7f/lib:/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/tcl-
            8.6.10-mk4sosizqydc56njhr6q436nkqabtozs/lib:/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/libx11-1.6.
            7-47zxiocrczpcpr6fwz7vgzxzk6fauldg/lib/libtk8.6.dylib" -unexported_symbols_list $(f=libtk8.6.dylib.E && nm -gp tkMacOSX*.o 2>/dev/null | awk "/^[0-9a
            -f]+ . \.objc/ {print \$3}" > $f && nm -gjp "/Users/healther/Documents/git.nosync/spack/opt/spack/darwin-bigsur-skylake/apple-clang-12.0.0/tcl-8.6.10
            -mk4sosizqydc56njhr6q436nkqabtozs/lib"/libtclstub8.6.a | grep ^_[^_] >> $f && echo $f) -seg1addr 0xb000000 -sectcreate __TEXT __info_plist Tk-Info.pl
            ist
     295    ld: warning: option -prebind is obsolete and being ignored
  >> 296    Undefined symbols for architecture x86_64:
     297      "_fixstrtod", referenced from:
     298          _Tk_ParseArgv in tkArgv.o
     299          _Tk_GetScreenMM in tkGet.o
     300          _TkGetDoublePixels in tkGet.o
     301          _SetMMFromAny in tkObj.o
     302          _SetPixelFromAny in tkObj.o
     303          _GetLineIndex in tkCanvLine.o
     304          _GetPolygonIndex in tkCanvPoly.o
     305          ...
     306    ld: symbol(s) not found for architecture x86_64
  >> 307    clang: error: linker command failed with exit code 1 (use -v to see invocation)
  >> 308    make: *** [libtk8.6.dylib] Error 1
healther commented 3 years ago

It turns out some of this may have been due to an update of XCode. I'm uncertain whether I should have expected spack to pick that up or whether I should have manually cleaned and reinstalled. After doing essentially a git clean -dfx most everything builds fine. py-scikit-image is the only hold-out for me and since I got py-scikit-learn to work, this should also be possible, but blind monkey big wrench and those things. Once I get back around to this I should be able to create a couple of PRs

sethrj commented 3 years ago

I just upgraded to macOS 11 and updated XCode to 12.4, updated homebrew, ran spack external find for build requirements, and spack compiler find. After concretizing my development environment I saw a weird group of error such as:

==> Warning: Missing a source id for cmake@3.19.4
==> Warning: Missing a source id for ncurses@6.2.20200212
==> Warning: Missing a source id for cmake@3.19.4
==> Warning: Missing a source id for cmake@3.19.4
==> Installing clhep-2.4.4.0-wdkqeebvxtoeaw446nlqjj2j3tpndi2m
==> No binary for clhep-2.4.4.0-wdkqeebvxtoeaw446nlqjj2j3tpndi2m found: installing from source
==> Error: ModuleNotFoundError: No module named 'spack.pkg.tmpe662_fv6'

/rnsdhpc/code/spack/lib/spack/spack/build_environment.py:872, in _setup_pkg_and_run:
        869        tb_string = traceback.format_exc()
        870
        871        # build up some context from the offending package so we can
  >>    872        # show that, too.
        873        package_context = get_package_context(tb)
        874
        875        logfile = None

When I reran, I hit a build error in openmpi@4.0.5 possibly related to https://github.com/open-mpi/ompi/issues/8218:

==> Error: ProcessError: Command exited with status 1:
    '/var/folders/gy/mrg1ffts2h945qj9k29s1l1dvvmbqb/T/s3j/spack-stage/spack-stage-openmpi-4.0.5-pxe2giue4kd5rn4eaiykldiv5pyfk3ty/spack-src/configure' '--prefix=/rnsdhpc/code/spack/opt/spack/apple-clang/openmpi/pxe2giu' '--enable-shared' '--disable-silent-rules' '--disable-builtin-atomics' '--enable-static' '--without-pmi' '--with-zlib=/rnsdhpc/code/spack/opt/spack/apple-clang/zlib/5gwknia' '--enable-mpi1-compatibility' '--without-psm2' '--without-cma' '--without-mxm' '--without-xpmem' '--without-verbs' '--without-ofi' '--without-knem' '--without-hcoll' '--without-psm' '--without-fca' '--without-ucx' '--without-lsf' '--without-loadleveler' '--without-sge' '--without-tm' '--without-alps' '--without-slurm' '--disable-memchecker' '--with-libevent=/rnsdhpc/code/spack/opt/spack/apple-clang/libevent/c532m53' '--with-hwloc=/rnsdhpc/code/spack/opt/spack/apple-clang/hwloc/zal44cg' '--disable-java' '--disable-mpi-java' '--without-cuda' '--enable-wrapper-rpath' '--disable-wrapper-runpath' '--disable-mpi-cxx' '--disable-cxx-exceptions'

2 errors found in build log:
     353    checking the name lister (/usr/bin/nm -B) interface... BSD nm
     354    checking for fgrep... /usr/bin/grep -F
     355    checking if .proc/endp is needed... no
     356    checking directive for setting text section... .text
     357    checking directive for exporting symbols... .globl
     358    checking for objdump... objdump
  >> 359    checking if .note.GNU-stack is needed... /Applications/Xcode.app/Contents/Developer/Toolchain
            s/XcodeDefault.xctoolchain/usr/bin/objdump: error: 'conftest.o': Invalid/Unsupported object f
            ile format
     360    no
     361    checking suffix for labels... :
     362    checking prefix for global symbol labels... _
     363    checking prefix for lsym labels... L
     364    checking prefix for function in .type...
     365    checking if .size is needed... no

     ...

     394    checking alignment of Fortran CHARACTER... 1
     395    checking for corresponding KIND value of CHARACTER... C_SIGNED_CHAR
     396    checking KIND value of Fortran C_SIGNED_CHAR... no ISO_C_BINDING -- fallback
     397    checking Fortran value of selected_int_kind(4)... no
     398    configure: WARNING: Could not determine KIND value of C_SIGNED_CHAR
     399    configure: WARNING: See config.log for more details
  >> 400    configure: error: Cannot continue

so I'm trying to work around that.

Also hit an error while building root@6.22.06%apple-clang@12.0.0~aqua~davix~emacs~examples~fftw~fits~fortran+gdml+gminimal~graphviz~gsl~http~ipo~jemalloc~math~memstat+minuit~mlp~mysql~opengl~postgres~pythia6~pythia8+python~qt4~r+roofit~root7+rpath~shadow~spectrum~sqlite~ssl~table~tbb+threads~tmva+unuran~vc+vdt~vmc~x+xml~xrootd build_type=RelWithDebInfo cxxstd=14 patches=22af3471f3fd87c0fe8917bf9c811c6d806de6c8b9867d30a1e3d383a1b929d7 arch=darwin-bigsur-x86_64 @drbenmorgan

/var/folders/gy/mrg1ffts2h945qj9k29s1l1dvvmbqb/T/s3j/spack-stage/spack-stage-root-6.22.06-zlq3sfxzgdb63tfep2gctssxufykr2aq/spack-src/graf2d/cocoa/src/TGCocoa.mm:20:10: fatal error: 'TGLIncludes.h' file not found
#include "TGLIncludes.h"
         ^~~~~~~~~~~~~~~
cjobrie commented 2 years ago

@drbenmorgan I'm seeing this error too, but with openmpi4.1.1 and many other versions. My error is identical to that in the previous comment but I'm using Apple's native clang@13.0.0.