mighty-gerbils / gerbil

Gerbil Scheme
https://cons.io
GNU Lesser General Public License v2.1
1.15k stars 111 forks source link

Errors installing `gerbil-libyaml` #1089

Closed acturner closed 9 months ago

acturner commented 9 months ago

I am running macOS Sonoma 14.2

> uname -a
Darwin ip-10-0-0-50.ec2.internal 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:59:33 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8112 arm64

and I get the following errors when trying to install gerbil-libyaml:

> gerbil pkg install github.com/mighty-gerbils/gerbil-libyaml
... cloning github.com/mighty-gerbils/gerbil-libyaml
... pulling
... build github.com/mighty-gerbils/gerbil-libyaml
... compile foreign text/libyaml
GPL Ghostscript 10.02.1 (2023-11-01)
Copyright (C) 2023 Artifex Software, Inc.  All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
Unknown switch -ld-options - ignoring
Unknown switch -lyaml - ignoring
Error: /undefined in ;;;
Operand stack:
Execution stack:   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1944   1   3   %oparray_pop   1943   1   3   %oparray_pop   1928   1   3   %oparray_pop   1801   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:   --dict:740/1123(ro)(G)--   --dict:0/20(G)--   --dict:85/200(L)--
Current allocation mode is local
Current file position is 4
GPL Ghostscript 10.02.1: Unrecoverable error, exit code 1
*** ERROR IN std/misc/concurrent-plan#perform-plan/threads__% -- Build Failure at (ssi text/libyaml (gsc text/libyaml -cc-options  -ld-options -lyaml))

*** ERROR IN ? [Error]: Compilation error; gsc exited with nonzero status
--- irritants: 256 
--- continuation backtrace:
[0] error                                                                              
[1] std/make#gsc-compile                                                                                                                                                       (error '"Compilation error; gsc exited with nonzero status" _status101079_)
[2] std/make#build                                                                                                                                                             (std/make#build _g101451101453_ _settings101226_)
[3] std/make#build                                                                                                                                                             (for-each __tmp29519 _submodules101449_)
[4] std/make#%make                                                                                                                                                             (std/make#build __tmp29451 _settings102115_)
[5] std/misc/concurrent-plan#perform-plan/threads__%                                                                                                                           (_perform100397_ _item100603_)
[6] std/misc/concurrent-plan#perform-plan/threads__%                                                                                                                           (_fg-perform100511_ __tmp25844)
[7] std/make#%make                                                                                                                                                             (std/misc/concurrent-plan#perform-plan/threads__% '#f _perform102196_ __tmp29...
*** ERROR IN std/misc/process#run-process__% -- 
*** ERROR IN "misc/process.ss"@28.35-28.46 [ProcessError]: process exited with non-zero status
--- irritants: "/Users/acturner/.gerbil/pkg/github.com/mighty-gerbils/gerbil-libyaml/build.ss" 17920 (path: "/Users/acturner/.gerbil/pkg/github.com/mighty-gerbils/gerbil-libyaml/build.ss" arguments: ("compile") environment: #f directory: "/Users/acturner/.gerbil/pkg/github.com/mighty-gerbils/gerbil-libyaml" stdin-redirection: #t stdout-redirection: #f stderr-redirection: #f pseudo-terminal: #f show-console: #f) 
--- continuation backtrace:
[0] raise                                                                              
[1] std/misc/process#run-process__%                                                                                                                                            ((if (let () (declare (not safe)) (procedure? _check-status568387_)) _check-s...
[2] gerbil/tools/gxpkg#pkg-build__%                                                    
[3] gerbil/tools/gxpkg#install-pkgs                                                    
[4] gerbil/tools/gxpkg#install-pkgs
fare commented 9 months ago

Ahem. You might need to brew install libyaml or something like that. Or did you do that and it still fails?

Maybe we could teach gxpkg about such external dependencies after it autodetects the surrounding operating system and/or distribution, but that would be quite some work.

fare commented 9 months ago

Also, your gsc is pointing to GhostScript instead of the Gambit Scheme Compiler. Try to adjust your PATH and/or export GERBIL_GSC=.../path/bin/gsc

fare commented 9 months ago

I thought we detected the GhostScript thing—maybe not well enough.

vyzo commented 9 months ago

It jas beem fixed in master, make's gsc was poi ting to the PATH one.

acturner commented 9 months ago

Also, your gsc is pointing to GhostScript instead of the Gambit Scheme Compiler. Try to adjust your PATH and/or export GERBIL_GSC=.../path/bin/gsc

Should I still do this or does the implemented fix make this unnecessary?

acturner commented 9 months ago

Nevermind, it looks like I accidentally got rid of where I was modifying PATH in my zshrc (as per the docs) - I assume that's all I need to do.

vyzo commented 9 months ago

the implemented fix in mastet should be sufficient, can you rebuild and try again?