scikit-hep / awkward

Manipulate JSON-like data with NumPy-like idioms.
https://awkward-array.org
BSD 3-Clause "New" or "Revised" License
806 stars 81 forks source link

awkward fails to build with GCC 14 #3132

Closed glaubitz closed 1 month ago

glaubitz commented 1 month ago

Version of Awkward Array

33

Description and code to reproduce

Trying to build awkward with GCC 14 fails with:

[  111s]   [ 97%] Building CXX object CMakeFiles/awkward.dir/src/libawkward/io/json.cpp.o
[  111s]   In file included from /home/abuild/rpmbuild/BUILD/awkward-cpp-33/src/libawkward/io/json.cpp:7:
[  111s]   /home/abuild/rpmbuild/BUILD/awkward-cpp-33/rapidjson/include/rapidjson/document.h:102:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
[  111s]     102 |     : public std::iterator<std::random_access_iterator_tag
[  111s]         |                   ^~~~~~~~
[  111s]   In file included from /usr/include/c++/14/bits/stl_algobase.h:65,
[  111s]                    from /usr/include/c++/14/bits/specfun.h:43,
[  111s]                    from /usr/include/c++/14/cmath:3898,
[  111s]                    from /usr/include/c++/14/complex:44,
[  111s]                    from /home/abuild/rpmbuild/BUILD/awkward-cpp-33/src/libawkward/io/json.cpp:5:
[  111s]   /usr/include/c++/14/bits/stl_iterator_base_types.h:127:34: note: declared here
[  111s]     127 |     struct _GLIBCXX17_DEPRECATED iterator
[  111s]         |                                  ^~~~~~~~
[  111s]   /home/abuild/rpmbuild/BUILD/awkward-cpp-33/rapidjson/include/rapidjson/document.h:110:18: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
[  111s]     110 |     typedef std::iterator<std::random_access_iterator_tag,ValueType> BaseType;
[  111s]         |                  ^~~~~~~~
[  111s]   /usr/include/c++/14/bits/stl_iterator_base_types.h:127:34: note: declared here
[  111s]     127 |     struct _GLIBCXX17_DEPRECATED iterator
[  111s]         |                                  ^~~~~~~~
[  111s]   /home/abuild/rpmbuild/BUILD/awkward-cpp-33/rapidjson/include/rapidjson/document.h: In member function ‘rapidjson::GenericStringRef<CharType>& rapidjson::GenericStringRef<CharType>::operator=(const rapidjson::GenericStringRef<CharType>&)’:
[  111s]   /home/abuild/rpmbuild/BUILD/awkward-cpp-33/rapidjson/include/rapidjson/document.h:319:82: error: assignment of read-only member ‘rapidjson::GenericStringRef<CharType>::length’
[  111s]     319 |     GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
[  111s]         |                                                                           ~~~~~~~^~~~~~~~~~~~
[  111s]   gmake[2]: *** [CMakeFiles/awkward.dir/build.make:314: CMakeFiles/awkward.dir/src/libawkward/io/json.cpp.o] Error 1
[  111s]   gmake[1]: *** [CMakeFiles/Makefile2:129: CMakeFiles/awkward.dir/all] Error 2
[  111s]   gmake: *** [Makefile:136: all] Error 2
[  111s] 
[  111s]   *** CMake build failed
[  111s]   error: subprocess-exited-with-error
[  111s]   
[  111s]   × Building wheel for awkward-cpp (pyproject.toml) did not run successfully.
[  111s]   │ exit code: 1
[  111s]   ╰─> See above for output.
[  111s]   
[  111s]   note: This error originates from a subprocess, and is likely not a problem with pip.
[  111s]   full command: /usr/bin/python3.10 /usr/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmp1q1erayt
[  111s]   cwd: /home/abuild/rpmbuild/BUILD/awkward-cpp-33
[  111s]   Building wheel for awkward-cpp (pyproject.toml): finished with status 'error'
[  111s]   ERROR: Failed building wheel for awkward-cpp
[  111s] Failed to build awkward-cpp
[  111s] ERROR: Failed to build one or more wheels
jpivarski commented 1 month ago

This was fixed by #3110, although that hasn't made it into a release on PyPI yet. I should try to get a new release out soon.

jpivarski commented 1 month ago

There's a new release of awkward-cpp (34) and awkward (2.6.5), and the new awkward-cpp has an updated RapidJSON that fixes the issue you saw.

(Or... one that looks exactly like it and we'll find out that you hit something different, but that's not likely. Request to reopen this issue if it's not fixed.)

glaubitz commented 3 weeks ago

I can confirm that this issue is now fixed. Thanks!