lundi 18 septembre 2023

Github actions fail for Mac with my Haskell package including C++

I have some Github actions for my library 'numerical-integration'. They all work fine except those on Mac. Among the warnings and error messages for Mac, there are:

  • note: expanded from macro '_LIBCPP_DEPRECATED_CXX03_FUNCTION' attribute((deprecated("Using std::function in C++03 is not supported anymore. Please upgrade to C++11 or later, or use a different type")))

  • warning: 'function<double (double)>' is deprecated: Using std::function in C++03 is not supported anymore. Please upgrade to C++11 or later, or use a different type [-Wdeprecated-declarations] std::function<double(double)> f_ = [&](double x) { return f(x); };

I don't understand since I have in my cabal file:

  extra-libraries:     stdc++
  ghc-options:         -optcxx-std=c++11
  cxx-options:         -fPIC -std=c++11

Some of you recommend me to not use a lambda function in my previous post. But again, I'm not fluent in C/C++ and I do what I can, and I'm happy as long as it works... And the library works very well. But I'm ok for changing something if I understand.

Is there something special to do in the Cabal file for Mac ? I googled "cabal mac c++11" but I found nothing.

Aucun commentaire:

Enregistrer un commentaire