Bug#1116075: libphonenumber FTBFS with gcc-15 and -Wbidi-char
John Chittum
john.chittum at canonical.com
Tue Sep 23 20:22:24 BST 2025
Subject: libphonenumber FTBFS with gcc-15 and -Wbidi-char
Package: libphonenumber8
Source: libphonenumber
X-Debbugs-Cc: john.chittum at canonical.com
Version: 8.13.51+ds-4.2
Severity: normal
attempting to compile libphonenumber with Ubuntu defaults with gcc-15
results in a FTBFS. This is due to -Werror=bidi-char being set by default.
-Wbidi-char raises
/usr/bin/c++ -DI18N_PHONENUMBERS_USE_ALTERNATE_FORMATS
-DI18N_PHONENUMBERS_USE_ICU_REGEXP
-DI18N_PHONENUMBERS_USE_TR1_UNORDERED_MAP -I/<<PKGBUILDDIR>>/cpp/src
-I/<<PKGBUILDDIR>>/cpp/test -g -O2 -fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer -ffile-prefix-map=/<<PKGBUILDDIR>>=.
-flto=auto -ffat-lto-objects -fstack-protector-strong
-fstack-clash-protection -Wformat -Werror=format-security -fcf-protection
-fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/libphonenumber-8.13.51+ds-4.2build1
-Wdate-time -D_FORTIFY_SOURCE=3 -Wall -Werror -MD -MT
CMakeFiles/libphonenumber_test.dir/test/phonenumbers/phonenumberutil_test.cc.o
-MF
CMakeFiles/libphonenumber_test.dir/test/phonenumbers/phonenumberutil_test.cc.o.d
-o
CMakeFiles/libphonenumber_test.dir/test/phonenumbers/phonenumberutil_test.cc.o
-c /<<PKGBUILDDIR>>/cpp/test/phonenumbers/phonenumberutil_test.cc
/<<PKGBUILDDIR>>/cpp/test/phonenumbers/phonenumberutil_test.cc:1627:43:
error: found problematic Unicode character ‘U+200F (RIGHT-TO-LEFT MARK)’
[-Werror=bidi-chars=]
1627 | /* "(650) 253-0000<U+200F>" */, &extracted_number);
| ^~~~~~~~
cc1plus: all warnings being treated as errors
Where <U+200F> in the code is the properly formatted Unicode character.
The test correctly encodes it, and only the comment contains the unicode
literal. However, -Wbidi-char checks comments as well, as that is a source
for a Trojan Source attack. pragma comments also cannot disable bidi-char
when set via cli or envvar.
Attached is the proposed patch going into Ubuntu, which escapes the
comment. This is also reported upstream with Google, where I suggest
escaping as well.
Upstream: https://partnerissuetracker.corp.google.com/issues/446931058
Ubuntu Bug:
https://bugs.launchpad.net/ubuntu/+source/libphonenumber/+bug/2124964
--
-----------------------
Dr. John Chittum
Engineering Manager, Canonical, Debcrafters
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-maintainers/attachments/20250923/78c9ab2e/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lp2124964-bidi-char-warn-err.patch
Type: text/x-patch
Size: 1303 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-maintainers/attachments/20250923/78c9ab2e/attachment-0001.bin>
More information about the pkg-java-maintainers
mailing list