[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-janitors] #769: g2: if gd is not available, gd-png and gd-j
From: |
Chicken Trac |
Subject: |
Re: [Chicken-janitors] #769: g2: if gd is not available, gd-png and gd-jpeg will not be defined |
Date: |
Fri, 27 Jan 2012 23:55:36 -0000 |
#769: g2: if gd is not available, gd-png and gd-jpeg will not be defined
-------------------------+--------------------------------------------------
Reporter: felix | Owner: mario
Type: defect | Status: accepted
Priority: major | Milestone:
Component: extensions | Version: 4.7.x
Resolution: | Keywords: g2
-------------------------+--------------------------------------------------
Changes (by mario):
* status: new => accepted
Comment:
I've added a cond-expand clause for when gd is not available. It generate
stub procedures for {{{g2:gd-png}}}, {{{g2:gd-jpeg}}} and {{{g2:open-
gd}}}. Those procedures just throw an error when called.
Does this look like a good approach? I've commited the changes to g2
trunk (rev 25836).
As a side note, it seems that Debian's and Ubuntu's packages for libg2 are
broken: http://lists.debian.org/debian-qa-packages/2011/02/msg00420.html
Here's what I get when using the package provided by Debian and Ubuntu:
{{{
$ csi
CHICKEN
(c)2008-2011 The Chicken Team
(c)2000-2007 Felix L. Winkelmann
Version 4.7.0
linux-unix-gnu-x86 [ manyargs dload ptables ]
compiled 2011-05-27 on dellito (Linux)
; loading /home/mario/.csirc ...
csi> (use g2)
; loading /usr/local/chicken-4.7.0/lib/chicken/6/g2.import.so ...
Error: (load) during expansion of (import ...) - unable to load compiled
module - /usr/lib/libg2.so.0.72: undefined symbol: gdFontTiny:
"/usr/local/chicken-4.7.0/lib/ch
icken/6/g2.import.so"
Call history:
<syntax> (use g2)
<syntax> (##core#require-extension (g2) #t)
<syntax> (##core#begin (##core#begin (##core#begin
(##sys#require (quote g2))) (import g2)) (##core#undefined......
<syntax> (##core#begin (##core#begin (##sys#require
(quote g2))) (import g2))
<syntax> (##core#begin (##sys#require (quote g2)))
<syntax> (##sys#require (quote g2))
<syntax> (quote g2)
<syntax> (##core#quote g2)
<syntax> (import g2) <--
}}}
I've compiled g2 from sources without GD support and the egg seems to work
fine with it:
{{{
$ csi
CHICKEN
(c)2008-2011 The Chicken Team
(c)2000-2007 Felix L. Winkelmann
Version 4.7.0
linux-unix-gnu-x86 [ manyargs dload ptables ]
compiled 2011-05-27 on dellito (Linux)
; loading /home/mario/.csirc ...
csi> (use g2)
; loading /usr/local/chicken-4.7.0/lib/chicken/6/g2.import.so ...
; loading /usr/local/chicken-4.7.0/lib/chicken/6/easyffi.import.so ...
; loading /usr/local/chicken-4.7.0/lib/chicken/6/g2.so ...
csi> (g2:open-gd)
Error: (g2:open-gd) This procedure requires libgd to be installed
Call history:
<syntax> (g2:open-gd)
<eval> (g2:open-gd) <--
}}}
--
Ticket URL: <http://bugs.call-cc.org/ticket/769#comment:1>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.