debian/rules.real: export LANG = C.UTF-8 for sphinx
src:linux 6.7.7-1 in experimental FTBFS with this error output:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_COLLATE = "C",
LC_NUMERIC = "C",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
./Documentation/sphinx/parse-headers.pl include/uapi/linux/lirc.h /<<PKGBUILDDIR>>/debian/build/build-doc/Documentation
/output/lirc.h.rst ./Documentation/userspace-api/media/lirc.h.rst.exceptions
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_COLLATE = "C",
LC_NUMERIC = "C",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Traceback (most recent call last):
File "/usr/share/sphinx/scripts/python3/sphinx-build", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3/dist-packages/sphinx/cmd/build.py", line 326, in main
locale.setlocale(locale.LC_ALL, '')
File "/usr/lib/python3.11/locale.py", line 627, in setlocale
return _setlocale(category, locale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
locale.Error: unsupported locale setting
make[5]: *** [Documentation/Makefile:162: xmldocs] Error 1
make[4]: *** [/<<PKGBUILDDIR>>/debian/build/build-doc/Makefile:1726: xmldocs] Error 2
make[3]: *** [Makefile:252: __sub-make] Error 2
make[3]: Leaving directory '/<<PKGBUILDDIR>>/debian/build/build-doc'
make[2]: *** [debian/rules.real:208: debian/stamps/build-doc] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: *** [debian/rules.gen:1915: build-indep_doc] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:66: build-indep] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
Setting LANG
to C.UTF8
fixes the issue.