catch2 fails to build on non x86_64 systems

  • Done
  • quality assurance status badge
Details
3 participants
  • Danny Milosavljevic
  • Efraim Flashner
  • maxim.cournoyer
Owner
unassigned
Submitted by
maxim.cournoyer
Severity
normal
M
M
maxim.cournoyer wrote on 3 Aug 2020 20:22
catch2 build failure on ARM
(name . bug-guix)(address . bug-guix@gnu.org)
87pn87oahu.fsf@hurd.i-did-not-set--mail-host-address--so-tickle-me
On ARM systems, (armhf-linux, aarch64-linux), the catch2 package fails to build, due to a
compilation warning treated as an error:

[ 90%] Building CXX object CMakeFiles/SelfTest.dir/include/reporters/catch_reporter_xml.cpp.o
/gnu/store/ap7hgyv4rjqmhg4a6cb6cypsh3g1f5q4-gcc-7.5.0/bin/c++ -I/tmp/guix-build-catch2-2.1.2.drv-0/source/include -O2 -g -DNDEBUG -Wall -Wextra -Wunreachable-code -Wpedantic -Werror -std=c++11 -o CMakeFiles/SelfTest.dir/include/reporters/catch_reporter_xml.cpp.o -c /tmp/guix-build-catch2-2.1.2.drv-0/source/include/reporters/catch_reporter_xml.cpp
/tmp/guix-build-catch2-2.1.2.drv-0/source/include/internal/catch_tostring.cpp: In static member function ‘static std::__cxx11::string Catch::StringMaker<char>::convert(char)’:
/tmp/guix-build-catch2-2.1.2.drv-0/source/include/internal/catch_tostring.cpp:202:21: error: comparison is always true due to limited range of data type [-Werror=type-limits]
} else if ('\0' <= value && value < ' ') {
~~~~~^~~~~~~~
M
M
maxim.cournoyer wrote on 3 Aug 2020 20:25
(address . maxim.cournoyer@gmail.com)(address . 42702@debbugs.gnu.org)
87lfivoac9.fsf@hurd.i-did-not-set--mail-host-address--so-tickle-me
maxim.cournoyer@gmail.com writes:

Toggle quote (10 lines)
> On ARM systems, (armhf-linux, aarch64-linux), the catch2 package fails to build, due to a
> compilation warning treated as an error:
>
> [ 90%] Building CXX object CMakeFiles/SelfTest.dir/include/reporters/catch_reporter_xml.cpp.o
> /gnu/store/ap7hgyv4rjqmhg4a6cb6cypsh3g1f5q4-gcc-7.5.0/bin/c++ -I/tmp/guix-build-catch2-2.1.2.drv-0/source/include -O2 -g -DNDEBUG -Wall -Wextra -Wunreachable-code -Wpedantic -Werror -std=c++11 -o CMakeFiles/SelfTest.dir/include/reporters/catch_reporter_xml.cpp.o -c /tmp/guix-build-catch2-2.1.2.drv-0/source/include/reporters/catch_reporter_xml.cpp
> /tmp/guix-build-catch2-2.1.2.drv-0/source/include/internal/catch_tostring.cpp: In static member function ‘static std::__cxx11::string Catch::StringMaker<char>::convert(char)’:
> /tmp/guix-build-catch2-2.1.2.drv-0/source/include/internal/catch_tostring.cpp:202:21: error: comparison is always true due to limited range of data type [-Werror=type-limits]
> } else if ('\0' <= value && value < ' ') {
> ~~~~~^~~~~~~~

This is also the case for i686-linux.
M
M
maxim.cournoyer wrote on 3 Aug 2020 20:24
control message for bug #42702
(address . control@debbugs.gnu.org)
87o8nroadl.fsf@hurd.i-did-not-set--mail-host-address--so-tickle-me
retitle 42702 catch2 fails to build on non x86_64 systems
quit
D
D
Danny Milosavljevic wrote on 4 Aug 2020 01:09
Re: bug#42702: catch2 build failure on ARM
(address . maxim.cournoyer@gmail.com)(address . 42702@debbugs.gnu.org)
20200804010928.455f2637@scratchpost.org
Hi Maxim,

On Mon, 03 Aug 2020 14:22:21 -0400
maxim.cournoyer@gmail.com wrote:

Toggle quote (3 lines)
> } else if ('\0' <= value && value < ' ') {
> ~~~~~^~~~~~~~

I think that this tries to find non-printable characters, so those with ASCII
codes 0 < value < 32 and 128 < value < 255. But char is unsigned on ARM, so
it won't do that with the code above. Therefore, this IS an error and treating
it as a warning would be very, very, bad.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl8omSgACgkQ5xo1VCww
uqWuQAf/TIg2GX0wiCPZ8T9/wFvwAoG+iH50nDWsRXsPuCw9XUqH+loo4nVPJtpx
OnktYVjpClMEOxwsX2sHHSjdNOqjjhMiHRzBlj8Jf+ZQLP7oJxEStREIXHhiyPOF
VBF9L2bnwYLd8AIbJD7VHuGZ42QvI1+Gwa04qzujYAcs3ZWo1VH+fiJ98/34Znuh
G2dzUFL3hd61BM3XAOjACRSsd78v503cdOb2MQOg5ifrBxfgX14N05V28zgu/X/o
oKjb6CR+rjp0Ya+7Fc5UrfsleaJLI7ghxnbzsW+r6ofwiXQn5lmXektETWvdHW19
huUDrw8uP9WZivfcCWpK8caApKxrfA==
=8fM+
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 4 Aug 2020 09:44
(address . maxim.cournoyer@gmail.com)(address . 42702-done@debbugs.gnu.org)
20200804074432.GN1134@E5400
On Mon, Aug 03, 2020 at 02:22:21PM -0400, maxim.cournoyer@gmail.com wrote:
Toggle quote (10 lines)
> On ARM systems, (armhf-linux, aarch64-linux), the catch2 package fails to build, due to a
> compilation warning treated as an error:
>
> [ 90%] Building CXX object CMakeFiles/SelfTest.dir/include/reporters/catch_reporter_xml.cpp.o
> /gnu/store/ap7hgyv4rjqmhg4a6cb6cypsh3g1f5q4-gcc-7.5.0/bin/c++ -I/tmp/guix-build-catch2-2.1.2.drv-0/source/include -O2 -g -DNDEBUG -Wall -Wextra -Wunreachable-code -Wpedantic -Werror -std=c++11 -o CMakeFiles/SelfTest.dir/include/reporters/catch_reporter_xml.cpp.o -c /tmp/guix-build-catch2-2.1.2.drv-0/source/include/reporters/catch_reporter_xml.cpp
> /tmp/guix-build-catch2-2.1.2.drv-0/source/include/internal/catch_tostring.cpp: In static member function ‘static std::__cxx11::string Catch::StringMaker<char>::convert(char)’:
> /tmp/guix-build-catch2-2.1.2.drv-0/source/include/internal/catch_tostring.cpp:202:21: error: comparison is always true due to limited range of data type [-Werror=type-limits]
> } else if ('\0' <= value && value < ' ') {
> ~~~~~^~~~~~~~

Fixed in 7f101e7ceb869882b9a959cb7801aea64c26704d

Do note that this breaks libfive, which has no dependants.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl8pEdgACgkQQarn3Mo9
g1HVhhAAgi7BAqHhlOPVkItVQPWAZ0pf0jQzg7G+HOSEpiG6lOgfcjP7bPmWUdIr
xP9LQEBY68okBHqEfgS+/ViroqDc4t2Awd5ik27A6ykTD3LHWAGVHqR1np1o9M3q
zzgkqWB70xPgb18Hug/MV+pldcIfF8Q6dFZYVYzHvCf9LyDS2ieFHcl/ZLOu7VQm
HpX2AafjSklBdDtb9dL0g5CeTfzdMbEmV4E1pBI8V+RsXwJ9gXTqnxZLKiPu8jOd
gL3aF9xXnjM38GyUgq35WT/ikR8Ay4rc6X4AprBbDBbbHvw1E7AAQwSZcs297VT0
NJNOiVmIqxkEXWudcGMcDR5jadz+iaMq428+02hSnLYTK6V+ZMtlmhke2zwbmL2d
s8EM9O45wgKLw3ZPcMRsA2kmGQgufR9eD4aDNl61DeMJ+FXVuv4bADLVew/VIyi6
161hLUYfzLLlXgyl7iSD3zV699ZcZjN6GQRlwOfebdEVwRpUVGpt2z4Gy6cvWy8O
f/BdK4aDxyjig6uAuF/O7JN+xBYtLOPag6JIdJqiKBLw4tT+mTRXbJvNLaDuJ1vL
q5KP9oWKEGqCQ7deDjwSYdsgnlT1wAvOARLkr4z/QprRjZ45pH3YJ1w8O96L2g9u
4/1MRL6e3vAsTJ6HAyBHwzXRhLqiwKm1TDdng8Iv66FcNYSO7R8=
=QDRF
-----END PGP SIGNATURE-----


Closed
M
M
Maxim Cournoyer wrote on 24 Aug 2020 05:27
Re: bug#42702: closed (Re: bug#42702: catch2 build failure on ARM)
(name . GNU bug Tracking System)(address . help-debbugs@gnu.org)(address . 42702@debbugs.gnu.org)
874koswwnp.fsf@gmail.com
Hello,

[...]

Toggle quote (21 lines)
> From: Efraim Flashner <efraim@flashner.co.il>
> Subject: Re: bug#42702: catch2 build failure on ARM
> To: maxim.cournoyer@gmail.com
> Cc: 42702-done@debbugs.gnu.org
> Date: Tue, 4 Aug 2020 10:44:32 +0300 (2 weeks, 5 days, 19 hours ago)
>
> On Mon, Aug 03, 2020 at 02:22:21PM -0400, maxim.cournoyer@gmail.com wrote:
>> On ARM systems, (armhf-linux, aarch64-linux), the catch2 package fails to build, due to a
>> compilation warning treated as an error:
>>
>> [ 90%] Building CXX object CMakeFiles/SelfTest.dir/include/reporters/catch_reporter_xml.cpp.o
>> /gnu/store/ap7hgyv4rjqmhg4a6cb6cypsh3g1f5q4-gcc-7.5.0/bin/c++ -I/tmp/guix-build-catch2-2.1.2.drv-0/source/include -O2 -g -DNDEBUG -Wall -Wextra -Wunreachable-code -Wpedantic -Werror -std=c++11 -o CMakeFiles/SelfTest.dir/include/reporters/catch_reporter_xml.cpp.o -c /tmp/guix-build-catch2-2.1.2.drv-0/source/include/reporters/catch_reporter_xml.cpp
>> /tmp/guix-build-catch2-2.1.2.drv-0/source/include/internal/catch_tostring.cpp: In static member function ‘static std::__cxx11::string Catch::StringMaker<char>::convert(char)’:
>> /tmp/guix-build-catch2-2.1.2.drv-0/source/include/internal/catch_tostring.cpp:202:21: error: comparison is always true due to limited range of data type [-Werror=type-limits]
>> } else if ('\0' <= value && value < ' ') {
>> ~~~~~^~~~~~~~
>
> Fixed in 7f101e7ceb869882b9a959cb7801aea64c26704d
>
> Do note that this breaks libfive, which has no dependants.

Thank you for fixing it! :-)

