Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 790134 - net-p2p/mldonkey-3.1.7-r2 - src/.../ error: reference to byte is ambiguous (maybe gcc-11 related)
Summary: net-p2p/mldonkey-3.1.7-r2 - src/.../ error: reference to byte is ...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jesús P Rey (Chuso)
Keywords: PullRequest
Depends on:
Blocks: bundled-libs gcc-11
  Show dependency tree
Reported: 2021-05-14 07:17 UTC by Toralf Förster
Modified: 2021-07-16 01:34 UTC (History)
4 users (show)

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

emerge-info.txt (emerge-info.txt,18.50 KB, text/plain)
2021-05-14 07:17 UTC, Toralf Förster
emerge-history.txt (emerge-history.txt,319.99 KB, text/plain)
2021-05-14 07:17 UTC, Toralf Förster
environment (environment,100.83 KB, text/plain)
2021-05-14 07:17 UTC, Toralf Förster
etc.portage.tar.bz2 (etc.portage.tar.bz2,27.39 KB, application/x-bzip)
2021-05-14 07:17 UTC, Toralf Förster
logs.tar.bz2 (logs.tar.bz2,8.84 KB, application/x-bzip)
2021-05-14 07:17 UTC, Toralf Förster
net-p2p:mldonkey-3.1.7-r2:20210514-060456.log (net-p2p:mldonkey-3.1.7-r2:20210514-060456.log,255.63 KB, text/plain)
2021-05-14 07:17 UTC, Toralf Förster
temp.tar.bz2 (temp.tar.bz2,38.55 KB, application/x-bzip)
2021-05-14 07:17 UTC, Toralf Förster

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2021-05-14 07:17:30 UTC
      |                            ^~~~~~~~
src/utils/lib/ In function ‘unsigned int CryptoPP::DERLengthEncode(CryptoPP::BufferedTransformation&, unsigned int)’:
src/utils/lib/ error: reference to ‘byte’ is ambiguous
 7379 |                 bt.Put(byte(length));
      |                        ^~~~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/stl_algobase.h:61,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/memory:63,


  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1-j2-20210510-164358


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
Python 3.8.10
Available Ruby profiles:
  [1]   ruby26 (with Rubygems)
  [2]   ruby30 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.52.1 *
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 May 14 04:50:23 UTC 2021

emerge -qpvO net-p2p/mldonkey
[ebuild  N    ] net-p2p/mldonkey-3.1.7-r2  USE="ocamlopt -bittorrent -doc -fasttrack -gd -gnutella -gtk -guionly -magic -upnp"
Comment 1 Toralf Förster gentoo-dev 2021-05-14 07:17:31 UTC
Created attachment 708285 [details]
Comment 2 Toralf Förster gentoo-dev 2021-05-14 07:17:33 UTC
Created attachment 708288 [details]
Comment 3 Toralf Förster gentoo-dev 2021-05-14 07:17:34 UTC
Created attachment 708291 [details]
Comment 4 Toralf Förster gentoo-dev 2021-05-14 07:17:35 UTC
Created attachment 708294 [details]
Comment 5 Toralf Förster gentoo-dev 2021-05-14 07:17:37 UTC
Created attachment 708297 [details]
Comment 6 Toralf Förster gentoo-dev 2021-05-14 07:17:38 UTC
Created attachment 708300 [details]
Comment 7 Toralf Förster gentoo-dev 2021-05-14 07:17:40 UTC
Created attachment 708303 [details]
Comment 8 Sam James archtester gentoo-dev Security 2021-05-14 07:52:41 UTC
Is this bundling crypto++?
Comment 9 Jesús P Rey (Chuso) 2021-07-04 20:23:45 UTC
It still compiles correctly for me with sys-devel/gcc:10. I think the issue is only triggered with sys-devel/gcc:11, which is still in ~arch.

There seems to be an upstream patch for it:

I'm currently merging sys-devel/gcc:11 to try to reproduce the issue and test the patch.

Answering Sam's question and looking at the comments inside, yes, this seems to be a modified copy of crypto++:

> // This file contains a subset of the Crypto++ library (version 5.2.1), with 
> // kind permission from Wei Dai. Please note that this file should not reflect 
> // on the real Crypto++ library in any way, as this file been greatly mangled to 
> // reduce the code-size, since this app only makes use of RSA classes (for Secure 
> // Identification) and the MD4 hashing class (for FileIDs).

I don't know how easy (if possible) unbundling it could be without modifying the code.

Looking at the Makefile, it seems this is used by DonkeySUI and could be avoided with --disable-donkeysui (with the obvious side effect of disabling SecureUserIdent for the eDonkey protocol).

I think the easiest and fastest solution is testing the upstream patch.
Comment 10 Jesús P Rey (Chuso) 2021-07-04 21:27:59 UTC
The upstream patch doesn't fix it for me. This will need more research.
Comment 11 Larry the Git Cow gentoo-dev 2021-07-16 01:34:54 UTC
The bug has been closed via the following commit(s):

commit 207859482e3cca4d24bbb1d96e7a0f3511725d38
Author:     Jesus P Rey (Chuso) <>
AuthorDate: 2021-07-15 18:56:30 +0000
Commit:     Sam James <>
CommitDate: 2021-07-16 01:33:18 +0000

    net-p2p/mldonkey: Patch for C++17 support.
    Signed-off-by: Jesus P Rey <>
    Signed-off-by: Sam James <>

 net-p2p/mldonkey/files/cpp17-byte-namespace.patch | 63 +++++++++++++++++++++++
 net-p2p/mldonkey/mldonkey-3.1.7-r2.ebuild         |  2 +
 2 files changed, 65 insertions(+)