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 failure: ceph #281027

Closed
qubitnano opened this issue Jan 14, 2024 · 6 comments · Fixed by #281858
Closed

Build failure: ceph #281027

qubitnano opened this issue Jan 14, 2024 · 6 comments · Fixed by #281858

Comments

@qubitnano
Copy link
Contributor

qubitnano commented Jan 14, 2024

Steps To Reproduce

Steps to reproduce the behavior:

git checkout 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
nix build .#ceph

Build log

error: builder for '/nix/store/y6hik0qrizynz83x27a8jynkx5kzbfpj-ceph-18.2.0.drv' failed with exit code 2;
       last 10 log lines:
       > [ 74%] Building CXX object src/librbd/CMakeFiles/rbd_internal.dir/__/common/ContextCompletion.cc.o
       > [ 74%] Building CXX object src/librbd/CMakeFiles/rbd_internal.dir/crypto/luks/LUKSEncryptionFormat.cc.o
       > [ 74%] Building CXX object src/librbd/CMakeFiles/rbd_internal.dir/crypto/luks/FormatRequest.cc.o
       > [ 74%] Building CXX object src/librbd/CMakeFiles/rbd_internal.dir/crypto/luks/FlattenRequest.cc.o
       > [ 74%] Building CXX object src/librbd/CMakeFiles/rbd_internal.dir/crypto/luks/Header.cc.o
       > [ 74%] Building CXX object src/librbd/CMakeFiles/rbd_internal.dir/crypto/luks/LoadRequest.cc.o
       > [ 74%] Building CXX object src/librbd/CMakeFiles/rbd_internal.dir/crypto/luks/Magic.cc.o
       > [ 74%] Linking CXX static library ../../lib/librbd_internal.a
       > [ 74%] Built target rbd_internal
       > make: *** [Makefile:146: all] Error 2
       For full logs, run 'nix log /nix/store/y6hik0qrizynz83x27a8jynkx5kzbfpj-ceph-18.2.0.drv'.

https://hydra.nixos.org/job/nixpkgs/trunk/ceph.x86_64-linux

Additional context

nixos-unstable 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d

Noticed when setting services.samba.package = pkgs.sambaFull; and rebuilding

Notify maintainers

@adevress @alexanderkjeldaas @johanot @krav

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.11, NixOS, 24.05 (Uakari), 24.05.20240113.9b19f5e`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-23.05"`
 - nixpkgs: `/etc/nix/path/nixpkgs`

Add a 👍 reaction to issues you find important.

@dotlambda
Copy link
Member

Notify maintainers

You won't get a reply if you leave that empty.

@programmerHaaks
Copy link

I'm having the same issue

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.69, NixOS, 24.05 (Uakari), 24.05pre567011.46ae0210ce16`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"home-manager, nixos"`
 - channels(haaks): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

I didn't notice when it happened, but I also have sambaFull

@Dioprz
Copy link

Dioprz commented Jan 17, 2024

