Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 794022 - net-news/newsboat-2.21 calls 'cc' instead of ${CHOST}-gcc, fails on sys-devel/gcc-config[-native-symlinks]
Summary: net-news/newsboat-2.21 calls 'cc' instead of ${CHOST}-gcc, fails on sys-devel...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Cédric Krier
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2021-06-03 09:20 UTC by Sergei Trofimovich (RETIRED)
Modified: 2021-09-05 12:31 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2021-06-03 09:20:12 UTC
Noticed the build failure on sys-devel/gcc-config[-native-symlinks] system:

error: failed to run custom build command for `openssl-sys v0.9.58`

Caused by:
  process didn't exit successfully: `/tmp/portage-tmpdir/portage/net-news/newsboat-2.21/work/newsboat-2.21/target/release/build/openssl-sys-8aa34109b769eb5f/build-script-main` (exit code: 101)
  --- stdout
  cargo:rustc-cfg=const_fn
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
  OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
  OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_DIR
  OPENSSL_DIR unset
  cargo:rustc-link-lib=ssl
  cargo:rustc-link-lib=crypto
  OPT_LEVEL = Some("3")
  TARGET = Some("x86_64-unknown-linux-gnu")
  HOST = Some("x86_64-unknown-linux-gnu")
  CC_x86_64-unknown-linux-gnu = None
  CC_x86_64_unknown_linux_gnu = None
  HOST_CC = None
  CC = None
  CFLAGS_x86_64-unknown-linux-gnu = None
  CFLAGS_x86_64_unknown_linux_gnu = None
  HOST_CFLAGS = None
  CFLAGS = Some("-march=znver3 -mshstk -O2 -pipe -fdiagnostics-show-option -frecord-gcc-switches -Wall -Wextra -Wstack-protector     -frecord-gcc-switches")
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-march=znver3" "-mshstk" "-O2" "-pipe" "-fdiagnostics-show-option" "-frecord-gcc-switches" "-Wall" "-Wextra" "-Wstack-protector" "-frecord-gcc-switches" "-I" "/usr/include" "-E" "build/expando.c"

  --- stderr
  thread 'main' panicked at '
  Header expansion error:
  Error { kind: ToolNotFound, message: "Failed to find tool. Is `cc` installed?" }

  Failed to find OpenSSL development headers.

  You can try fixing this setting the `OPENSSL_DIR` environment variable
  pointing to your OpenSSL installation or installing OpenSSL headers package
  specific to your distribution:

      # On Ubuntu
      sudo apt-get install libssl-dev
      # On Arch Linux
      sudo pacman -S openssl
      # On Fedora
      sudo dnf install openssl-devel

  See rust-openssl README for more information:

      https://github.com/sfackler/rust-openssl#linux
  ', /tmp/portage-tmpdir/portage/net-news/newsboat-2.21/work/cargo_home/gentoo/openssl-sys-0.9.58/build/main.rs:140:13
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
make: *** [Makefile:108: target/release/libnewsboat.a] Error 101
 * ERROR: net-news/newsboat-2.21::gentoo failed (compile phase):
 *   emake failed


The following seems to be enough to fix build:

--- a/net-news/newsboat/newsboat-2.21.ebuild
+++ b/net-news/newsboat/newsboat-2.21.ebuild
@@ -128,12 +128,12 @@ src_configure() {

 src_compile() {
        export CARGO_HOME="${ECARGO_HOME}"
-       emake prefix="/usr" CXX="$(tc-getCXX)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
+       emake prefix="/usr" CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
 }

 src_test() {
        # tests require UTF-8 locale
-       emake CXX="$(tc-getCXX)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" test
+       emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" test
        # Tests fail if in ${S} rather than in ${S}/test
        cd "${S}"/test || die
        ./test || die
Comment 1 Larry the Git Cow gentoo-dev 2021-09-05 12:31:57 UTC
The bug has been closed via the following commit(s):

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

commit c90e86b7b9e233afc6a93af5c3ab24c626d5c45c
Author:     Cédric Krier <cedk@gentoo.org>
AuthorDate: 2021-09-05 12:18:56 +0000
Commit:     Cédric Krier <cedk@gentoo.org>
CommitDate: 2021-09-05 12:30:17 +0000

    net-news/newsboat: set CC when calling emake
    
    Closes: https://bugs.gentoo.org/794022
    Package-Manager: Portage-3.0.20, Repoman-3.0.3
    Signed-off-by: Cédric Krier <cedk@gentoo.org>

 net-news/newsboat/newsboat-2.21-r1.ebuild | 4 ++--
 net-news/newsboat/newsboat-2.23-r1.ebuild | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)