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 with GCC15 / C++23 #44

Open
mattiaverga opened this issue Jan 22, 2025 · 3 comments
Open

Build failure with GCC15 / C++23 #44

mattiaverga opened this issue Jan 22, 2025 · 3 comments

Comments

@mattiaverga
Copy link

Fedora Linux has just introduced GCC15 with C++23 standard.
Ducc0 now fails to build with the following error:

g++ -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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DPKGNAME=ducc0 -DPKGVERSION=0.36.0 -I. -I./src/ -I/usr/include/pybind11 -I/usr/include/pybind11 -I/usr/include/python3.13 -c python/ducc.cc -o build/temp.linux-s390x-cpython-313/python/ducc.o
  In file included from python/ducc.cc:9:
  ./src/ducc0/math/wigner3j.cc: In function ‘void ducc0::detail_wigner3j::wigner3j_00_internal(double, double, double, int, const ducc0::detail_mav::vmav<double, 1>&)’:
  ./src/ducc0/math/wigner3j.cc:110:6: error: call of ‘(const ducc0::detail_mav::vmav<double, 1>) (int)’ is ambiguous
    110 |   res(0) = 1.;
        |   ~~~^~~
  In file included from ./src/ducc0/infra/mav.cc:56,
                   from python/ducc.cc:3:
  ./src/ducc0/infra/mav.h:835:41: note: there are 2 candidates
    835 | template<typename T, size_t ndim> class vmav: public cmav<T, ndim>
        |                                         ^~~~
  ./src/ducc0/infra/mav.h:787:39: note: candidate 1: ‘const T& ducc0::detail_mav::cmav<T, ndim>::operator()(Ns ...) const [with Ns = {int}; T = double; long unsigned int ndim = 1]’
    787 |     template<typename... Ns> const T &operator()(Ns... ns) const
        |                                       ^~~~~~~~
  ./src/ducc0/infra/mav.h:885:33: note: candidate 2: ‘T& ducc0::detail_mav::vmav<T, ndim>::operator()(Ns ...) const [with Ns = {int}; T = double; long unsigned int ndim = 1]’
    885 |     template<typename... Ns> T &operator()(Ns... ns) const
        |                                 ^~~~~~~~
  ./src/ducc0/math/wigner3j.cc:111:35: error: call of ‘(const ducc0::detail_mav::vmav<double, 1>) (int)’ is ambiguous
    111 |   double sum = (2.*l1min+1.) * res(0)*res(0);
        |                                ~~~^~~

This is with ducc0 0.36.0 sources, I haven't tried if the main branch is already fixed.
A full build log is available here.

@mreineck
Copy link
Owner

Thanks a lot! I'll have a closer look tomorrow.

@mreineck
Copy link
Owner

Should be fixed on the main ducc0 branch.
Do you think this warrants a 0.36.1 release? My gut feeling is to wait for 0.37, which should not be too far off.

@mattiaverga
Copy link
Author

I can wait for 0.37. Thanks!

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

No branches or pull requests

2 participants