chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Debian 9 amd64 chicken-bin 4.11.0-1 cannot import fr


From: Mario Domenech Goulart
Subject: Re: [Chicken-users] Debian 9 amd64 chicken-bin 4.11.0-1 cannot import from undefined module process-context
Date: Wed, 18 Sep 2019 07:57:39 +0200

On Wed, 18 Sep 2019 07:46:01 +0200 Mario Domenech Goulart <address@hidden> 
wrote:

>> 2019-09-17 22:06:21 root@tinkywinky ~
>> # cat /etc/debian_version
>> 9.11
>>
>> 2019-09-17 22:10:03 root@tinkywinky ~
>> # uname -a
>> Linux tinkywinky 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3 (2019-09-02)
>> x86_64 GNU/Linux
>>
>> 2019-09-17 22:15:35 root@tinkywinky ~
>> # dpkg-query -s chicken-bin
>> Package: chicken-bin
>> Status: install ok installed
>> Priority: optional
>> Section: lisp
>> Installed-Size: 5765
>> Maintainer: Davide Puricelli (evo) <address@hidden>
>> Architecture: amd64
>> Source: chicken
>> Version: 4.11.0-1
>> Replaces: chicken, chicken-dev
>> Depends: libc6 (>= 2.4), libchicken8 (>= 4.11.0), libchicken-dev (=
>> 4.11.0-1)
>> Conflicts: chicken, chicken-dev
>> Description: Practical and portable Scheme system - compiler
>>  CHICKEN is a Scheme compiler which compiles a subset of R5RS into C.
>>  It uses the ideas presented in Baker's paper "Cheney on the MTA", and
>>  has a small core and is easily extendable.
>>  .
>>  This package contains the compiler.
>> Homepage: http://www.call-cc.org
>>
>>
>> I am attempting to follow:
>>
>> http://wiki.call-cc.org/man/5/Getting%20started
>>
>>
>> I have created a Scheme program source file:
>>
>> 2019-09-17 22:07:12 dpchrist@tinkywinky ~/sandbox/chicken-scheme
>> $ cat palindrome.scm
>> ;;; http://wiki.call-cc.org/man/5/Getting%20started
>> ;;; downloaded 2019-09-17
>>
>> (import (chicken process-context)) ; for "command-line-arguments"
>>
>> (define (palindrome? x)
>>   (define (check left right)
>>     (if (>= left right)
>>         #t
>>         (and (char=? (string-ref x left) (string-ref x right))
>>              (check (add1 left) (sub1 right)))))
>>   (check 0 (sub1 (string-length x))))
>>
>> (let ((arg (car (command-line-arguments))))
>>   (display
>>    (string-append arg
>>                   (if (palindrome? arg)
>>                       " is a palindrome\n"
>>                       " isn't a palindrome\n"))))
>>
>>
>> When I try to compile:
>>
>> 2019-09-17 22:07:15 dpchrist@tinkywinky ~/sandbox/chicken-scheme
>> $ csc -o palindrome palindrome.scm
>>
>> Syntax error (import): cannot import from undefined module
>>
>>      process-context
>>
>>      Expansion history:
>>
>>      <syntax>          (##core#begin (import (chicken process-context)))
>>      <syntax>          (import (chicken process-context))    <--
>>
>> Error: shell command terminated with non-zero exit status 17920:
>> '/usr/bin/chicken' 'palindrome.scm' -output-file 'palindrome.c'
>>
>>
>> I appear to be missing the module "chicken process-context", which is
>> supposed to be included (?):
>>
>> http://wiki.call-cc.org/man/5/Included%20modules
>>
>>
>> Suggestions?
>
> The problem is that you are using CHICKEN 4 to compile code for CHICKEN
> 5.  There are some incompatibilities.  One of the is the import
> declarations for modules.
>
> Installing CHICKEN 5 from sources on Linux is not difficult and doesn't
> require much besied what is required to install eggs (the only extra
> requirement is GNU make).  In case you wnat to do that, here are the
> steps that should work on Debian:
>
>   $ wget http://code.call-cc.org/releases/5.1.0/chicken-5.1.0.tar.gz
>   $ tar xzvf chicken-5.1.0.tar.gz
>   $ cd chicken-5.1.0
>   $ make PLATFORM=linux PREFIX=$HOME/local/chicken-5.1.0 install
>
> That will install CHICKEN 5.1.0 under $HOME/local/chicken-5.1.0.
>
> To have the CHICKEN 5 tools in your environment's PATH, you can do
> something like
>
>   $ export PATH=$PATH:$HOME/local/chicken-5.1.0/bin
>
> assuming you are using Bash.

Actually,

  $ export PATH=$HOME/local/chicken-5.1.0/bin:$PATH

if you want the CHICKEN 5 tools to take precedence over the CHICKEN 4
tools from the Debian package.  Or you can simply remove the Debian
package.

> On the CHICKEN 4 -> CHICKEN 5 migration, you might find
> http://wiki.call-cc.org/porting-c4-to-c5 helpful.
>
> If you have questions, don't hesitate to ask them here or in the IRC
> channel (Freenode, #chicken).

All the best.
Mario
-- 
http://parenteses.org/mario



reply via email to

[Prev in Thread] Current Thread [Next in Thread]