Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guile 3.0, again #27320

Closed
wants to merge 9 commits into from
Closed

Guile 3.0, again #27320

wants to merge 9 commits into from

Conversation

unspecd
Copy link
Contributor

@unspecd unspecd commented Dec 21, 2020

Testing the changes

  • I tested the changes in this PR: YES

New package

Local build testing

  • I built this PR locally for my native architecture, x86_64-musl
  • I built this PR locally for these architectures (if supported. mark crossbuilds):
    • ppc64le-musl

srcpkgs/gdb/template Outdated Show resolved Hide resolved
@unspecd unspecd marked this pull request as draft December 21, 2020 10:33
@unspecd unspecd force-pushed the pkg/guile3 branch 5 times, most recently from 3267948 to 1b62b9d Compare December 21, 2020 12:47
@q66
Copy link
Contributor

q66 commented Dec 21, 2020

do we actually need this for anything

@q66
Copy link
Contributor

q66 commented Dec 21, 2020

also i'm opposed to enabling guile by default in any system packages, it's of little to use to anybody and maintaining the guile toolchain is enough of a pain in the ass i don't want it anywhere near base system (keep it as non-default build options or whatever, but no default guile dependencies please)

Copy link
Member

@ericonr ericonr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we actually need this for anything

Less so now that we have guile 2.2. But there are probably 3.0 things out there.

srcpkgs/gdb/template Outdated Show resolved Hide resolved
srcpkgs/gnutls/template Outdated Show resolved Hide resolved
srcpkgs/xbindkeys/template Outdated Show resolved Hide resolved
srcpkgs/xbindkeys/template Outdated Show resolved Hide resolved
@unspecd unspecd force-pushed the pkg/guile3 branch 3 times, most recently from 4d99c15 to 1fd49d2 Compare December 22, 2020 05:14
@unspecd
Copy link
Contributor Author

unspecd commented Dec 22, 2020

Okay, it's a little better now, but not perfect: gnutls doesn't cross-compile. I'm working on it.

@sirikid
Copy link
Contributor

sirikid commented Dec 22, 2020

do we actually need this for anything

GNU Guix

srcpkgs/guile3/template Outdated Show resolved Hide resolved
@unspecd
Copy link
Contributor Author

unspecd commented Dec 22, 2020

GNU Guix

#22359 (comment)

srcpkgs/guile3/template Outdated Show resolved Hide resolved
srcpkgs/xbindkeys/template Outdated Show resolved Hide resolved
@sirikid
Copy link
Contributor

sirikid commented Dec 22, 2020

GNU Guix

#22359 (comment)

Long way to go, but we need Guile before Guix. Also, having Guix helps a lot in development.

@fosslinux
Copy link
Contributor

fosslinux commented Dec 22, 2020

Guix isn't in the repositories, I believe @q66 was talking about anything in the repositories that this is blocked on before an update or smth

w/r/t musl and guix, you'd need to source build packages as needed as was done in the link provided, as Guix has no musl support and hence no binaries.

@unspecd
Copy link
Contributor Author

unspecd commented Dec 22, 2020

gdb works fine.

$ gdb -ex='handle SIGSEGV noprint nostop' -ex='b scm_display' -ex=r -ex=bt --args guile3 -c '(display "hello\n")'

Without guile:

#0  scm_display (obj=0x7ffff77a1920, port=0x904) at print.c:1110
#1  0x00007ffff7ebb4b9 in vm_regular_engine (thread=0x7ffff7910d80) at vm-engine.c:972
#2  0x00007ffff7ebdd39 in scm_call_n (proc=<optimized out>, argv=argv@entry=0x7fffffffd668, nargs=nargs@entry=1) at vm.c:1608
#3  0x00007ffff7e37027 in scm_primitive_eval (exp=<optimized out>, exp@entry=0x7ffff73e9560) at eval.c:671
#4  0x00007ffff7e37086 in scm_eval (exp=0x7ffff73e9560, module_or_state=0x7ffff73e6f00) at eval.c:705
#5  0x00007ffff7ebb4b9 in vm_regular_engine (thread=0x7ffff7910d80) at vm-engine.c:972
#6  0x00007ffff7ebdd39 in scm_call_n (proc=<optimized out>, argv=argv@entry=0x7fffffffd848, nargs=nargs@entry=1) at vm.c:1608
#7  0x00007ffff7e37027 in scm_primitive_eval (exp=<optimized out>, exp@entry=0x7ffff73dd100) at eval.c:671
#8  0x00007ffff7e37086 in scm_eval (exp=0x7ffff73dd100, module_or_state=module_or_state@entry=0x7ffff73e6f00) at eval.c:705
#9  0x00007ffff7e920f6 in scm_shell (argc=3, argv=0x7fffffffde58) at script.c:357
#10 0x00007ffff7e4f55d in invoke_main_func (body_data=0x7fffffffdd90) at init.c:308
#11 0x00007ffff7e308ba in c_body (d=0x7fffffffdcd0) at continuations.c:430
#12 0x00007ffff7ebb4b9 in vm_regular_engine (thread=0x7ffff7910d80) at vm-engine.c:972
#13 0x00007ffff7ebdd39 in scm_call_n (proc=<optimized out>, argv=argv@entry=0x7fffffffda70, nargs=nargs@entry=2) at vm.c:1608
#14 0x00007ffff7e35cfa in scm_call_2 (proc=<optimized out>, arg1=<optimized out>, arg2=<optimized out>) at eval.c:503
#15 0x00007ffff7e376bc in scm_c_with_exception_handler (type=type@entry=0x404, handler=handler@entry=0x7ffff7eb2bc0 <catch_post_unwind_handler>, handler_data=handler_data@entry=0x7fffffffdbf0, 
    thunk=thunk@entry=0x7ffff7eb2d00 <catch_body>, thunk_data=thunk_data@entry=0x7fffffffdbf0) at exceptions.c:170
