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

Bug 929989

Summary: dev-lang/crystal-1.12.1 - ld.lld: error: undefined symbol: getcontext
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo musl team <musl>
Status: CONFIRMED ---    
Severity: normal CC: xgqt
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/40384
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
dev-lang:crystal-1.12.1:20240414-030219.log
emerge-history.txt
environment
etc.clang.tar.xz
etc.portage.tar.xz
qlist-info.txt.xz
temp.tar.xz

Description Toralf Förster gentoo-dev 2024-04-14 08:24:37 UTC
Semantic (new):                    00:00:00.006084492 ( 178.71MB)
Semantic (type declarations):      00:00:00.353157556 ( 178.71MB)
Semantic (abstract def check):     00:00:00.045466259 ( 194.71MB)
Semantic (restrictions augmenter): 00:00:00.040213655 ( 194.71MB)
Semantic (ivars initializers):     00:00:20.592113839 (1254.64MB)
Semantic (cvars initializers):     00:00:00.032911888 (1254.64MB)
ld.lld: error: undefined symbol: getcontext
>>> referenced by mach_dep.c
>>>               mach_dep.o:(GC_with_callee_saves_pushed) in archive /var/tmp/portage/dev-lang/crystal-1.12.1/work/crystal-1.12.1-1/bin/../lib/crystal/libgc.a

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 23.0_musl-20240410-202513

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

gcc-config -l:
 [1] x86_64-pc-linux-musl-13 *
clang/llvm (if any):
clang version 18.1.3
Target: x86_64-pc-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/18/bin
Configuration file: /etc/clang/x86_64-pc-linux-musl-clang.cfg
/usr/lib/llvm/18
18.1.3
Python 3.11.9
Available Rust versions:
  [1]   rust-bin-1.77.1 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 17.0.10_p7 [openjdk-bin-17]
*)	Eclipse Temurin JDK 21.0.2_p13 [openjdk-bin-21]
Available Java Virtual Machines:
  [1]   openjdk-bin-17 
  [2]   openjdk-bin-21  system-vm

php cli (if any):
  [1]   php8.1
  [2]   php8.3 *
go version go1.22.2 linux/amd64

  HEAD of ::gentoo
commit fd08e564a5bf4501176aa30ea485ff89385c4121
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sun Apr 14 02:49:02 2024 +0000

    2024-04-14 02:49:01 UTC

emerge -qpvO dev-lang/crystal
[ebuild  N    ] dev-lang/crystal-1.12.1  USE="-debug -doc -llvm-libunwind"
Comment 1 Toralf Förster gentoo-dev 2024-04-14 08:24:38 UTC
Created attachment 890761 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2024-04-14 08:24:38 UTC
Created attachment 890762 [details]
dev-lang:crystal-1.12.1:20240414-030219.log
Comment 3 Toralf Förster gentoo-dev 2024-04-14 08:24:40 UTC
Created attachment 890763 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2024-04-14 08:24:41 UTC
Created attachment 890764 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2024-04-14 08:24:42 UTC
Created attachment 890765 [details]
etc.clang.tar.xz
Comment 6 Toralf Förster gentoo-dev 2024-04-14 08:24:43 UTC
Created attachment 890766 [details]
etc.portage.tar.xz
Comment 7 Toralf Förster gentoo-dev 2024-04-14 08:24:44 UTC
Created attachment 890767 [details]
qlist-info.txt.xz
Comment 8 Toralf Förster gentoo-dev 2024-04-14 08:24:45 UTC
Created attachment 890768 [details]
temp.tar.xz
Comment 9 Larry the Git Cow gentoo-dev 2025-01-30 17:44:11 UTC
The bug has been referenced in the following commit(s):

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

commit b1589285ccdda25dd0a9b7c058484ca031e0c45f
Author:     Alfred Wingate <parona@protonmail.com>
AuthorDate: 2025-01-30 11:52:55 +0000
Commit:     Maciej Barć <xgqt@gentoo.org>
CommitDate: 2025-01-30 17:44:08 +0000

    dev-lang/crystal: do not link against prebuilt libgc
    
    https://github.com/crystal-lang/crystal/issues/12035#issuecomment-2522606612
    
    https://github.com/crystal-lang/distribution-scripts/tree/master/linux#linux-x86_64-static-build
    > The x86_64 crystal build is built inside an alpine linux container as a
    > statically linked binary using musl libc. libgc is built on debian to make
    > it work on glibc.
    
    Bug: https://bugs.gentoo.org/931100
    Bug: https://bugs.gentoo.org/929123
    Bug: https://bugs.gentoo.org/929989
    Signed-off-by: Alfred Wingate <parona@protonmail.com>
    Signed-off-by: Maciej Barć <xgqt@gentoo.org>

 .../crystal/{crystal-1.15.0.ebuild => crystal-1.15.0-r1.ebuild}  | 9 +++++++++
 1 file changed, 9 insertions(+)