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

Bug 712626

Summary: dev-lisp/sbcl-2.0.1: fails to compile on musl (/.../run-sbcl.sh:line <snip>: /.../sbcl: No such file or directory)
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo musl team <musl>
Status: RESOLVED WONTFIX    
Severity: normal CC: ago, common-lisp, lillyjsm
Priority: Normal Keywords: PATCH, PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=837746
https://github.com/gentoo/gentoo/pull/28507
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: emerge-info.txt
dev-lisp:sbcl-2.0.1:20200315-002752.log
emerge-history.txt
environment
etc.portage.tbz2
temp.tbz2
sbcl-musl-fix

Description Toralf Förster gentoo-dev 2020-03-15 09:26:58 UTC
+ echo (lisp-implementation-type)
+ sh /var/tmp/portage/dev-lisp/sbcl-2.0.1/work/sbcl-binary/run-sbcl.sh --no-sysinit --no-userinit --disable-debugger
/var/tmp/portage/dev-lisp/sbcl-2.0.1/work/sbcl-binary/run-sbcl.sh: line 57: /var/tmp/portage/dev-lisp/sbcl-2.0.1/work/sbcl-binary/src/runtime/sbcl: No such file or directory
+ echo No working host Common Lisp implementation.
No working host Common Lisp implementation.
+ echo See ./INSTALL, the SOURCE DISTRIBUTION section

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl-20200311-204810

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

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-9.2.0 *
 [2] x86_64-gentoo-linux-musl-9.3.0
clang version 10.0.0 
Target: x86_64-gentoo-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/10/bin
/usr/lib/llvm/10
10.0.0
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.7
  [3]   python3.6
  [4]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.41.1
  [2]   rust-1.41.1 *
The following VMs are available for generation-2:

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Sat, 14 Mar 2020 23:50:12 +0000
emerge -qpvO dev-lisp/sbcl
[ebuild  N    ] dev-lisp/sbcl-2.0.1  USE="unicode zlib -debug -doc -pax_kernel -source -threads"
Comment 1 Toralf Förster gentoo-dev 2020-03-15 09:27:01 UTC
Created attachment 619374 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-03-15 09:27:04 UTC
Created attachment 619376 [details]
dev-lisp:sbcl-2.0.1:20200315-002752.log
Comment 3 Toralf Förster gentoo-dev 2020-03-15 09:27:07 UTC
Created attachment 619378 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2020-03-15 09:27:09 UTC
Created attachment 619380 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2020-03-15 09:27:12 UTC
Created attachment 619382 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-03-15 09:27:15 UTC
Created attachment 619384 [details]
temp.tbz2
Comment 7 Toralf Förster gentoo-dev 2020-03-16 16:12:21 UTC
The first attempt to tinderbox a musl image failed at all.

I'll mass close therefore all filed bug reports of the last days related to this tinderbox image.

Please feel free to re-open if you think that the bug is real in musl and not fixed by the musl overlay.
Comment 8 Jake Lilly 2021-04-11 00:39:30 UTC
I ran into this recently, and I noticed the binary used in the compile phase complains of a missing fcntl64 symbol when using musl. I was able to work around this in my own overlay by using ecl to compile sbcl, instead of the binary. I'm not all that familiar with lisp, so not sure if its the best way or not. I will add an attachment to show the diff in the ebuild I used.

ldd /var/tmp/portage/dev-lisp/sbcl-2.0.10/work/sbcl-binary/src/runtime/sbcl:
	/lib64/ld-linux-x86-64.so.2 (0x7f04280fa000)
 	libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7f04280fa000)
	libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f04280fa000)
	libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f04280fa000)
	libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f04280fa000)
Error relocating src/runtime/sbcl: fcntl64: symbol not found
Comment 9 Jake Lilly 2021-04-11 00:42:45 UTC
Created attachment 699102 [details, diff]
sbcl-musl-fix
Comment 10 Toralf Förster gentoo-dev 2021-12-14 10:11:42 UTC
*** Bug 828937 has been marked as a duplicate of this bug. ***
Comment 11 Andrey Grozin gentoo-dev 2022-12-01 09:36:31 UTC
The upstream does not support musl. As a workaround, one may try to use clisp or ecl as a bootstrap lisp. But I don't think it's a Gentoo's job to automate this workaround.
Comment 12 Ulrich Müller gentoo-dev 2022-12-01 10:13:54 UTC
Maybe package.mask sbcl in the musl profile?
Comment 13 Andrey Grozin gentoo-dev 2022-12-01 13:39:14 UTC
(In reply to Ulrich Müller from comment #12)
> Maybe package.mask sbcl in the musl profile?
Yes, I think it's the right solution.
Comment 14 Petr Vaněk gentoo-dev 2022-12-02 07:58:28 UTC
(In reply to Andrey Grozin from comment #11)
> The upstream does not support musl.

Is there any link to upstream which acknowledges it? Cross-reference would be beneficial for anyone who would like to dig into it.
Comment 15 Andrey Grozin gentoo-dev 2022-12-02 08:14:08 UTC
(In reply to Petr Vaněk from comment #14)
> Is there any link to upstream which acknowledges it? Cross-reference would
> be beneficial for anyone who would like to dig into it.

https://www.sbcl.org/platform-table.html:

The Linux binaries might require a recent glibc, but building from source isn't dependent on a particular glibc version
Comment 16 Larry the Git Cow gentoo-dev 2022-12-03 08:10:58 UTC
The bug has been referenced in the following commit(s):

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

commit 07b85f868ada94c2372c646c69f8cc257287dda7
Author:     Petr Vaněk <arkamar@atlas.cz>
AuthorDate: 2022-12-02 07:42:53 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-03 08:05:25 +0000

    profiles/features/musl: reference dev-lisp/sbcl bug
    
    Cross-reference the dev-lisb/sbcl mask with bug in b.g.o.
    
    Bug: https://bugs.gentoo.org/712626
    Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
    Closes: https://github.com/gentoo/gentoo/pull/28507
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/features/musl/package.mask | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 17 Andrey Grozin gentoo-dev 2022-12-03 09:28:50 UTC
*** Bug 830435 has been marked as a duplicate of this bug. ***