Maxim
E
E
Efraim Flashner wrote on 24 Aug 2020 10:45
(address . 42702-done@debbugs.gnu.org)
20200824084555.GE1392@E5400
Closing this bug :)


--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl9DfkAACgkQQarn3Mo9
g1G22Q//ajA8KwylMgWf1i9JwkZMYp9+MXmIoFR46+uyCqXh9iZ94WeengYltwWC
8rqLaHZPRXepaz17PmH8esHjdTg1PvuGvmJz8selckohZECEpExdOW4/abXbQ8uR
9H7dORikOHwPNj1FJhXiM91zSoGfQ8+GPBek/TmsfRXw2FXoCSHKRngj5D5FN5gM
qVa4KoChlNP4kTDWUps5TW69iomq3Y+xlmG2c020br38TeZRmnh304P4t+baOeql
Wrnkn8BKsxkjhaBNHElNGcOlT/HNr0wlLHB24UgX4AlMuMxpFr/9C+wVwXnxvlor
n/QCyC/Ld2VkXS9OaxKtEG12MAwlP0ot4TbdMS8hHG64uBU0BdkxklC8d/QD4wrk
EMSlSSYUramsoijcKmrcVIlxYL0909BMhJu/AFblxBaYTDfZjZMfEYZT+lxpPoc7
x5u8j67fUxGaT8Mf6Xmq5YyKtRxFrS69qPEfBiWmm04WfVO7GbybJWqByuYwT1u/
WownDKt4s5fLzDrWD8wJKEoB6QYINhnMBRvlUmcE0CKbEMmbVaBmPsaTmAaRwkqx
GxHJ+470CB59duyFyusiqXmRaxfPg/JTcQkV6/qHWqG9CAMO47LFh5+gJa7/JJxt
jxGtm9mh5qJMj4w0MJDIGlRn+W/LnhY7kXfcTv1xDw7FvJlgwCA=
=3ZOb
-----END PGP SIGNATURE-----


Closed
?