cdo-2.4.0 and Fedora 40: cdo_module.cc:96:14: error: 'find_if' is not a member of 'std'; did you mean 'find'?
Added by Sebastian Schubert 8 months ago
Dear all
On the current Fedora 40, I get the following error during compilation:
libtool: compile: g++ -std=gnu++20 -DHAVE_CONFIG_H -I. -I../libcdi/src -I../src/mpim_grid -DYAC_FOR_CDO -I/usr/include/include -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -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 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/include/netcdf -I/usr/include/hdf5 -I/usr/include/proj -I/usr/include/udunits2/ -DgFortran -I/usr/include/include -I/usr/include/include/udunits2 -DCDI_SIZE_TYPE=size_t -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 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fopenmp -pthread -c cdo_module.cc -fPIC -DPIC -o .libs/libcdo_la-cdo_module.o cdo_module.cc: In member function 'std::vector<oper_t>::const_iterator CdoModule::find_operator(const std::string&) const': cdo_module.cc:96:14: error: 'find_if' is not a member of 'std'; did you mean 'find'? 96 | = std::find_if(begin(operators), end(operators), [&p_operatorName](const oper_t &o) { return o.name == p_operatorName; }); | ^~~~~~~ | find
Any idea how to fix that? Strange thing that it works on the older Fedora 39, which uses the same g++ -std=gnu++20.
Thanks!
Replies (2)
RE: cdo-2.4.0 and Fedora 40: cdo_module.cc:96:14: error: 'find_if' is not a member of 'std'; did you mean 'find'? - Added by Uwe Schulzweida 7 months ago
Dear Sebastian,
Yes, the include of <algorithm> is missing in this file. Unfortunately, this is only indicated with gcc 14 and we still use gcc 13. We will fix this problem in the next CDO release 2.4.1.
Cheers,
Uwe
RE: cdo-2.4.0 and Fedora 40: cdo_module.cc:96:14: error: 'find_if' is not a member of 'std'; did you mean 'find'? - Added by Sebastian Schubert 7 months ago
Dear Uwe
Great, thanks a lot for your work.
Sebastian