Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 679834

Summary: sys-apps/nix-2.0.4 : /.../gc_cpp.h:545: undefined reference to GC_throw_bad_alloc()
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Sergei Trofimovich (RETIRED) <slyfox>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tbz2
logs.tbz2
sys-apps:nix-2.0.4:20190309-090031.log
temp.tbz2

Description Toralf Förster gentoo-dev 2019-03-09 10:21:39 UTC
src/libexpr/eval.o: In function `operator new(unsigned long, GCPlacement, void (*)(void*, void*), void*)':
/usr/include/gc/gc_cpp.h:545: undefined reference to `GC_throw_bad_alloc()'
collect2: error: ld returned 1 exit status
make: *** [mk/lib.mk:104: src/libexpr/libnixexpr.so] Error 1
 * ERROR: sys-apps/nix-2.0.4::gentoo failed (compile phase):

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1-no-multilib_20190303-111943

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

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.3.1
 [2] x86_64-pc-linux-gnu-8.3.0 *

Available Python interpreters, in order of preference:
  [1]   python3.7
  [2]   python3.6
  [3]   python2.7 (fallback)
  [4]   pypy3 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems)
  [3]   ruby26 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.32.0 *
  [2]   rust-bin-1.32.0



emerge -qpvO sys-apps/nix
[ebuild  N    ] sys-apps/nix-2.0.4  USE="gc -doc -etc_profile -s3 -sodium"
Comment 1 Toralf Förster gentoo-dev 2019-03-09 10:21:42 UTC
Created attachment 568272 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2019-03-09 10:21:44 UTC
Created attachment 568274 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2019-03-09 10:21:47 UTC
Created attachment 568276 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2019-03-09 10:21:50 UTC
Created attachment 568278 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2019-03-09 10:21:53 UTC
Created attachment 568280 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2019-03-09 10:21:56 UTC
Created attachment 568282 [details]
sys-apps:nix-2.0.4:20190309-090031.log
Comment 7 Toralf Förster gentoo-dev 2019-03-09 10:21:58 UTC
Created attachment 568284 [details]
temp.tbz2
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2019-03-09 10:24:08 UTC
Probably due to new dev-libs/boehm-gc-8.0.4 API change.
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2019-03-09 12:18:18 UTC
https://github.com/ivmai/bdwgc/commit/2ce94e20e884063240e70f21e706d73b8281f604 introduced a new libgccpp.so dependency on C++ programs.

Or not really new as it defines override allocators (it looks like C++ programs should already be linked to it).
Comment 10 Sergei Trofimovich (RETIRED) gentoo-dev 2019-03-09 12:50:41 UTC
Asked in https://github.com/ivmai/bdwgc/issues/268 as I'm not sure it's an intended change to require c++ allocator override explicitly.
Comment 11 Larry the Git Cow gentoo-dev 2019-03-09 21:05:43 UTC
The bug has been closed via the following commit(s):

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

commit 460014c2d82a53a5db86dd2376cbd7045227cc69
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-03-09 21:04:43 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-03-09 21:05:15 +0000

    sys-apps/nix: tweak for bdwgc-8, bug #679834
    
    Reported-by: Toralf Förster
    Closes: https://bugs.gentoo.org/679834
    Package-Manager: Portage-2.3.62, Repoman-2.3.12
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-apps/nix/files/nix-2.0.4-bdwgc-8.patch | 12 ++++++++++++
 sys-apps/nix/nix-2.0.4.ebuild              |  3 ++-
 2 files changed, 14 insertions(+), 1 deletion(-)
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2019-03-09 21:09:14 UTC
Added simple workaround. Upstream fixed in a slightly different way: https://github.com/NixOS/nix/commit/c905d8b0a84877d3cab10d4a8b8ad81895a6500e