Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 744742 - dev-python/grpcio-1.32.0 : (.text+<snip>): undefined reference to OPENSSL_ia32cap_P
Summary: dev-python/grpcio-1.32.0 : (.text+<snip>): undefined reference to OPENSSL_ia3...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-26 07:01 UTC by Toralf Förster
Modified: 2020-10-09 21:42 UTC (History)
13 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,16.19 KB, text/plain)
2020-09-26 07:01 UTC, Toralf Förster
Details
dev-python:grpcio-1.32.0:20200926-001515.log (dev-python:grpcio-1.32.0:20200926-001515.log,570.69 KB, text/plain)
2020-09-26 07:01 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,205.94 KB, text/plain)
2020-09-26 07:01 UTC, Toralf Förster
Details
environment (environment,120.64 KB, text/plain)
2020-09-26 07:01 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,27.02 KB, application/x-bzip)
2020-09-26 07:01 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,50.54 KB, application/x-bzip)
2020-09-26 07:01 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-09-26 07:01:08 UTC
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: python_build/temp.linux-x86_64-3.7/third_party/boringssl-with-bazel/linux-x86_64/crypto/chacha/chacha-x86_64.o: in function `ChaCha20_ctr32':
(.text+0x20d): undefined reference to `OPENSSL_ia32cap_P'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: python_build/temp.linux-x86_64-3.7/third_party/boringssl-with-bazel/linux-x86_64/crypto/chacha/chacha-x86_64.o: relocation R_X86_64_PC32 against undefined hidden symbol `OPENSSL_ia32cap_P' can not be used when making a shared object
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_systemd-20200920-221938

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

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.3.1
 [2] x86_64-pc-linux-gnu-10.2.0 *
clang version 10.0.1 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/10/bin
/usr/lib/llvm/10
10.0.1
Available Python interpreters, in order of preference:
  [1]   python3.7
  [2]   python3.9 (fallback)
  [3]   python3.8 (fallback)
  [4]   python2.7 (fallback)
  [5]   pypy3 (fallback)
Available Ruby profiles:
  [1]   ruby25 (with Rubygems)
  [2]   ruby26 (with Rubygems)
  [3]   ruby27 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.46.0 *
The following VMs are available for generation-2:
*)	AdoptOpenJDK 8.265_p01 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8  system-vm

The Glorious Glasgow Haskell Compilation System, version 8.8.4

  timestamp(s) of HEAD at this tinderbox image:
/var/db/repos/gentoo	Sat Sep 26 12:06:35 AM UTC 2020

emerge -qpvO dev-python/grpcio
[ebuild     U ] dev-python/grpcio-1.32.0 [1.28.1] PYTHON_TARGETS="python3_7 -python3_6 -python3_8 -python3_9"
Comment 1 Toralf Förster gentoo-dev 2020-09-26 07:01:10 UTC
Created attachment 662503 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-09-26 07:01:12 UTC
Created attachment 662506 [details]
dev-python:grpcio-1.32.0:20200926-001515.log
Comment 3 Toralf Förster gentoo-dev 2020-09-26 07:01:14 UTC
Created attachment 662509 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2020-09-26 07:01:15 UTC
Created attachment 662512 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2020-09-26 07:01:17 UTC
Created attachment 662515 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-09-26 07:01:18 UTC
Created attachment 662518 [details]
temp.tbz2
Comment 7 Marcin 2020-10-09 20:29:33 UTC
Exact same error here. I removed 
export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=1
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
from grpcio-1.32.0.ebuild as I don't need it and now it works for me. It seems that code enabled by these two options is broken.
Comment 8 Marcin 2020-10-09 20:40:35 UTC
I'm not the expert here but it seems that there are two issues here. One related to this boringssl which is enabled by GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 and another one which appears with GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=1
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-10-09 20:46:42 UTC
@toralf, this one wasn't on a LibreSSL box, maybe a script error?
Comment 10 Georgy Yakovlev archtester gentoo-dev 2020-10-09 21:08:30 UTC
I see you guys use setuptools-4*

mjws@wp.pl, what's your setuptools version?
Comment 11 Marcin 2020-10-09 21:14:35 UTC
(In reply to Georgy Yakovlev from comment #10)
> I see you guys use setuptools-4*
> 
> mjws@wp.pl, what's your setuptools version?

dev-python/setuptools
      Latest version available: 50.3.0
      Latest version installed: 46.4.0-r3

Updating now. I'll try to check if it will change anything.
Comment 12 Marcin 2020-10-09 21:18:58 UTC
Updating dev-python/setuptools to 50.3.0 doesn't change anything here.
Comment 13 Georgy Yakovlev archtester gentoo-dev 2020-10-09 21:20:42 UTC
I don't see it building with bundled boringssl  on my system.

it builds with -I/usr/include/openssl and links with -lcrypto


the only boringssl string match is src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc

and it's just a filename.


from Toralf's log

dev-python/cython-0.29.21
dev-python/setuptools-46.4.0-r3

mine (works fine)
dev-python/cython-0.29.21
dev-python/setuptools-50.3.0
Comment 14 Georgy Yakovlev archtester gentoo-dev 2020-10-09 21:29:00 UTC
ok found it

GRPC_BUILD_WITH_BORING_SSL_ASM=True defined in setup.py, which overrides another knob.
Comment 15 Georgy Yakovlev archtester gentoo-dev 2020-10-09 21:42:06 UTC
workaround (run before build):

export GRPC_BUILD_WITH_BORING_SSL_ASM=

yes it has to be exported and empty.
it should build fine and will use system openssl.

thanks for catching. fix will land soon and workaround will not be needed.
Comment 16 Larry the Git Cow gentoo-dev 2020-10-09 21:42:17 UTC
The bug has been closed via the following commit(s):

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

commit b6b961028abd7f967a4b30cb8ef5e415e9ecfda4
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-10-09 21:40:06 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-10-09 21:41:01 +0000

    dev-python/grpcio: enforce system openssl for real in 1.32.0
    
    Closes: https://bugs.gentoo.org/744742
    Package-Manager: Portage-3.0.8, Repoman-3.0.1
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 dev-python/grpcio/{grpcio-1.32.0.ebuild => grpcio-1.32.0-r1.ebuild} | 2 ++
 1 file changed, 2 insertions(+)