#16 0x00007ffff7eb2f0d in scm_c_catch (tag=tag@entry=0x404, body=body@entry=0x7ffff7e308b0 <c_body>, body_data=body_data@entry=0x7fffffffdcd0, handler=handler@entry=0x7ffff7e30b60 <c_handler>, 
    handler_data=handler_data@entry=0x7fffffffdcd0, pre_unwind_handler=pre_unwind_handler@entry=0x7ffff7e309b0 <pre_unwind_handler>, pre_unwind_handler_data=0x7ffff77be540) at throw.c:168
#17 0x00007ffff7e30e78 in scm_i_with_continuation_barrier (body=body@entry=0x7ffff7e308b0 <c_body>, body_data=body_data@entry=0x7fffffffdcd0, handler=handler@entry=0x7ffff7e30b60 <c_handler>, 
    handler_data=handler_data@entry=0x7fffffffdcd0, pre_unwind_handler=pre_unwind_handler@entry=0x7ffff7e309b0 <pre_unwind_handler>, pre_unwind_handler_data=0x7ffff77be540)
    at continuations.c:368

With guile:

#0  scm_display (obj="hello\n", port=#<undefined 904>) at print.c:1110
#1  0x00007ffff7ebb4b9 in vm_regular_engine (thread=0x7ffff7910d80) at vm-engine.c:972
#2  0x00007ffff7ebdd39 in scm_call_n (proc=<optimized out>, argv=argv@entry=0x7fffffffd668, nargs=nargs@entry=1) at vm.c:1608
#3  0x00007ffff7e37027 in scm_primitive_eval (exp=<optimized out>, exp@entry=(display "hello\n")) at eval.c:671
#4  0x00007ffff7e37086 in scm_eval (exp=(display "hello\n"), module_or_state="#<struct module>" = {...}) at eval.c:705
#5  0x00007ffff7ebb4b9 in vm_regular_engine (thread=0x7ffff7910d80) at vm-engine.c:972
#6  0x00007ffff7ebdd39 in scm_call_n (proc=<optimized out>, argv=argv@entry=0x7fffffffd848, nargs=nargs@entry=1) at vm.c:1608
#7  0x00007ffff7e37027 in scm_primitive_eval (exp=<optimized out>, exp@entry=((@ (ice-9 control) %) (begin ((@@ (ice-9 command-line) eval-string/lang) "(display \"hello\\n\")") (quit))))
    at eval.c:671
#8  0x00007ffff7e37086 in scm_eval (exp=((@ (ice-9 control) %) (begin ((@@ (ice-9 command-line) eval-string/lang) "(display \"hello\\n\")") (quit))), 
    module_or_state=module_or_state@entry="#<struct module>" = {...}) at eval.c:705
#9  0x00007ffff7e920f6 in scm_shell (argc=3, argv=0x7fffffffde58) at script.c:357
#10 0x00007ffff7e4f55d in invoke_main_func (body_data=0x7fffffffdd90) at init.c:308
#11 0x00007ffff7e308ba in c_body (d=0x7fffffffdcd0) at continuations.c:430
#12 0x00007ffff7ebb4b9 in vm_regular_engine (thread=0x7ffff7910d80) at vm-engine.c:972
#13 0x00007ffff7ebdd39 in scm_call_n (proc=<optimized out>, argv=argv@entry=0x7fffffffda70, nargs=nargs@entry=2) at vm.c:1608
#14 0x00007ffff7e35cfa in scm_call_2 (proc=<optimized out>, arg1=<optimized out>, arg2=<optimized out>) at eval.c:503
#15 0x00007ffff7e376bc in scm_c_with_exception_handler (type=type@entry=#t, handler=handler@entry=0x7ffff7eb2bc0 <catch_post_unwind_handler>, handler_data=handler_data@entry=0x7fffffffdbf0, 
    thunk=thunk@entry=0x7ffff7eb2d00 <catch_body>, thunk_data=thunk_data@entry=0x7fffffffdbf0) at exceptions.c:170
