Giter Site home page Giter Site logo

Comments (11)

bluescarni avatar bluescarni commented on May 27, 2024

@yurivict thanks for the report.

I cannot understand what is going on though, since on conda obake was built successfully against fmt 9.1.0 on several configurations. E.g., see here for a build log on OSX using clang-14:

https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=658749&view=logs&j=58ac6aab-c4bc-5de2-2894-98e408cc8ec9&t=933f325c-924e-533d-4d95-e93b5843ce8b

I'll try to set up a local build environment with clang-14 on my machine to see if I can reproduce.

from obake.

yurivict avatar yurivict commented on May 27, 2024

This error maybe specific to the combination of clang and the C++ library that it uses.

The easiest way to reproduce might be to install a FreeBSD VM.

from obake.

bluescarni avatar bluescarni commented on May 27, 2024

Ok thanks for the heads up, it may take a couple of days but I should be able to set up a FreeBSD environment on VirtualBox.

from obake.

rfenrich avatar rfenrich commented on May 27, 2024

Hello, I confirm I have this same issue. Is there any progress?

from obake.

gl-yziquel avatar gl-yziquel commented on May 27, 2024

I get the same issue if I use clang 14 and fmt 9.1.0, 9.0.0 on ubuntu. Not freebsd but ubuntu.

Same for gcc 11.4.0-1ubuntu~22.04 (well, the errors are different, but it fails to compile).

Fmt above version 10 also does not compile.

Given that this is a "reproducible build" issue, I'd suggest using FetchContent in cmake. Or get Conan into the loop. Short of going for some Bazel or Buck2 solution which I believe will be considered too heavy.

For gcc 11.4, ubuntu 22.04, fmt 9.1.0, one gets the following error:

In file included from /home/mini-me/home/cellar/obake/src/polynomials/packed_monomial.cpp:17:
/usr/local/include/fmt/core.h: In instantiation of ‘constexpr decltype (ctx.begin()) fmt::v9::detail::parse_format_specs(ParseContext&) [with T = mppp::integer<1>; ParseContext = fmt::v9::detail::compile_parse_context<char, fmt::v9::detail::error_handler>; decltype (ctx.begin()) = const char*]’:
/usr/local/include/fmt/core.h:2954:9:   required from ‘constexpr fmt::v9::detail::format_string_checker<Char, ErrorHandler, Args>::format_string_checker(fmt::v9::basic_string_view<Char>, ErrorHandler) [with Char = char; ErrorHandler = fmt::v9::detail::error_handler; Args = {mppp::integer<1>}]’
/home/mini-me/home/cellar/obake/src/polynomials/packed_monomial.cpp:172:40:   required from ‘void obake::polynomials::detail::{anonymous}::packed_monomial_tex_stream_insert(std::ostream&, const obake::polynomials::packed_monomial<T>&, const symbol_set&) [with T = int; std::ostream = std::basic_ostream<char>; obake::symbol_set = boost::container::flat_set<std::__cxx11::basic_string<char> >]’
/home/mini-me/home/cellar/obake/src/polynomials/packed_monomial.cpp:204:46:   required from here
/home/mini-me/home/cellar/obake/src/polynomials/packed_monomial.cpp:172:40:   in ‘constexpr’ expansion of ‘fmt::v9::basic_format_string<char, mppp::integer<1>&>("^{{{}}}")’
/usr/local/include/fmt/core.h:2743:12: error: use of deleted function ‘fmt::v9::detail::fallback_formatter<T, Char, Enable>::fallback_formatter() [with T = mppp::integer<1>; Char = char; Enable = void]’
 2743 |   auto f = conditional_t<has_formatter<mapped_type, context>::value,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2744 |                          formatter<mapped_type, char_type>,
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2745 |                          fallback_formatter<stripped_type, char_type>>();
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/fmt/core.h:1124:3: note: declared here
 1124 |   fallback_formatter() = delete;
      |   ^~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/obake.dir/build.make:230: CMakeFiles/obake.dir/src/polynomials/packed_monomial.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/obake.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

from obake.

andrewcorrigan avatar andrewcorrigan commented on May 27, 2024

I just tried the latest obake+mppp+fmtlib and am seeing the following error using Xcode (Apple clang version 14.0.0 (clang-1400.0.29.202))

In file included from /third_party/obake/include/obake/polynomials/d_packed_monomial.hpp:30:
/third_party/fmt/include/fmt/core.h:2582:45: error: implicit instantiation of undefined template 'fmt::detail::type_is_unformattable_for<mppp::integer<1>, char>'
    type_is_unformattable_for<T, char_type> _;
                                            ^
/third_party/fmt/include/fmt/core.h:2645:23: note: in instantiation of function template specialization 'fmt::detail::parse_format_specs<mppp::integer<1>, fmt::detail::compile_parse_context<char>>' requested here
        parse_funcs_{&parse_format_specs<Args, parse_context_type>...} {}
                      ^
/third_party/fmt/include/fmt/core.h:2776:47: note: in instantiation of member function 'fmt::detail::format_string_checker<char, mppp::integer<1>>::format_string_checker' requested here
      detail::parse_format_string<true>(str_, checker(s));
                                              ^
/third_party/obake/include/obake/polynomials/d_packed_monomial.hpp:436:45: note: in instantiation of function template specialization 'fmt::basic_format_string<char, mppp::integer<1> &>::basic_format_string<char[8], 0>' requested here
                    *cur_oss << fmt::format("^{{{}}}", tmp_mp);

Different error, but also triggered by the code fmt::format("^{{{}}}",

from obake.

andrewcorrigan avatar andrewcorrigan commented on May 27, 2024

I just tried updating to latest obake+mppp+fmtlib again and it's all working for me now.

from obake.

gl-yziquel avatar gl-yziquel commented on May 27, 2024

@andrewcorrigan

I tried building all dependencies living on HEAD, and no, it still is not solved for me.

Could you please provide the exact versions of obake, mppp, abseil and fmt that worked for you ? So that I may try replicating the build ?

from obake.

andrewcorrigan avatar andrewcorrigan commented on May 27, 2024

It was latest trunk of each repository as of yesterday. Perhaps the issue I encountered is not the same as yours.

from obake.

bluescarni avatar bluescarni commented on May 27, 2024

@andrewcorrigan @gl-yziquel sorry for dropping the ball on this, I completely forgot about this report.

The conda recipe for obake incorporates a fix for this issue:

https://github.com/conda-forge/obake-feedstock/blob/main/recipe/fmt_fix.diff

I will try to include the patch in the next obake version, hopefully next week if I have time. Of course if you want to help, testing the patch and PRs are always welcome :)

from obake.

gl-yziquel avatar gl-yziquel commented on May 27, 2024

I unfortunately struggle to find time for this. Which is a shame as it is a dependency for the genetic algorithm backpropagation library I had my eyes on. Hope I'll find time to come back to it.

from obake.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.