Gauche Devlog

< Static linking and standalone executables | Plugged an annoying error behavior >

2018/04/08

Easier installation

Distributing a standalone binary executable is the easiest way to deliver Gauche applications to the users. However, what if you need your code to be built on the user's machine? Maybe your code is part of larger system and the client needs to build it on their site.

Once upon a time, delivering a source tarball and asking the user to run ./configure && make && make install wasn't a big deal. It was so much easier than before, when you had to read instructions cafefully and edit Makefiles according to your environment. However, the world has moved on.

So I wrote a small shell script get-gauche.

If you trust me enough, you can ask the user to do this:

    curl -s https://raw.githubusercontent.com/shirok/getgauche/master/get-gauche.sh | /bin/bash

It works as follows:

  • Ask the user where to install Gauche
  • Check if the latest version of Gauche is already installed; if so, do nothing.
  • Check if the user has write permission to the install destination; if not, ask the user if it's ok to use 'sudo' for installation.
  • Download the official tarball of the latest release, compile and run check, then install it.

You can also download the get-gauche script and run it. The script can accept a bunch of command-line options to customize the behavior. See https://github.com/shirok/get-gauche for the details.

One instance I used it was like this: I wanted to use Gauche for testing and various management work in the product. I included get-gauche.sh in the source tree, and in the Makefile I invoked it to install Gauche under the build tree.

Tags: get-gauche, Installation

Past comment(s)

Tsaifuan (2018/07/06 06:53:00):

I tried to install 0.9.6 by running get-gauche.sh on Xubuntu 18.04 and got following messages: Testing interactive ... *** ERROR: cannot find "rfc/zlib" in ("../test" "../lib" "../libsrc" "../src" "/usr/local/share/gauche-0.9/site/lib" "/usr/local/share/gauche-0.9/0.9.6/lib" "/usr/local/share/gauche/site/lib" "/usr/local/sha ...

    While compiling "../lib/text/info.scm" at line 34: (define-module text.info (use srfi-13) (use srfi-14) (use text.parse) (use gauche.process) (use file. ...
    While loading "../lib/text/info.scm" at line 45
    While compiling "../lib/gauche/interactive/info.scm" at line 34: (define-module gauche.interactive.info (use srfi-1) (use srfi-13) (use text.info) (use file.util) (us ...
    While loading "../lib/gauche/interactive/info.scm" at line 45
    While loading "../test/interactive.scm" at line 9

Stack Trace: _______________________________________

  0  (map (lambda (sym) (global-variable-ref module sym #f)) (hash ...
        at "../lib/gauche/test.scm":380
  1  (toplevel-closures mod)
        at "../lib/gauche/test.scm":330
  2  (for-each (lambda (closure) (for-each (lambda (arg) (let ((gr ...
        at "../lib/gauche/test.scm":314

Testing r7rs-tests ... passed. Total: 19471 tests, 19471 passed, 0 failed, 1 aborted. Makefile:463: recipe for target 'test-summary-check' failed make[1]: *** [test-summary-check] Error 1 Makefile:48: recipe for target 'check' failed make: *** [check] Error 2

shiro (2018/07/21 03:17:04):

For the reference to other readers, I answered it on reddit: https://www.reddit.com/r/scheme/comments/8vtjef/gauche_096_released/e215g1e/

This bug has been fixed on HEAD.

Post a comment

Name: