Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 733080 - net-libs/quiche: keyword ~ppc64
Summary: net-libs/quiche: keyword ~ppc64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Keywording (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Craig Andrews
URL:
Whiteboard:
Keywords: KEYWORDREQ
Depends on:
Blocks:
 
Reported: 2020-07-17 14:18 UTC by Craig Andrews
Modified: 2023-12-20 02:35 UTC (History)
2 users (show)

See Also:
Package list:
net-libs/quiche-0.20.0 ~ppc64
Runtime testing required: ---
nattka: sanity-check+


Attachments
build.log (file_733080.txt,87.37 KB, text/plain)
2023-12-12 15:38 UTC, matoro
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Andrews gentoo-dev 2020-07-17 14:18:23 UTC
Please add keywords
~ppc64
to net-libs/quiche-0.5.1

Upstream has added support for this platforms, so this should work. See also https://bugs.gentoo.org/694320#c9


Reproducible: Always
Comment 1 Georgy Yakovlev archtester gentoo-dev 2020-07-17 18:37:41 UTC
[dependencies.ring]
version = "0.16"

from ebuild CRATES:
ring-0.16.15


so it should work, kinda.

but it does not

     Running `/var/tmp/portage/net-libs/quiche-0.5.1/work/quiche-0.5.1-.ppc64/target/release/build/ring-2e4a8052b0f2a89d/build-script-build`
error: failed to run custom build command for `ring v0.16.15`

Caused by:
  process didn't exit successfully: `/var/tmp/portage/net-libs/quiche-0.5.1/work/quiche-0.5.1-.ppc64/target/release/build/ring-2e4a8052b0f2a89d/build-script-build` (exit code: 101)



I'll see what's going on.
Comment 2 Georgy Yakovlev archtester gentoo-dev 2020-07-17 18:40:41 UTC
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /var/tmp/portage/net-libs/quiche-0.5.1/work/cargo_home/gentoo/ring-0.16.15/build.rs:372:34
stack backtrace:
   0:        0x13f5cffd4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb4c0aa2d76bc0733
   1:        0x13f5fd944 - core::fmt::write::h6c56c879341d037d   
   2:        0x13f5b885c - std::io::Write::write_fmt::h31e446be4a763743                     
   3:        0x13f5bf9d4 - std::panicking::default_hook::{{closure}}::h1d3d70471fcc8d4b
   4:        0x13f5bf5e4 - std::panicking::default_hook::hc749b76ea669047d
   5:        0x13f5c02c8 - std::panicking::rust_panic_with_hook::h83b116e99537c45a
   6:        0x13f5bfd38 - rust_begin_unwind
   7:        0x13f5fd40c - core::panicking::panic_fmt::h8dca2a8f2e067276
   8:        0x13f5fd320 - core::panicking::panic::h5010b8a8a9fcde9e
   9:        0x13f58dbc0 - core::option::Option<T>::unwrap::hdb06c7414f491c44
                               at /usr/lib/rustlib/src/rust/src/libcore/macros/mod.rs:10
  10:        0x13f58dbc0 - build_script_build::build_c_code::h83b05d00c4fcd5f9
                               at /var/tmp/portage/net-libs/quiche-0.5.1/work/cargo_home/gentoo/ring-0.16.15/build.rs:372
  11:        0x13f58dbc0 - build_script_build::ring_build_rs_main::h2775bb3be4ad33d1
                               at /var/tmp/portage/net-libs/quiche-0.5.1/work/cargo_home/gentoo/ring-0.16.15/build.rs:298
  12:        0x13f58dbc0 - build_script_build::main::h20765405af98e155
                               at /var/tmp/portage/net-libs/quiche-0.5.1/work/cargo_home/gentoo/ring-0.16.15/build.rs:255
  13:        0x13f590fc4 - std::rt::lang_start::{{closure}}::h65c3a30ec9d7499d
                               at /usr/lib/rustlib/src/rust/src/libstd/rt.rs:67
  14:        0x13f5d0314 - std::sys_common::backtrace::__rust_begin_short_backtrace::h7d6325ea8901b816
  15:        0x13f5bd2e0 - std::rt::lang_start_internal::h8dc2eea8f02e6df8
  16:        0x13f590a50 - main
  17:     0x7fffba67404c - generic_start_main
                               at ../csu/libc-start.c:308
  18:     0x7fffba674224 - __libc_start_main
                               at ../sysdeps/unix/sysv/linux/powerpc/libc-start.c:98
  19:                0x0 - <unknown>
Comment 3 Georgy Yakovlev archtester gentoo-dev 2020-07-17 19:04:06 UTC
still fails for some reason.
I'll poke it, it may need some extra knobs.
Comment 4 Craig Andrews gentoo-dev 2020-10-26 14:32:55 UTC
(In reply to Georgy Yakovlev from comment #3)
> still fails for some reason.
> I'll poke it, it may need some extra knobs.

quiche 0.6.0 was released and is now in Gentoo - could you please revisit this issue in light of the new version?
Comment 5 Georgy Yakovlev archtester gentoo-dev 2020-10-27 17:54:18 UTC
checked. still the same.

looks like, ring added some support, but not enough.
Comment 6 Georgy Yakovlev archtester gentoo-dev 2021-03-24 01:32:10 UTC
still monitoring upstream, as it blocks other projects as well, like sccache.

recent updates are 8 hrs ago and it's close to working, so there's hope.

https://github.com/briansmith/ring/issues/389#issuecomment-805078683
Comment 7 Georgy Yakovlev archtester gentoo-dev 2021-07-23 02:26:30 UTC
diff --git a/include/ring-core/base.h b/include/ring-core/base.h
index f1a027d..91dbb7c 100644
--- a/include/ring-core/base.h
+++ b/include/ring-core/base.h
@@ -89,6 +89,9 @@
 #elif defined(__MIPSEL__) && defined(__LP64__)
 #define OPENSSL_64_BIT
 #define OPENSSL_MIPS64
+#elif defined(__powerpc64__)
+#define OPENSSL_64_BIT
+#define OPENSSL_PPC64LE
 #elif defined(__wasm__)
 #define OPENSSL_32_BIT
 #else

seems to be enough to make master (1bf024dacfeb38eef7400b7880f46af5620cab42) to build on ppc64le

but tests fail with some linking errors, not related to crypto. maybe need more changes in scripts.

I'll try to test it a bit.
Comment 8 NATTkA bot gentoo-dev 2021-12-24 18:36:59 UTC Comment hidden (obsolete)
Comment 9 NATTkA bot gentoo-dev 2022-06-02 23:08:34 UTC
All sanity-check issues have been resolved
Comment 10 matoro archtester 2023-11-30 18:30:26 UTC
Ring upstream has shut down ppc64 support, which is now happening IBM's fork.  IMO you can petition upstream to use said fork but that's not really a Gentoo problem, so I think this should be closed.
Comment 11 matoro archtester 2023-12-05 16:14:15 UTC
Closing this, reopen at such time ring decides to play nice with ppc64.
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-05 16:19:37 UTC
wait, what? When did that happen? The ring upstream guy ended up merging ppc64 support a few months back unless something changed since?
Comment 13 matoro archtester 2023-12-05 16:25:19 UTC
(In reply to Sam James from comment #12)
> wait, what? When did that happen? The ring upstream guy ended up merging
> ppc64 support a few months back unless something changed since?

build.rs still bails out in the exact same way the comment above mentioned, checked upstream and we are still not listed as an option:  https://github.com/briansmith/ring/blob/main/build.rs#L162-L226
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-05 16:32:36 UTC
https://github.com/briansmith/ring/issues/1555#issuecomment-1742336509

so is it incomplete or what? Or some other method of building exists?
Comment 15 matoro archtester 2023-12-05 16:37:59 UTC
(In reply to Sam James from comment #14)
> https://github.com/briansmith/ring/issues/1555#issuecomment-1742336509
> 
> so is it incomplete or what? Or some other method of building exists?

Okay, I see what's going on.  quiche master is pulling ring-0.16.0 (which is not tagged in GH, so I don't know the exact commit, but has a publish date in 2019) which would be well before any of this stuff is supported.

I don't think we have a precedent for bumping rust dep versions, so the point should still stand, but with the reasoning:  call us when quiche updates their ring dep.
Comment 16 Craig Andrews gentoo-dev 2023-12-06 17:03:12 UTC
quiche updated ring to 0.17: https://github.com/cloudflare/quiche/commit/7815bce43428647082e4ad074665e3b1c4e232a0

The next version of quiche should be ppc64 compatible
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-06 17:11:41 UTC
thanks Craig and thanks matoro!
Comment 18 Craig Andrews gentoo-dev 2023-12-12 14:09:54 UTC
quiche 0.20.0 was released, I added it to gentoo with cfd7132cbe0b95c5e04effb9b76e807fda2fbc0b

That version should be keywordable ~ppc64

Thanks!
Comment 19 matoro archtester 2023-12-12 15:38:07 UTC
Created attachment 878831 [details]
build.log

Blows up on boringssl build now?
Comment 20 matoro archtester 2023-12-12 15:49:33 UTC
Oh, OK, cool:

// Note BoringSSL only supports standard 32-bit and 64-bit two's-complement,
// little-endian architectures. Functions will not produce the correct answer
// on other systems. Run the crypto_test binary, notably
// crypto/compiler_test.cc, before adding a new architecture.
#error "Unknown target CPU"

So this needs a mask in profiles/features/big-endian.

But!!!  See https://github.com/google/boringssl/commit/7d2338d000eb1468a5bbf78e91854236e18fb9e4

ppc64le was removed this year...so this will blow up again once quiche updates boringssl module.
Comment 21 Larry the Git Cow gentoo-dev 2023-12-19 05:19:55 UTC
The bug has been referenced in the following commit(s):

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

commit a57716fffbc2186e23b45b0babdbf963bf72e814
Author:     Matoro Mahri <matoro_gentoo@matoro.tk>
AuthorDate: 2023-12-19 02:03:06 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-19 05:17:37 +0000

    profiles/features/big-endian: mask net-libs/quiche
    
    Bug: https://bugs.gentoo.org/733080
    Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/features/big-endian/package.mask | 4 ++++
 1 file changed, 4 insertions(+)
Comment 22 matoro archtester 2023-12-20 02:35:50 UTC
ppc64 done

all arches done