Menu

#309 AdvanceCOMP fails to build from source using GCC v14

other
open
nobody
advcomp (13)
5
2024-07-31
2024-05-22
No

My attempt to compile advcomp v2.6 from source on Kubuntu Linux 24.04 LTS "Noble Numbat" using the distribution's default compiler collection (GNU Compiler Collection v14) did not succeed. The end result was the following output:

$ ./configure --sysconfdir=/etc --sharedstatedir=/var/lib --localstatedir=/var --runstatedir=/run --libdir=/usr/local/lib/x86_64-linux-gnu \
  --includedir=/usr/local/include/x86_64-linux-gnu--build=x86_64-linux-gnu --enable-bzip2 --enable-year2038

$ echo "${CFLAGS}"
-pipe -m64 -mabi=sysv -march=broadwell -maes -mno-vaes --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=10240 --param=ssp-buffer-size=4
-maddress-mode=long -malign-data=compat -mbranch-cost=3 -mfpmath=sse -mfunction-return=keep -mindirect-branch=keep -mlarge-data-threshold=65536 -mtune=broadwell
-mstack-protector-guard=tls -mtls-dialect=gnu -fstack-protector-strong -fasynchronous-unwind-tables -fcf-protection -fstack-clash-protection -flto=auto -ffat-lto-objects
-fuse-linker-plugin -fuse-ld=bfd -Wformat -Wformat-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_REENTRANT -Wl,-z,now -Wl,-z,relro -Wl,-sort-common -Wl,--enable-new-dtags

$ echo "${CXXFLAGS}"
-pipe -m64 -mabi=sysv -march=broadwell -maes -mno-vaes --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=10240 --param=ssp-buffer-size=4
-maddress-mode=long -malign-data=compat -mbranch-cost=3 -mfpmath=sse -mfunction-return=keep -mindirect-branch=keep -mlarge-data-threshold=65536 -mtune=broadwell
-mstack-protector-guard=tls -mtls-dialect=gnu -fstack-protector-strong -fasynchronous-unwind-tables -fcf-protection -fstack-clash-protection -flto=auto -ffat-lto-objects
-fuse-linker-plugin -fuse-ld=bfd -Wformat -Wformat-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_REENTRANT -Wl,-z,now -Wl,-z,relro -Wl,-sort-common -Wl,--enable-new-dtags
-fvisibility-inlines-hidden

$ make -j8

libdeflate/deflate_compress.c:4127:1: error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’
 4127 | }
      | ^
 <function_type 0x79d48648f000
    type <integer_type 0x79d486622690 unsigned int sizes-gimplified public unsigned SI
        size <integer_cst 0x79d486624198 constant 32>
        unit-size <integer_cst 0x79d4866241b0 constant 4>
        align:32 warn_if_not_align:0 symtab:0 alias-set 2 canonical-type 0x79d486622690 precision:32 min <integer_cst 0x79d4866241c8 0> max <integer_cst 0x79d486624180 4294967295>
        pointer_to_this <pointer_type 0x79d486632690>>
    QI
    size <integer_cst 0x79d486624048 type <integer_type 0x79d4866220a8 bitsizetype> constant 8>
    unit-size <integer_cst 0x79d486624060 type <integer_type 0x79d486622000 sizetype> constant 1>
    align:8 warn_if_not_align:0 symtab:0 alias-set -1 structural-equality
    arg-types <tree_list 0x79d486485cf8
        value <pointer_type 0x79d482baba80 type <record_type 0x79d482bab9d8 libdeflate_compressor>
            unsigned DI
            size <integer_cst 0x79d486602f48 constant 64>
            unit-size <integer_cst 0x79d486602f60 constant 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x79d486443498>
        chain <tree_list 0x79d48661cd98 value <void_type 0x79d486622f18 void>>>
    pointer_to_this <pointer_type 0x79d482a385e8>>
<function_type 0x79d482a1c3f0
    type <integer_type 0x79d486464a80 u32 sizes-gimplified public unsigned SI
        size <integer_cst 0x79d486624198 constant 32>
        unit-size <integer_cst 0x79d4866241b0 constant 4>
        align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x79d486622690 precision:32 min <integer_cst 0x79d4866241c8 0> max <integer_cst 0x79d486624180 4294967295>
        pointer_to_this <pointer_type 0x79d48646e348>>
    QI
    size <integer_cst 0x79d486624048 type <integer_type 0x79d4866220a8 bitsizetype> constant 8>
    unit-size <integer_cst 0x79d486624060 type <integer_type 0x79d486622000 sizetype> constant 1>
    align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x79d48648f000
    arg-types <tree_list 0x79d482a1bd48
        value <pointer_type 0x79d482baba80 type <record_type 0x79d482bab9d8 libdeflate_compressor>
            unsigned DI
            size <integer_cst 0x79d486602f48 constant 64>
            unit-size <integer_cst 0x79d486602f60 constant 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x79d486443498>
        chain <tree_list 0x79d48661cd98 value <void_type 0x79d486622f18 void>>>
    pointer_to_this <pointer_type 0x79d482a38540>>
during IPA pass: *free_lang_data
libdeflate/deflate_compress.c:4127:1: internal compiler error: ‘verify_type’ failed
0x186bbae verify_type(tree_node const*)
    ../../src/gcc/tree.cc:14395
0x27c5c2f free_lang_data
    ../../src/gcc/ipa-free-lang-data.cc:1134
0x27c5c2f execute
    ../../src/gcc/ipa-free-lang-data.cc:1176
make[1]: *** [Makefile:846: libdeflate/deflate_compress.o] Error 1
make: *** [Makefile:657: all] Error 2

Installing the default compiler collection from Kubuntu 23.10 "Mantic Minotaur", to wit GNU Compiler Collection v13.2.0, and then reconfiguring the build with CC=/usr/bin/gcc-13 and CXX=/usr/bin/g++-13 appended to the flags passed to the configure script above allowed the build to complete successfully. I'm not familiar enough with C to understand the nature of the error, but I thought it appropriate to make you aware of the issue all the same.

Thank you for your work producing such a useful and reliable set of utilities.

Discussion

  • Andrea Mazzoleni

    Likely it's this issue of gcc 14.0 and 14.1. To be fixed in 14.2.

    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114927

    Maybe try with the option -std=c99 or -std=c11

     
    👍
    1
  • Peter J. Mello

    Peter J. Mello - 2024-07-31

    Excellent catch, that was indeed the issue, and your suggestions both moved me past the failure. It sucks that GNU didn't agree on a remediation approach in time for the v14.2 release; it's now pushed back to v15 provided they can arrive at some consensus. I'm much obliged to you all the same, though.

     

Log in to post a comment.