Same error whit the package qemu_full.

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.72, NixOS, 24.05 (Uakari), 24.05.20240113.9b19f5e`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

@dotlambda dotlambda mentioned this issue Jan 17, 2024
13 tasks
@dotlambda
Copy link
Member

This seems related to https://tracker.ceph.com/issues/61975.

@nh2
Copy link
Contributor

nh2 commented Jan 18, 2024

This seems related to https://tracker.ceph.com/issues/61975.

That turned out not to be the issue.


The actual error:

https://cache.nixos.org/log/4i14y3ylpmagn2jfzi598ghw9fw2dza4-ceph-18.2.0.drv

/root/src/ceph/src/osd/SnapMapper.cc:331:0:   required from here
/nix/store/yc2pfwzxcxc6zadvfx76vfbpdg70m3xj-fmt-8.1.1-dev/include/fmt/ranges.h:490: error: call of overloaded ‘format_to(fmt::v8::appender&, const char [9], uint32_t&)’ is ambiguous
  490 |           out = format_to(out, "\\x{:02x}", escape.cp);

In colour so that one can actually make sense of C++ error messages:

image

One potential problem here: fmt-8.1.1-dev

This is because of all-packages.nix having:

  inherit (callPackages ../tools/filesystems/ceph {
    lua = lua5_4;
    fmt = fmt_8;
  })
    ceph
    ceph-client;
  • Switching to fmt_9: Builds
  • Removing fmt = entirely (which swiches to fmt_10): Fails on new fmt related errors (see below)
  • Removing fmt = and lua =: Fails because Ceph requires lua >= 5.3 and nixpkgs's default is still 5.2:
    • CMake says Could NOT find Lua (missing: LUA_INCLUDE_DIR) (Required is at least version "5.3")

Build failure with fmt_10:

In file included from /nix/store/sgslg7d6dyr7962pc5dq6wl5g9p48bv2-fmt-10.1.1-dev/include/fmt/format.h:49,
                 from /build/ceph-18.2.0/src/msg/msg_types.h:21,
                 from /build/ceph-18.2.0/src/common/entity_name.h:22,
                 from /build/ceph-18.2.0/src/auth/Auth.h:19,
                 from /build/ceph-18.2.0/src/msg/async/crypto_onwire.h:22,
                 from /build/ceph-18.2.0/src/msg/async/frames_v2.h:6,
                 from /build/ceph-18.2.0/src/msg/async/frames_v2.cc:15:
/nix/store/sgslg7d6dyr7962pc5dq6wl5g9p48bv2-fmt-10.1.1-dev/include/fmt/core.h: In instantiation of 'constexpr decltype (ctx.begin()) fmt::v10::detail::parse_format_specs(ParseContext&) [with T = ceph_le<unsigned int>; ParseContext = compile_parse_context<char>; decltype (ctx.begin()) = const char*]':
/nix/store/sgslg7d6dyr7962pc5dq6wl5g9p48bv2-fmt-10.1.1-dev/include/fmt/core.h:2639:0:   required from here
/build/ceph-18.2.0/src/msg/async/frames_v2.cc:308:0:   in 'constexpr' expansion of 'fmt::v10::basic_format_string<char, unsigned int&, const ceph_le<unsigned int>&>("bad preamble crc calculated={} expected={}")'
/nix/store/sgslg7d6dyr7962pc5dq6wl5g9p48bv2-fmt-10.1.1-dev/include/fmt/core.h:2740:0:   in 'constexpr' expansion of 'fmt::v10::detail::parse_format_string<true, char, format_string_checker<char, unsigned int, ceph_le<unsigned int> > >(((fmt::v10::basic_format_string<char, unsigned int&, const ceph_le<unsigned int>&>*)this)->fmt::v10::basic_format_string<char, unsigned int&, const ceph_le<unsigned int>&>::str_, fmt::v10::detail::format_string_checker<char, unsigned int, ceph_le<unsigned int> >(fmt::v10::basic_string_view<char>(((const char*)s))))'
/nix/store/sgslg7d6dyr7962pc5dq6wl5g9p48bv2-fmt-10.1.1-dev/include/fmt/core.h:2523:0:   in 'constexpr' expansion of 'fmt::v10::detail::parse_replacement_field<char, format_string_checker<char, unsigned int, ceph_le<unsigned int> >&>(p, end, (* & handler))'
/nix/store/sgslg7d6dyr7962pc5dq6wl5g9p48bv2-fmt-10.1.1-dev/include/fmt/core.h:2457:0:   in 'constexpr' expansion of '(& handler)->fmt::v10::detail::format_string_checker<char, unsigned int, ceph_le<unsigned int> >::on_replacement_field((& handler)->fmt::v10::detail::format_string_checker<char, unsigned int, ceph_le<unsigned int> >::on_arg_id(), begin)'
/nix/store/sgslg7d6dyr7962pc5dq6wl5g9p48bv2-fmt-10.1.1-dev/include/fmt/core.h:2632:0:   in 'constexpr' expansion of '((fmt::v10::detail::format_string_checker<char, unsigned int, ceph_le<unsigned int> >*)this)->fmt::v10::detail::format_string_checker<char, unsigned int, ceph_le<unsigned int> >::on_format_specs(id, begin, begin)'
/nix/store/sgslg7d6dyr7962pc5dq6wl5g9p48bv2-fmt-10.1.1-dev/include/fmt/core.h:2548: error: 'fmt::v10::detail::type_is_unformattable_for<ceph_le<unsigned int>, char> _' has incomplete type
 2548 |     type_is_unformattable_for<T, char_type> _;
      | 
[ 11%] Linking CXX shared library ../../lib/libcls_hello.so
[ 11%] Building C object src/common/CMakeFiles/parse_secret_objs.dir/secret.c.o
[ 11%] Built target parse_secret_objs
[ 11%] Building C object src/tracing/CMakeFiles/osd_tp.dir/oprequest.c.o
[ 11%] Built target cls_hello
[ 11%] Building C object src/tracing/CMakeFiles/rados_tp.dir/librados.c.o
[ 11%] Building C object src/tracing/CMakeFiles/osd_tp.dir/osd.c.o
[ 12%] Building CXX object src/common/options/CMakeFiles/common-options-objs.dir/rbd-mirror_options.cc.o
/nix/store/sgslg7d6dyr7962pc5dq6wl5g9p48bv2-fmt-10.1.1-dev/include/fmt/core.h: In instantiation of 'constexpr fmt::v10::detail::value<Context> fmt::v10::detail::make_arg(T&) [with bool PACKED = true; Context = fmt::v10::basic_format_context<fmt::v10::appender, char>; T = const ceph_le<unsigned int>; typename std::enable_if<PACKED, int>::type <anonymous> = 0]':
/nix/store/sgslg7d6dyr7962pc5dq6wl5g9p48bv2-fmt-10.1.1-dev/include/fmt/core.h:1808:0:   required from 'constexpr fmt::v10::format_arg_store<Context, Args>::format_arg_store(T& ...) [with T = {unsigned int, const ceph_le<unsigned int>}; Context = fmt::v10::basic_format_context<fmt::v10::appender, char>; Args = {unsigned int, ceph_le<unsigned int>}]'
/nix/store/sgslg7d6dyr7962pc5dq6wl5g9p48bv2-fmt-10.1.1-dev/include/fmt/core.h:1826:0:   required from 'constexpr fmt::v10::format_arg_store<Context, typename std::remove_cv<typename std::remove_reference<_Args>::type>::type ...> fmt::v10::make_format_args(T& ...) [with Context = basic_format_context<appender, char>; T = {unsigned int, const ceph_le<unsigned int>}]'
/nix/store/sgslg7d6dyr7962pc5dq6wl5g9p48bv2-fmt-10.1.1-dev/include/fmt/core.h:2788:0:   required from 'std::string fmt::v10::format(format_string<T ...>, T&& ...) [with T = {unsigned int&, const ceph_le<unsigned int>&}; std::string = std::__cxx11::basic_string<char>; format_string<T ...> = basic_format_string<char, unsigned int&, const ceph_le<unsigned int>&>]'
/build/ceph-18.2.0/src/msg/async/frames_v2.cc:308:0:   required from here
/nix/store/sgslg7d6dyr7962pc5dq6wl5g9p48bv2-fmt-10.1.1-dev/include/fmt/core.h:1576: error: 'fmt::v10::detail::type_is_unformattable_for<const ceph_le<unsigned int>, char> _' has incomplete type
 1576 |     type_is_unformattable_for<T, typename Context::char_type> _;
      | 
/nix/store/sgslg7d6dyr7962pc5dq6wl5g9p48bv2-fmt-10.1.1-dev/include/fmt/core.h:1580: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt
 1580 |       formattable,
      | 
/nix/store/sgslg7d6dyr7962pc5dq6wl5g9p48bv2-fmt-10.1.1-dev/include/fmt/core.h:1580: note: 'formattable' evaluates to false
make[2]: *** [src/msg/CMakeFiles/common-msg-objs.dir/build.make:314: src/msg/CMakeFiles/common-msg-objs.dir/async/frames_v2.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....

I noticed Arch has patches for fmt 10.

But we can just use fmt_9 to fix the build.

@nh2
Copy link
Contributor

nh2 commented Jan 18, 2024

PR for the fix: #281858

nh2 added a commit that referenced this issue Jan 24, 2024
ceph: Fix build with GCC 13 by using fmt_8 -> fmt_9. Fixes #281027
khaneliman pushed a commit to khaneliman/nixpkgs that referenced this issue Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants