Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 810688 - dev-libs/crc32c-1.0.6 - In function 'uint64_t crc32c::ReadUint64LE(const uint8_t*)': ../work/crc32c-1.0.6/src/./crc32c_read_le.h:37:67: error: left shift count >= width of type [-Werror=shift-count-overflow]
Summary: dev-libs/crc32c-1.0.6 - In function 'uint64_t crc32c::ReadUint64LE(const uint...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC64 Linux
: Normal normal (vote)
Assignee: Jason Zaman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 807025
  Show dependency tree
 
Reported: 2021-08-27 17:57 UTC by ernsteiswuerfel
Modified: 2021-09-05 16:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (crc32c-1.0.6:20210827-175208.log,7.45 KB, text/plain)
2021-08-27 17:57 UTC, ernsteiswuerfel
Details
emerge --info (file_810688.txt,5.74 KB, text/plain)
2021-08-27 17:57 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2021-08-27 17:57:09 UTC
Created attachment 736288 [details]
build.log

[...]
FAILED: CMakeFiles/crc32c.dir/src/crc32c_portable.cc.o 
/usr/bin/powerpc64-unknown-linux-gnu-g++ -Dcrc32c_EXPORTS -Iinclude -I/var/tmp/portage/dev-libs/crc32c-1.0.6/work/crc32c-1.0.6/include  -DNDEBUG -O2 -mcpu=970 -pipe -Wall -Wextra -Werror -fno-exceptions -fno-rtti -fPIC -std=c++11 -MD -MT CMakeFiles/crc32c.dir/src/crc32c_portable.cc.o -MF CMakeFiles/crc32c.dir/src/crc32c_portable.cc.o.d -o CMakeFiles/crc32c.dir/src/crc32c_portable.cc.o -c /var/tmp/portage/dev-libs/crc32c-1.0.6/work/crc32c-1.0.6/src/crc32c_portable.cc
In file included from /var/tmp/portage/dev-libs/crc32c-1.0.6/work/crc32c-1.0.6/src/crc32c_portable.cc:11:
/var/tmp/portage/dev-libs/crc32c-1.0.6/work/crc32c-1.0.6/src/./crc32c_read_le.h: In function 'uint64_t crc32c::ReadUint64LE(const uint8_t*)':
/var/tmp/portage/dev-libs/crc32c-1.0.6/work/crc32c-1.0.6/src/./crc32c_read_le.h:37:67: error: left shift count >= width of type [-Werror=shift-count-overflow]
   37 |           (static_cast<uint32_t>(static_cast<uint8_t>(buffer[4])) << 32) |
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/var/tmp/portage/dev-libs/crc32c-1.0.6/work/crc32c-1.0.6/src/./crc32c_read_le.h:38:67: error: left shift count >= width of type [-Werror=shift-count-overflow]
   38 |           (static_cast<uint32_t>(static_cast<uint8_t>(buffer[5])) << 40) |
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/var/tmp/portage/dev-libs/crc32c-1.0.6/work/crc32c-1.0.6/src/./crc32c_read_le.h:39:67: error: left shift count >= width of type [-Werror=shift-count-overflow]
   39 |           (static_cast<uint32_t>(static_cast<uint8_t>(buffer[6])) << 48) |
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/var/tmp/portage/dev-libs/crc32c-1.0.6/work/crc32c-1.0.6/src/./crc32c_read_le.h:40:67: error: left shift count >= width of type [-Werror=shift-count-overflow]
   40 |           (static_cast<uint32_t>(static_cast<uint8_t>(buffer[7])) << 56));
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
cc1plus: all warnings being treated as errors
Comment 1 ernsteiswuerfel archtester 2021-08-27 17:57:47 UTC
Created attachment 736291 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2021-08-27 18:05:37 UTC
Upstream 1.0.6, 1.0.7, 1.1.1 throw the same error.
Comment 3 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2021-08-27 18:10:38 UTC
Could you please check if applying this upstream fix helps?

https://github.com/google/crc32c/commit/2e97ab26b1321b655d29c5d1d4b9e9055ff7543f
Comment 4 ernsteiswuerfel archtester 2021-08-27 18:34:33 UTC
(In reply to Arthur Zamarin from comment #3)
> Could you please check if applying this upstream fix helps?
Yes, this fix makes 1.0.6 build. Thanks!
Comment 5 Larry the Git Cow gentoo-dev 2021-09-05 16:41:20 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c7d0c1fc96b5b4dd4ad858e4a27a0d06c823478

commit 3c7d0c1fc96b5b4dd4ad858e4a27a0d06c823478
Author:     Arthur Zamarin <arthurzam@gentoo.org>
AuthorDate: 2021-09-05 16:36:30 +0000
Commit:     Arthur Zamarin <arthurzam@gentoo.org>
CommitDate: 2021-09-05 16:40:19 +0000

    dev-libs/crc32c: fix for big endian systems
    
    Closes: https://bugs.gentoo.org/810688
    Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>

 ...{crc32c-1.0.6.ebuild => crc32c-1.0.6-r1.ebuild} |  4 +++
 .../crc32c/files/crc32c-1.0.6-fix-big-endian.patch | 29 ++++++++++++++++++++++
 2 files changed, 33 insertions(+)