#16 0x00007ffff7eb2f0d in scm_c_catch (tag=tag@entry=#t, body=body@entry=0x7ffff7e308b0 <c_body>, body_data=body_data@entry=0x7fffffffdcd0, handler=handler@entry=0x7ffff7e30b60 <c_handler>, 
    handler_data=handler_data@entry=0x7fffffffdcd0, pre_unwind_handler=pre_unwind_handler@entry=0x7ffff7e309b0 <pre_unwind_handler>, pre_unwind_handler_data=0x7ffff77be540) at throw.c:168
#17 0x00007ffff7e30e78 in scm_i_with_continuation_barrier (body=body@entry=0x7ffff7e308b0 <c_body>, body_data=body_data@entry=0x7fffffffdcd0, handler=handler@entry=0x7ffff7e30b60 <c_handler>, 
    handler_data=handler_data@entry=0x7fffffffdcd0, pre_unwind_handler=pre_unwind_handler@entry=0x7ffff7e309b0 <pre_unwind_handler>, pre_unwind_handler_data=0x7ffff77be540)
    at continuations.c:368

@q66
Copy link
Contributor

q66 commented Dec 22, 2020

i don't really care it "works fine", I just don't want a guile dependency anywhere near base-* packages

@unspecd
Copy link
Contributor Author

unspecd commented Dec 22, 2020

I just don't want a guile dependency

Ok, what about python?

@q66
Copy link
Contributor

q66 commented Dec 22, 2020

python builds and works just fine on every known (and most unknown) target, guile is fragile, takes ages to bootstrap itself, and every version so far had an assortment of often arcane issues attached

@q66
Copy link
Contributor

q66 commented Dec 22, 2020

feel free to leave it as an option for those 2 people who are ever going to use it, but I don't want it burdening any of the base- packages, so no guile default options for things like gdb and make

@sirikid
Copy link
Contributor

sirikid commented Mar 14, 2021

@unspecd can I help you somehow with this?

@unspecd
Copy link
Contributor Author

unspecd commented Mar 15, 2021

can I help you somehow with this?

You could try to fix this :)

@sirikid
Copy link
Contributor

sirikid commented Mar 15, 2021

can I help you somehow with this?

You could try to fix this :)

don't expect much, but I will try

@unspecd
Copy link
Contributor Author

unspecd commented Mar 15, 2021

The bug is in the function scm_floor_divide in libguile/numbers.c:

void
scm_floor_divide (SCM x, SCM y, SCM *qp, SCM *rp)

On x86_64:

$ guile3
scheme@(guile-user)> (floor/ 130.0 10/7)
$1 = 91.0
$2 = 0.0

On i686:

$ guile3
scheme@(guile-user)> (floor/ 130.0 10/7)
$1 = 90.0
$2 = 1.4285714285714257

On i686, exact numbers:

$ guile3
scheme@(guile-user)> (floor/ 130 10/7)
$1 = 91
$2 = 0

-- good.

@unspecd
Copy link
Contributor Author

unspecd commented May 10, 2021

Updated to 3.0.7.

@unspecd
Copy link
Contributor Author

unspecd commented Jan 6, 2022

Updated guile-wisp.

@unspecd unspecd force-pushed the pkg/guile3 branch 2 times, most recently from e6fe6dd to deed655 Compare January 6, 2022 02:29
@github-actions
Copy link

github-actions bot commented Jun 3, 2022

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions github-actions bot added the Stale label Jun 3, 2022
@github-actions github-actions bot closed this Jun 17, 2022
@leahneukirchen
Copy link
Member

State of guile support, September 2022: https://bbs.archlinux.org/viewtopic.php?id=279907

@daviwil
Copy link

daviwil commented Apr 4, 2024

How far is this from being done? Are the maintainers interested in this work being completed? I'd love to have Guix package manager officially packaged on Void.

@leahneukirchen
Copy link
Member

leahneukirchen commented Apr 4, 2024

I'd like to have Guile 3 too; packaging it in itself isn't the problem, but making sure all dependencies work.

Apparently Lilypond still needs Guile 2.2, but we could at least drop 1.8 then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-package This PR adds a new package Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants