From: Blaine
Subject: Problem Running CL-GD
Date: 
Message-ID: <1151501158.116282.232330@m73g2000cwd.googlegroups.com>
Hi,

I was hoping someone may have experienced a similar problem and already
know the way out.

The short story is this: One day I install CL-GD and it works
beautifully and the next day when I try to use it chokes with the
following:

Error opening shared object
"/home/blaino/systems/cl-gd-0.5.1/cl-gd-glue.so":
  /home/blaino/systems/cl-gd-0.5.1/cl-gd-glue.so: undefined symbol:
gdImageCreateFromJpeg.
   [Condition of type SIMPLE-ERROR]

Backtrace:
  0: (SB-SYS:DLOPEN-OR-LOSE #S(SB-ALIEN::SHARED-OBJECT :FILE
"/home/blaino/systems/cl-gd-0.5.1/cl-gd-glue.so" :SAP NIL))
  1: (LOAD-SHARED-OBJECT
"/home/blaino/systems/cl-gd-0.5.1/cl-gd-glue.so")
  2: (UFFI:LOAD-FOREIGN-LIBRARY
"/home/blaino/systems/cl-gd-0.5.1/cl-gd-glue.so" :MODULE #<unused
argument> :SUPPORTING-LIBRARIES #<unused argument> :FORCE-LOAD NIL)
  3: (CL-GD::LOAD-GD-GLUE)

The longer story goes like this.  First, I downloaded and installed
UFFI which went perfectly.  Then, I downloaded and installed GD.  I
used a package manager to check to see if I had all the GD prereqs.  I
had all but xpm and libiconv.  It seemed, from the GD README, that xpm
(whatever that is) isn't completely necessary, so I went ahead without
it.  As for liconv, I decided to try w/o it, and see what happens.
Configure and make seemed to go fine.

My install of cl-gd, as can be expected due to the lack of libiconv,
did not go perfectly.  The linking command failed to find -liconv.  In
addition, it also failed to find -ljpeg which is strange b/c my package
manager says it's installed.  I removed the -ljpeg and -liconv from the
linking command to see what would happen.

Then I add cl-gd to asdf's central registry, do the load-op, and it
compiled with SCBL only providing compiler notes.  I fired up the cl-gd
test and almost all of them worked (maybe all but two or three)!  It
was awesome.  I started drawing my own .pngs with cl-gd immediately.

The next day, I try to fire up cl-gd and get the error above.  To be
specific, I run:

;; Load "Another System Definition Function".
(load "/home/blaino/lispbox-0.4/asdf.lisp")

;; Build the system registry
(setf asdf:*central-registry*
      '(*default-pathname-defaults*
       	#p"/home/blaino/systems/uffi-1.5.13/"
	#p"/home/blaino/systems/cl-gd-0.5.1/"))

;; "Make the system"
(asdf:oos 'asdf:load-op :uffi)
(asdf:oos 'asdf:load-op :cl-gd)

and, it chokes on the :cl-gd load-op.

I know I cut corners in my install, and I decided to try to get libjpeg
and libiconv working right.  However, I'm concerned that that's not
really the problem given how well cl-gd worked the day before.  That
said, I can't figure out what's up with libjpeg.  My package manager
says it's installed.

But, the ld command just says: cannot find -ljpeg.  I look in /usr/lib
and I see:

libjpeg.so.6
libjpeg.so.6.0,1
libjpeg.so.62
libjpeg.so.62.0.0

Are these the right versions?  Does the ld command know how to deal
with the .6, .6.0.1, etc suffixes?

Anyhow, any hints will be greatly appreciated.  Thanks.