Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 927332 - net-p2p/mldonkey-3.1.7-r4 fails to compile: CryptoPP.cc:9488:6: error: type of cc_lprintf_nl does not match original declaration [-Werror=lto-type-mismatch]
Summary: net-p2p/mldonkey-3.1.7-r4 fails to compile: CryptoPP.cc:9488:6: error: type o...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Jesús P Rey (Chuso)
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: bundled-libs lto
  Show dependency tree
 
Reported: 2024-03-20 08:48 UTC by Agostino Sarubbo
Modified: 2024-10-02 00:27 UTC (History)
4 users (show)

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


Attachments
build.log (build.log,227.76 KB, text/plain)
2024-03-20 08:48 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-03-20 08:48:16 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: net-p2p/mldonkey-3.1.7-r4 fails to compile.
Discovered on: amd64 (internal ref: lto_tinderbox)
System: LTO-SYSTEM (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#LTO)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0014
Comment 1 Agostino Sarubbo gentoo-dev 2024-03-20 08:48:18 UTC
Created attachment 887971 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2024-03-20 08:48:20 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


Error: Error during linking
src/utils/lib/CryptoPP.cc:9488:6: error: type of ‘cc_lprintf_nl’ does not match original declaration [-Werror=lto-type-mismatch[https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wlto-type-mismatch]]
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-20 16:23:41 UTC
Bundled crypto++?
Comment 4 Jesús P Rey (Chuso) 2024-04-17 21:12:31 UTC
(In reply to Sam James from comment #3)
> Bundled crypto++?

I'm afraid so. And a quite old one probably. And it's not the only bundled library.

This project has a lot of technical debt and the current maintainer seems to have lost interest in it.
We have four open bugs because of upstream issues related to deprecated code. Sometimes we even submitted patches to fix those issues, with no response.
Comment 5 Eli Schwartz gentoo-dev 2024-09-09 20:40:29 UTC
https://github.com/ygrek/mldonkey/commit/6b2cb580d9f5295397f9c5753c329289de590b81

https://github.com/ygrek/mldonkey/commit/e23eec2ff2164aaf07913d7eda10c453c050094d


The unthinkable happened -- upstream unbundled crypto++ :) :)

It's from 2 weeks ago. There's also a new release from *three* weeks ago that doesn't include this -- though it does include "Main change in this release is the support of newer OCaml versions".

It is possible we may have a resolution in sight for this.
Comment 6 Jesús P Rey (Chuso) 2024-09-29 21:43:01 UTC
Yes, this latest release at least includes the patch I submitted to address this ticket, so at least it should compile without additional patches from the ebuild.
I am testing it now.
Since upstream seems to be active again, I think we can wait for a new release that will include those commits to unbundle crypto++. Hopefully they were inactive for so long because they were working on bug 749609 which was a considerable amount of work and will be different from now on.
If upstream disappears again for a long time, maybe we can backport their commits to unbundle crypto++ in a new ebuild revision for the latest version.
Comment 7 Eli Schwartz gentoo-dev 2024-10-01 22:36:07 UTC
/usr/bin/ocamlopt.opt -inline 10 -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70   -linkall -o mlnet \
     bigarray.cmxa unix.cmxa str.cmxa -ccopt "-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wl,--defsym=__gentoo_check_ldflags__=0 " -cclib "-lz  " -cclib -lbz2 -ccopt "-pthread" -cclib "-lpthread" \
  \
  \
 -cc 'x86_64-pc-linux-gnu-g++ -pipe -march=native -fstack-protector-all -O2 -fdiagnostics-color=always -frecord-gcc-switches -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing  -Wformat -Werror=format-security' -ccopt '-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer' \
  \
  \
  \
-I build    build/extlib.cmxa    build/cdk.cmxa    build/bitstring.cmxa    build/magic.cmxa    build/common.cmxa    build/client.cmxa    build/core.cmxa    build/driver.cmxa    src/daemon/common/commonMain.cmx  
src/utils/lib/CryptoPP.cc:9488:6: error: type of ‘cc_lprintf_nl’ does not match original declaration [-Werror=lto-type-mismatch]
 9488 | void cc_lprintf_nl(const char * msg, bool verb);
      |      ^
src/utils/lib/CryptoPP_stubs.c:87:6: note: type mismatch in parameter 2
   87 | void cc_lprintf_nl(const char * msg, int verb)
      |      ^
src/utils/lib/CryptoPP_stubs.c:87:6: note: type ‘int’ should match type ‘bool’
src/utils/lib/CryptoPP_stubs.c:87:6: note: ‘cc_lprintf_nl’ was previously declared here
src/utils/lib/CryptoPP_stubs.c:87:6: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
lto1: some warnings being treated as errors
lto-wrapper: fatal error: x86_64-pc-linux-gnu-g++ returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking (exit code 1)
make: *** [Makefile:2737: mlnet] Error 2


The lto issue does not appear to be fixed yet, unfortunately.