Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with clang 18 #367

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

jdblischak
Copy link
Member

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

Test PR to build osx-* binaries with clang 18

@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

@jdblischak
Copy link
Member Author

Confirmed. Building with clang 18 reproduces the error on osx-arm64 we observed in the nightly feedstock builds

@jdblischak
Copy link
Member Author

Rebased onto main to include #370 which installs capnproto from conda-forge, which should bypass the compilation error with clang 18

@jdblischak
Copy link
Member Author

Making progress.

Previously it failed during the configuration step when trying to compile capnproto (link to old build log that installed capnproto via vcpkg):

Installing 17/19 capnproto:arm64-osx...
Building capnproto:arm64-osx...
-- [OVERLAY] Loading triplet configuration from: $SRC_DIR/triplets/arm64-osx.cmake
-- Installing port from location: $SRC_DIR/build/_deps/vcpkg-src/buildtrees/versioning_/versions/capnproto/4a615543c6406b84fc52a931335d7fdb70037627
-- Downloading https://github.com/capnproto/capnproto/archive/v1.0.1.tar.gz -> capnproto-capnproto-v1.0.1.tar.gz...
-- Extracting source $SRC_DIR/build/_deps/vcpkg-src/downloads/capnproto-capnproto-v1.0.1.tar.gz
-- Applying patch disable-C-20-co-routines.patch
-- Applying patch undef-KJ_USE_EPOLL-for-ANDROID_PLATFORM-23.patch
-- Using source at $SRC_DIR/build/_deps/vcpkg-src/buildtrees/capnproto/src/v1.0.1-21327bcba6.clean
-- Configuring arm64-osx
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message):
    Command failed: $SRC_DIR/build/_deps/vcpkg-src/downloads/tools/ninja/1.10.2-osx/ninja -v
    Working Directory: $SRC_DIR/build/_deps/vcpkg-src/buildtrees/capnproto/arm64-osx-rel/vcpkg-parallel-configure
    Error code: 1
    See logs for more information:
      $SRC_DIR/build/_deps/vcpkg-src/buildtrees/capnproto/config-arm64-osx-rel-CMakeCache.txt.log
      $SRC_DIR/build/_deps/vcpkg-src/buildtrees/capnproto/config-arm64-osx-out.log

Call Stack (most recent call first):
  $SRC_DIR/build/vcpkg_installed/x64-osx/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:252 (vcpkg_execute_required_process)
  buildtrees/versioning_/versions/capnproto/4a615543c6406b84fc52a931335d7fdb70037627/portfile.cmake:19 (vcpkg_cmake_configure)
  scripts/ports.cmake:170 (include)


error: building capnproto:arm64-osx failed with: BUILD_FAILED

Now that capnproto is installed from conda-forge, the configuration step completed successfully (latest build log). Unfortunately it now fails early in the build step. Looks like a libfmt-related error.

+ make -j 2 install
[  0%] Generating ../../../magic_mgc.zst.h_
[  1%] Building CXX object tiledb/common/CMakeFiles/baseline.dir/logger.cc.o
In file included from /Users/runner/miniforge3/conda-bld/tiledb_1731294265022/work/tiledb/common/logger.cc:34:
In file included from /Users/runner/miniforge3/conda-bld/tiledb_1731294265022/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/include/spdlog/fmt/fmt.h:28:
In file included from /Users/runner/miniforge3/conda-bld/tiledb_1731294265022/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/include/fmt/core.h:5:
In file included from /Users/runner/miniforge3/conda-bld/tiledb_1731294265022/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/include/fmt/format.h:41:
/Users/runner/miniforge3/conda-bld/tiledb_1731294265022/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/include/fmt/base.h:21:12: fatal error: 'cstddef' file not found
   21 | #  include <cstddef>      // std::byte
      |            ^~~~~~~~~
1 error generated.
make[2]: *** [tiledb/common/CMakeFiles/baseline.dir/build.make:76: tiledb/common/CMakeFiles/baseline.dir/logger.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4623: tiledb/common/CMakeFiles/baseline.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  1%] Built target gen_mgc_unarch
make: *** [Makefile:166: all] Error 2

@h-vetinari
Copy link
Member

Looks like a libfmt-related error.

This looks like it's not finding the C++ standard library, which is a pretty catastrophic place to be for a C++ compiler. 🙈

I don't know why you've set up a wrapper for CXX

#!/bin/sh
args="${@##-Werror*}"
$NN_CXX_ORIG $args

I mean yes, ostensibly to strip -Werror, but you could just do that in build.sh, or fix it in the source CMake files (since you're already patching things anyway). At least, this wrapper raises my hackles immediately as a potential suspect 😅

@h-vetinari
Copy link
Member

but you could just do that in build.sh

Example (not sure this is all the places where CMake might inject it, but you get the idea):

  export CFLAGS="${CFLAGS//-Werror/}"
  export CXXFLAGS="${CXXFLAGS//-Werror/}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants