Sod Almighty
Sod Almighty

Reputation: 1786

Problems compiling Chicken Scheme egg "lookup-table"

I'm trying to statically compile and link a Chicken Scheme program, and this one egg is giving me some trouble. I get the same error, but with more information, when I try it at the repl; so here goes:

> chicken-install >/dev/null -retrieve lookup-table
> csi ./lookup-table/lookup-table.scm -I ./lookup-table

CHICKEN
(c) 2008-2014, The Chicken Team
(c) 2000-2007, Felix L. Winkelmann
Version 4.9.0.1 (stability/4.9.0) (rev 8b3189b)
linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ]
bootstrapped 2014-06-07

; loading /tmp/tempfabd.10142/lookup-table/lookup-table.scm ...
; loading /var/lib//chicken/7/chicken.import.so ...
; including /tmp/tempfabd.10142/lookup-table/lookup-table-body.scm ...
; loading /var/lib//chicken/7/srfi-1.import.so ...
; loading /var/lib//chicken/7/srfi-69.import.so ...
; loading /var/lib//chicken/7/ports.import.so ...
; loading /var/lib//chicken/7/data-structures.import.so ...
; loading /var/lib//chicken/7/extras.import.so ...
; loading /var/lib//chicken/7/miscmacros.import.so ...
; loading /var/lib//chicken/7/type-checks.import.so ...
; loading /var/lib//chicken/7/type-errors.import.so ...
; loading /var/lib//chicken/7/foreign.import.so ...
; loading /var/lib//chicken/7/record-variants.import.so ...
; loading /var/lib//chicken/7/miscmacros.so ...
; loading /var/lib//chicken/7/record-variants.so ...

Warning: reference to possibly unbound identifier `MAGIC-LIMIT' in:
Warning:    magic-count?

Error: module unresolved: lookup-table

           Call history:

           <syntax>             [dict-print] (##core#let ((port (optional732 tmp735 #f))) (if (not port) (*dict-print dict) (with-output-to-port ......
           <syntax>             [dict-print] (##core#begin (##core#if (not port) (*dict-print dict) (with-output-to-port port (lambda () (*dict-p......
           <syntax>             [dict-print] (##core#if (not port) (*dict-print dict) (with-output-to-port port (lambda () (*dict-print dict))))
           <syntax>             [dict-print] (not port)
           <syntax>             [dict-print] (*dict-print dict)
           <syntax>             [dict-print] (with-output-to-port port (lambda () (*dict-print dict)))
           <syntax>             [dict-print] (lambda () (*dict-print dict))
           <syntax>             [dict-print] (##core#lambda () (*dict-print dict))
           <syntax>             [dict-print] (##core#begin (*dict-print dict))
           <syntax>             [dict-print] (*dict-print dict)
           <syntax>             [dict-print] (optional732 tmp735 #f)
           <syntax>             [dict-print] (##core#let ((tmp739 tmp735)) (##core#if (null?740 tmp739) #f (car741 tmp739)))
           <syntax>             [dict-print] (##core#begin (##core#if (null?740 tmp739) #f (car741 tmp739)))
           <syntax>             [dict-print] (##core#if (null?740 tmp739) #f (car741 tmp739))
           <syntax>             [dict-print] (null?740 tmp739)
           <syntax>             [dict-print] (car741 tmp739)     <--

All the other eggs I've tried have compiled fine. Can someone help me fix this issue, please? It's kinda stopping me in my tracks.

Upvotes: 0

Views: 88

Answers (2)

sjamaan
sjamaan

Reputation: 2292

It looks like a simple bug in a particular egg. If you want this fixed, I'd suggest filing a bug report. The most common ways to do that are to use a bug tracker (in this case, probably bugs.call-cc.org), send the egg's author an e-mail or use the chicken-users mailing list.

PS: Regarding chicken-users, you'll probably have better luck getting your questions answered there than on Stack Overflow, in general.

Upvotes: 1

dercz
dercz

Reputation: 962

The internet suggests problems with this egg, probably this helps (seems to work): in lookup-table-body.scm ~line 308 (in the definition of magic-count?) replace MAGIC-LIMIT with 12:

(define-inline (magic-count? count) (<= count 12 #;MAGIC-LIMIT))

This MAGIC-LIMIT constant causing the problem seems to be used only once, and it's value is defined in lookup-table.setup... Good luck!

Upvotes: 1

Related Questions