Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 787302

Summary: app-crypt/md5deep-4.4 - hash.cpp: error: ordered comparison of pointer with integer zero (const unsigned char* and int)
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Anthony Basile <blueness>
Status: RESOLVED FIXED    
Severity: normal CC: ionen, sam, treecleaner
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/jessek/hashdeep/commit/6ef69a2
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 732706    
Attachments: emerge-info.txt
app-crypt:md5deep-4.4:20210430-222254.log
emerge-history.txt
environment
etc.portage.tar.bz2
logs.tar.bz2
temp.tar.bz2
Patch to fix compiling md5deep with gcc-11.1.0

Description Toralf Förster gentoo-dev 2021-05-01 08:58:06 UTC
      |                                                 ^
hash.cpp: In member function ‘void file_data_hasher_t::hash()’:
hash.cpp:282:26: error: ordered comparison of pointer with integer zero (‘const unsigned char*’ and ‘int’)
  282 |             if(fdht->base>0){
      |                ~~~~~~~~~~^~
make[2]: *** [Makefile:482: hash.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/app-crypt/md5deep-4.4/work/hashdeep-release-4.4/src'

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_gnome_systemd-20210424-085324

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.3.1
 [2] x86_64-pc-linux-gnu-11.1.0 *
clang version 12.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/12/bin
/usr/lib/llvm/12
12.0.0
Python 3.8.9
Available Ruby profiles:
  [1]   ruby26 (with Rubygems)
  [2]   ruby30 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.51.0 *
The following VMs are available for generation-2:
*)	AdoptOpenJDK 8.292_p10 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8  system-vm

The Glorious Glasgow Haskell Compilation System, version 8.10.4

  timestamp(s) of HEAD at this tinderbox image:
/var/db/repos/gentoo	Fri Apr 30 22:05:17 UTC 2021

emerge -qpvO app-crypt/md5deep
[ebuild  N    ] app-crypt/md5deep-4.4
Comment 1 Toralf Förster gentoo-dev 2021-05-01 08:58:07 UTC
Created attachment 704817 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-05-01 08:58:09 UTC
Created attachment 704820 [details]
app-crypt:md5deep-4.4:20210430-222254.log
Comment 3 Toralf Förster gentoo-dev 2021-05-01 08:58:10 UTC
Created attachment 704823 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2021-05-01 08:58:12 UTC
Created attachment 704826 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2021-05-01 08:58:13 UTC
Created attachment 704829 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2021-05-01 08:58:14 UTC
Created attachment 704832 [details]
logs.tar.bz2
Comment 7 Toralf Förster gentoo-dev 2021-05-01 08:58:15 UTC
Created attachment 704835 [details]
temp.tar.bz2
Comment 8 Yuriy Ilinykh 2021-05-09 17:51:58 UTC
fixed in upstream with this commit
https://github.com/jessek/hashdeep/commit/6ef69a26126ee4e69a25392fd456b8a66c51dffd
Comment 9 Adrian Bassett 2021-05-09 18:24:51 UTC
Created attachment 706722 [details, diff]
Patch to fix compiling md5deep with gcc-11.1.0

Not a recent patch it would seem - 'committed on 15 Nov 2016'!

However, I've made a unified diff patch file (attached), in cas that's useful.

Compile-tested only.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-07-25 23:33:12 UTC
(In reply to Yuriy Ilinykh from comment #8)
> fixed in upstream with this commit
> https://github.com/jessek/hashdeep/commit/
> 6ef69a26126ee4e69a25392fd456b8a66c51dffd

This is a rather scary way of doing it and doesn't really make me want to trust the software. Maybe we should last-rite it instead?
Comment 11 Larry the Git Cow gentoo-dev 2021-08-05 09:37:37 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5dcf89790135c0f6424557c703d0308b6601be76

commit 5dcf89790135c0f6424557c703d0308b6601be76
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2021-08-05 09:37:29 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2021-08-05 09:37:29 +0000

    app-crypt/md5deep: update EAPI 6 -> 8
    
    Closes: https://bugs.gentoo.org/787302
    Signed-off-by: David Seifert <soap@gentoo.org>

 .../files/md5deep-4.4-pointer-comparison.patch       | 11 +++++++++++
 app-crypt/md5deep/md5deep-4.4.ebuild                 | 20 +++++++++++---------
 2 files changed, 22 insertions(+), 9 deletions(-)