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

libmamba fails to build on Fedora with fmt 11.0.1 #3373

Closed
3 tasks done
opoplawski opened this issue Jul 30, 2024 · 4 comments · Fixed by #3429
Closed
3 tasks done

libmamba fails to build on Fedora with fmt 11.0.1 #3373

opoplawski opened this issue Jul 30, 2024 · 4 comments · Fixed by #3429
Labels
1.x Related to mamba 1.x branch/versions

Comments

@opoplawski
Copy link
Contributor

Troubleshooting docs

  • My problem is not solved in the Troubleshooting docs

Anaconda default channels

  • I do NOT use the Anaconda default channels (pkgs/* etc.)

How did you install Mamba?

Other (please describe)

Search tried in issue tracker

argument discards qualifiers

Latest version of Mamba

  • My problem is not solved with the latest version

Tried in Conda?

I have this problem with Conda as well, without using Mamba

Describe your issue

The Fedora libmamba package is failing to build with the following:

[ 23%] Building CXX object libmamba/CMakeFiles/libmamba.dir/src/specs/version.cpp.o
cd /builddir/build/BUILD/libmamba-1.5.8-build/mamba-libmamba-1.5.8/redhat-linux-build/libmamba && /usr/lib64/ccache/g++ -DFMT_SHARED -DLIBMAMBA_EXPORTS -DSPDLOG_FMT_EXTERNAL -Dlibmamba_EXPORTS -I/builddir/build/BUILD/libmamba-1.5.8-build/mamba-libmamba-1.5.8/libmamba/include -I/builddir/build/BUILD/libmamba-1.5.8-build/mamba-libmamba-1.5.8/libmamba/src -isystem /usr/share -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -O2 -g -DNDEBUG -fPIC -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -Wunreachable-code -Wuninitialized -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wuseless-cast -MD -MT libmamba/CMakeFiles/libmamba.dir/src/specs/version.cpp.o -MF CMakeFiles/libmamba.dir/src/specs/version.cpp.o.d -o CMakeFiles/libmamba.dir/src/specs/version.cpp.o -c /builddir/build/BUILD/libmamba-1.5.8-build/mamba-libmamba-1.5.8/libmamba/src/specs/version.cpp
In file included from /usr/include/fmt/format.h:41,
                 from /builddir/build/BUILD/libmamba-1.5.8-build/mamba-libmamba-1.5.8/libmamba/include/mamba/specs/version.hpp:15,
                 from /builddir/build/BUILD/libmamba-1.5.8-build/mamba-libmamba-1.5.8/libmamba/src/specs/version.cpp:15:
/usr/include/fmt/base.h: In instantiation of ‘static void fmt::v11::detail::value<Context>::format_custom_arg(void*, typename Context::parse_context_type&, Context&) [with T = mamba::specs::VersionPartAtom; Formatter = fmt::v11::formatter<mamba::specs::VersionPartAtom>; Context = fmt::v11::context; typename Context::parse_context_type = fmt::v11::basic_format_parse_context<char>]’:
/usr/include/fmt/base.h:1383:19:   required from ‘fmt::v11::detail::value<Context>::value(T&) [with T = const mamba::specs::VersionPartAtom; Context = fmt::v11::context]’
 1383 |     custom.format = format_custom_arg<
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
 1384 |         value_type, typename Context::template formatter_type<value_type>>;
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/fmt/base.h:1647:41:   required from ‘constexpr fmt::v11::detail::value<Context> fmt::v11::detail::make_arg(T&) [with bool PACKED = true; Context = fmt::v11::context; T = const mamba::specs::VersionPartAtom; typename std::enable_if<PACKED, int>::type <anonymous> = 0]’
 1647 |   return {arg_mapper<Context>().map(val)};
      |                                         ^
/usr/include/fmt/base.h:2018:74:   required from ‘constexpr fmt::v11::detail::format_arg_store<Context, NUM_ARGS, 0, DESC> fmt::v11::make_format_args(T& ...) [with Context = context; T = {const mamba::specs::VersionPartAtom}; long unsigned int NUM_ARGS = 1; long unsigned int NUM_NAMED_ARGS = 0; long long unsigned int DESC = 15; typename std::enable_if<(NUM_NAMED_ARGS == 0), int>::type <anonymous> = 0]’
 2018 |   return {{detail::make_arg<NUM_ARGS <= detail::max_packed_args, Context>(
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
 2019 |       args)...}};
      |       ~~~~~                                                               
/usr/include/fmt/format.h:4365:44:   required from ‘std::string fmt::v11::format(format_string<T ...>, T&& ...) [with T = {const mamba::specs::VersionPartAtom&}; std::string = std::__cxx11::basic_string<char>; format_string<T ...> = basic_format_string<char, const mamba::specs::VersionPartAtom&>]’
 4365 |   return vformat(fmt, fmt::make_format_args(args...));
      |                       ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/builddir/build/BUILD/libmamba-1.5.8-build/mamba-libmamba-1.5.8/libmamba/src/specs/version.cpp:93:27:   required from here
   93 |         return fmt::format("{}", *this);
      |                ~~~~~~~~~~~^~~~~~~~~~~~~
/usr/include/fmt/base.h:1402:29: error: passing ‘const fmt::v11::formatter<mamba::specs::VersionPartAtom>’ as ‘this’ argument discards qualifiers [-fpermissive]
 1402 |     ctx.advance_to(cf.format(*static_cast<qualified_type*>(arg), ctx));
      |                    ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/libmamba-1.5.8-build/mamba-libmamba-1.5.8/libmamba/include/mamba/specs/version.hpp:171:10: note:   in call to ‘auto fmt::v11::formatter<mamba::specs::VersionPartAtom>::format(mamba::specs::VersionPartAtom, FormatContext&) [with FormatContext = fmt::v11::context]’
  171 |     auto format(const ::mamba::specs::VersionPartAtom atom, FormatContext& ctx)
      |          ^~~~~~
/usr/include/fmt/base.h: In instantiation of ‘static void fmt::v11::detail::value<Context>::format_custom_arg(void*, typename Context::parse_context_type&, Context&) [with T = mamba::specs::Version; Formatter = fmt::v11::formatter<mamba::specs::Version>; Context = fmt::v11::context; typename Context::parse_context_type = fmt::v11::basic_format_parse_context<char>]’:
/usr/include/fmt/base.h:1383:19:   required from ‘fmt::v11::detail::value<Context>::value(T&) [with T = const mamba::specs::Version; Context = fmt::v11::context]’
 1383 |     custom.format = format_custom_arg<
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
 1384 |         value_type, typename Context::template formatter_type<value_type>>;
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/fmt/base.h:1647:41:   required from ‘constexpr fmt::v11::detail::value<Context> fmt::v11::detail::make_arg(T&) [with bool PACKED = true; Context = fmt::v11::context; T = const mamba::specs::Version; typename std::enable_if<PACKED, int>::type <anonymous> = 0]’
 1647 |   return {arg_mapper<Context>().map(val)};
      |                                         ^
/usr/include/fmt/base.h:2018:74:   required from ‘constexpr fmt::v11::detail::format_arg_store<Context, NUM_ARGS, 0, DESC> fmt::v11::make_format_args(T& ...) [with Context = context; T = {const mamba::specs::Version}; long unsigned int NUM_ARGS = 1; long unsigned int NUM_NAMED_ARGS = 0; long long unsigned int DESC = 15; typename std::enable_if<(NUM_NAMED_ARGS == 0), int>::type <anonymous> = 0]’
 2018 |   return {{detail::make_arg<NUM_ARGS <= detail::max_packed_args, Context>(
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
 2019 |       args)...}};
      |       ~~~~~                                                               
/usr/include/fmt/format.h:4365:44:   required from ‘std::string fmt::v11::format(format_string<T ...>, T&& ...) [with T = {const mamba::specs::Version&}; std::string = std::__cxx11::basic_string<char>; format_string<T ...> = basic_format_string<char, const mamba::specs::Version&>]’
 4365 |   return vformat(fmt, fmt::make_format_args(args...));
      |                       ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/builddir/build/BUILD/libmamba-1.5.8-build/mamba-libmamba-1.5.8/libmamba/src/specs/version.cpp:207:27:   required from here
  207 |         return fmt::format("{}", *this);
      |                ~~~~~~~~~~~^~~~~~~~~~~~~
/usr/include/fmt/base.h:1402:29: error: passing ‘const fmt::v11::formatter<mamba::specs::Version>’ as ‘this’ argument discards qualifiers [-fpermissive]
 1402 |     ctx.advance_to(cf.format(*static_cast<qualified_type*>(arg), ctx));
      |                    ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/libmamba-1.5.8-build/mamba-libmamba-1.5.8/libmamba/include/mamba/specs/version.hpp:191:10: note:   in call to ‘auto fmt::v11::formatter<mamba::specs::Version>::format(mamba::specs::Version, FormatContext&) [with FormatContext = fmt::v11::context]’
  191 |     auto format(const ::mamba::specs::Version v, FormatContext& ctx)
      |          ^~~~~~
gmake[2]: *** [libmamba/CMakeFiles/libmamba.dir/build.make:337: libmamba/CMakeFiles/libmamba.dir/src/specs/version.cpp.o] Error 1

This started happening when Fedora updated to fmt 11.0.1.

mamba info / micromamba info

No response

Logs

No response

environment.yml

No response

~/.condarc

No response

@jjerphan
Copy link
Member

jjerphan commented Jul 31, 2024

This was addressed for 2.0 recently with #3368 and #3371.

@Hind-M Hind-M added the 1.x Related to mamba 1.x branch/versions label Jul 31, 2024
@opoplawski
Copy link
Contributor Author

Any chance these will be backported to 1.5.X?

@jjerphan
Copy link
Member

jjerphan commented Aug 1, 2024

This is currently not a priority for us, but you should be able to apply the two patches for the Fedora packages' build scripts.

@Hind-M
Copy link
Member

Hind-M commented Aug 1, 2024

Any chance these will be backported to 1.5.X?

Hi @opoplawski!
All efforts are now focused on 2.0, but as soon as it's out and that we have more bandwidth, we are planning to backport all fixes including this one :)

@Hind-M Hind-M linked a pull request Sep 2, 2024 that will close this issue
@Hind-M Hind-M closed this as completed Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x Related to mamba 1.x branch/versions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants