Menu ▾ ▴

#205 Fails to compile using gcc-16

v0.99992
closed
nobody
None
3
2026-04-20
2026-04-14
No

I'm trying to build XeTeX using gcc-16. Unfortunately it fails to build (error log is attached). That report is for the XeTeX version delivered qith TeX Live 2026 (XeTeX 0.999998 (3 March 2026)).
If you need a machine with gcc-16 installed, you may use a Debian unstable, but you have to use the gcc and the g++ from Debian experimental. See here for the mail template with instructions.

1 Attachments

Discussion

  • karl berry

    karl berry - 2026-04-19

    Thanks for the report, as always. Can you, or anyone, suggest a patch? My minimal C++ knowledge is not up to dealing with this.

    Also, I wonder if it might be wise to wait until gcc16 is actually released, since it's such bleeding-edge stuff. or are these problems unlikely to change?

     
  • Jonathan Kew

    Jonathan Kew - 2026-04-20

    From a quick look at the log, it seems that the ICU headers on that system are incompatible with this compiler version (or with the particular compiler options being used):

    /usr/include/unicode/localpointer.h:559:26: error: parameter declared ‘auto’
      559 | template <typename Type, auto closeFunction>
    

    I think this usage of auto was a C++17 feature, so perhaps -std=c++17 would help? Though it looks like gcc16 is expected to default to C++20, and it'd be a bit surprising if something that was accepted under 17 starts failing under 20.

     
  • Hilmar Preuße

    Hilmar Preuße - 2026-04-20

    For now I confirm, that the flag -std=c++17 is a working work around. I'll try to contact the ICU maintainers. Many thanks!

     
  • karl berry

    karl berry - 2026-04-20

    ICU 76 requires C++17 per https://unicode-org.github.io/icu/download/76.html#icu4c-platform-support . Thanks to Norbert, I (r78759) installed the attached change (more or less) in web2c/configure.ac, and updated our copy of ax_cxx_compile_stdcxx.m4 in Build/source/m4.

     
  • karl berry

    karl berry - 2026-04-20
    • status: open --> closed
     
  • Hilmar Preuße

    Hilmar Preuße - 2026-04-20

    I've applied the patch into the Debian TL package, and can confirm that building using gcc-16 works. The issue may be closed.

     

Anonymous
Anonymous

Add attachments
Cancel