Skip to content

[Build] Failure with Boost 1.86 #3595

@carlocab

Description

@carlocab

Description

The build for ArrayFire 3.9.0 fails with Boost 1.86. The exact same build succeeded with Boost 1.85.

I encountered this while recently rebuilding ArrayFire for Homebrew. For reference, we invoke configure ArrayFire with

cmake -S . -B build \
    -DAF_BUILD_CUDA=OFF \
    -DAF_COMPUTE_LIBRARY=FFTW/LAPACK/BLAS \
    -DCMAKE_CXX_STANDARD=14 \
    -DCMAKE_INSTALL_RPATH=@loader_path/../../../../opt/fftw/lib;@loader_path/../../../../opt/openblas/lib;@loader_path/../../../../lib \
    -DCMAKE_INSTALL_PREFIX=/opt/homebrew/Cellar/arrayfire/3.9.0_3 \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_FIND_FRAMEWORK=LAST \
    -DCMAKE_VERBOSE_MAKEFILE=ON \
    -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=/opt/homebrew/Library/Homebrew/cmake/trap_fetchcontent_provider.cmake \
    -Wno-dev \
    -DBUILD_TESTING=OFF \
    -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk

Error Log

Error Log
  In file included from /tmp/arrayfire-20240829-11921-nsnviy/arrayfire-full-v3.9.0/src/backend/opencl/kernel/sort_by_key/sort_by_key_impl.cpp:10:
  In file included from /tmp/arrayfire-20240829-11921-nsnviy/arrayfire-full-v3.9.0/src/backend/opencl/./kernel/sort_by_key_impl.hpp:25:
  In file included from /opt/homebrew/include/boost/compute/algorithm/copy.hpp:26:
  In file included from /opt/homebrew/include/boost/compute/algorithm/detail/copy_on_device.hpp:18:
  In file included from /opt/homebrew/include/boost/compute/iterator/buffer_iterator.hpp:26:
  In file included from /opt/homebrew/include/boost/compute/detail/meta_kernel.hpp:39:
  /opt/homebrew/include/boost/compute/detail/sha1.hpp:41:26: error: non-const lvalue reference to type 'digest_type' (aka 'unsigned char[20]') cannot bind to a value of unrelated type 'unsigned int[5]'
              h.get_digest(digest);
                           ^~~~~~
  /opt/homebrew/include/boost/uuid/detail/sha1.hpp:179:43: note: passing argument to parameter 'digest' here
  inline void sha1::get_digest(digest_type& digest)
                                            ^

Complete logs are available here. The errors on macOS 14 running on ARM64 start here.

Build Environment

Compiler version: Apple Clang version 15.0.0, Apple Clang version 14.0.0, GCC 11 (on Linux)
Operating system: macOS 12, 13, 14 (both Intel and ARM64), and Ubuntu Linux 22.04
Build environment: Logged here.
CMake variables: See description above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions