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
Created attachment 887971 [details] build.log build log and emerge --info
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]]
Bundled crypto++?
(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.
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.
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.
/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.