Opened 13 years ago
Closed 10 years ago
#769 closed defect (fixed)
g2: if gd is not available, gd-png and gd-jpeg will not be defined
Reported by: | felix winkelmann | Owned by: | Mario Domenech Goulart |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | extensions | Version: | 4.7.x |
Keywords: | g2 | Cc: | |
Estimated difficulty: |
Description
This will result in an unresolved module and compilation will fail.
Change History (4)
comment:1 Changed 13 years ago by
Status: | new → accepted |
---|
comment:2 Changed 13 years ago by
Your change looks good! I'm not sure what to do about the library problem. Is it possible to check for this, possibly by linking a test-program?
comment:3 Changed 11 years ago by
Can you try g2 1.3? I have used the same approach for libX11 support that you used for gd.
comment:4 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Thanks a lot. Seems to work for me (g2 1.4):
#;1> (use g2) #;2> (g2:open-x11 50 50) Error: (g2:open-x11) This procedure requires libX11 to be installed Call history: <syntax> (g2:open-x11 50 50) <eval> (g2:open-x11 50 50) <--
Note: See
TracTickets for help on using
tickets.
I've added a cond-expand clause for when gd is not available. It generate stub procedures for
g2:gd-png
,g2:gd-jpeg
andg2: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:
I've compiled g2 from sources without GD support and the egg seems to work fine with it: