Orion Poplawski created THRIFT-5498: ---------------------------------------
Summary: Fails to build with gcc 12 Key: THRIFT-5498 URL: https://issues.apache.org/jira/browse/THRIFT-5498 Project: Thrift Issue Type: Bug Components: Build Process Affects Versions: 0.15.0 Reporter: Orion Poplawski Fedora rawhide has been updated to gcc 12 and now thrift fails to build with: make[3]: Entering directory '/builddir/build/BUILD/thrift-0.15.0/compiler/cpp' /bin/sh ../../libtool --tag=CXX --mode=link g++ -std=c++11 -Wall -Wextra -pedantic -Werror -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -o thrift src/thrift/audit/thrift-t_audit.o src/thrift/thrift-common.o src/thrift/generate/thrift-t_generator.o src/thrift/thrift-main.o src/thrift/parse/thrift-parse.o src/thrift/parse/thrift-t_typedef.o src/thrift/generate/thrift-t_c_glib_generator.o src/thrift/generate/thrift-t_cl_generator.o src/thrift/generate/thrift-t_cpp_generator.o src/thrift/generate/thrift-t_d_generator.o src/thrift/generate/thrift-t_dart_generator.o src/thrift/generate/thrift-t_delphi_generator.o src/thrift/generate/thrift-t_erl_generator.o src/thrift/generate/thrift-t_go_generator.o src/thrift/generate/thrift-t_gv_generator.o src/thrift/generate/thrift-t_haxe_generator.o src/thrift/generate/thrift-t_html_generator.o src/thrift/generate/thrift-t_markdown_generator.o src/thrift/generate/thrift-t_java_generator.o src/thrift/generate/thrift-t_javame_generator.o src/thrift/generate/thrift-t_js_generator.o src/thrift/generate/thrift-t_json_generator.o src/thrift/generate/thrift-t_lua_generator.o src/thrift/generate/thrift-t_netstd_generator.o src/thrift/generate/thrift-t_ocaml_generator.o src/thrift/generate/thrift-t_perl_generator.o src/thrift/generate/thrift-t_php_generator.o src/thrift/generate/thrift-t_py_generator.o src/thrift/generate/thrift-t_rb_generator.o src/thrift/generate/thrift-t_rs_generator.o src/thrift/generate/thrift-t_st_generator.o src/thrift/generate/thrift-t_swift_generator.o src/thrift/generate/thrift-t_xml_generator.o src/thrift/generate/thrift-t_xsd_generator.o src/thrift/libparse.a -lrt -lpthread libtool: link: g++ -std=c++11 -Wall -Wextra -pedantic -Werror -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -o thrift src/thrift/audit/thrift-t_audit.o src/thrift/thrift-common.o src/thrift/generate/thrift-t_generator.o src/thrift/thrift-main.o src/thrift/parse/thrift-parse.o src/thrift/parse/thrift-t_typedef.o src/thrift/generate/thrift-t_c_glib_generator.o src/thrift/generate/thrift-t_cl_generator.o src/thrift/generate/thrift-t_cpp_generator.o src/thrift/generate/thrift-t_d_generator.o src/thrift/generate/thrift-t_dart_generator.o src/thrift/generate/thrift-t_delphi_generator.o src/thrift/generate/thrift-t_erl_generator.o src/thrift/generate/thrift-t_go_generator.o src/thrift/generate/thrift-t_gv_generator.o src/thrift/generate/thrift-t_haxe_generator.o src/thrift/generate/thrift-t_html_generator.o src/thrift/generate/thrift-t_markdown_generator.o src/thrift/generate/thrift-t_java_generator.o src/thrift/generate/thrift-t_javame_generator.o src/thrift/generate/thrift-t_js_generator.o src/thrift/generate/thrift-t_json_generator.o src/thrift/generate/thrift-t_lua_generator.o src/thrift/generate/thrift-t_netstd_generator.o src/thrift/generate/thrift-t_ocaml_generator.o src/thrift/generate/thrift-t_perl_generator.o src/thrift/generate/thrift-t_php_generator.o src/thrift/generate/thrift-t_py_generator.o src/thrift/generate/thrift-t_rb_generator.o src/thrift/generate/thrift-t_rs_generator.o src/thrift/generate/thrift-t_st_generator.o src/thrift/generate/thrift-t_swift_generator.o src/thrift/generate/thrift-t_xml_generator.o src/thrift/generate/thrift-t_xsd_generator.o src/thrift/libparse.a -lrt -lpthread make[3]: Leaving directory '/builddir/build/BUILD/thrift-0.15.0/compiler/cpp' In member function 'deallocate', inlined from 'deallocate' at /usr/include/c++/12/bits/alloc_traits.h:496:23, inlined from '_M_deallocate' at /usr/include/c++/12/bits/stl_vector.h:386:19, inlined from '__dt_base ' at /usr/include/c++/12/bits/stl_vector.h:365:15, inlined from '__dt_base ' at /usr/include/c++/12/bits/stl_vector.h:732:7, inlined from 'generate_program' at src/thrift/generate/t_html_generator.cc:271:20: /usr/include/c++/12/bits/new_allocator.h:158:33: error: 'operator delete' called on pointer '_605' with nonzero offset [1, 9223372036854775800] [-Werror=free-nonheap-object] 158 | _GLIBCXX_OPERATOR_DELETE(_GLIBCXX_SIZED_DEALLOC(__p, __n)); | ^ In member function 'allocate', inlined from 'allocate' at /usr/include/c++/12/bits/alloc_traits.h:464:28, inlined from '_M_allocate' at /usr/include/c++/12/bits/stl_vector.h:377:33, inlined from '_M_create_storage' at /usr/include/c++/12/bits/stl_vector.h:394:44, inlined from '__ct ' at /usr/include/c++/12/bits/stl_vector.h:331:26, inlined from '__ct ' at /usr/include/c++/12/bits/stl_vector.h:597:61, inlined from 'generate_program' at src/thrift/generate/t_html_generator.cc:271:20: /usr/include/c++/12/bits/new_allocator.h:137:55: note: returned from 'operator new' 137 | return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp))); | ^ lto1: all warnings being treated as errors make[4]: *** [/tmp/ccK7NMBp.mk:119: /tmp/ccpojITj.ltrans39.ltrans.o] Error 1 Full logs can be found (at least for a while) here: https://koji.fedoraproject.org/koji/taskinfo?taskID=81331811 -- This message was sent by Atlassian Jira (v8.20.1#820001)