Bob Willan | 1 Feb 01:57 2008

"First steps" how to compile problem

Hi, Peter,

I've been thinking about getting into Lisp and Cells for a while, and your 
how-to prompted me to give it a try now.  Not to mention all the work 
you've been doing, making cells-gtk look like more of a going concern 
now.  Thanks for that.

I followed all your instructions, and when I had a compile problem, I 
removed everything, downloaded again/updated from cvs, and tried again 
from scratch, with the same results.  I'm new at lisp and must say the 
compile errors and debugger aren't exactly intuitive to me, though I'd 
guess it involves the cffi function call :(

My compile stops in tree-view.lisp, as the lines below show.  I am using 
straight Debian Etch (32bit 2.6.18-5-k7 kernel), gcc that came with it 
v4.1.2 20061115 (prerelease)(Debian 4.1.1-21), SBCL 0.9.16, cffi 0.9.2, 
and the cells/cells-gtk from cvs using the commands on your site.

Any suggestions would be greatly appreciated.

Thanks,
  Bob Willan

;; I've listed my links (without the permissions/owner/etc to better
;; read the lines, but permissions were wide open)

bob <at> work1:~/.sbcl/site$ ls -la
total 20
drwxr-xr-x 5 bob bob 4096 2008-01-30 09:32 .
drwxr-xr-x 4 bob bob 4096 2008-01-28 23:53 ..
(Continue reading)

Friedrich Dominicus | 1 Feb 07:58 2008
Picon

Re: "First steps" how to compile problem

Bob Willan <bwillan <at> matrix-systems-inc.com> writes:

> Hi, Peter,
>
> I've been thinking about getting into Lisp and Cells for a while, and your 
> how-to prompted me to give it a try now.  Not to mention all the work 
> you've been doing, making cells-gtk look like more of a going concern 
> now.  Thanks for that.
>
> I followed all your instructions, and when I had a compile problem, I 
> removed everything, downloaded again/updated from cvs, and tried again 
> from scratch, with the same results.  I'm new at lisp and must say the 
> compile errors and debugger aren't exactly intuitive to me, though I'd 
> guess it involves the cffi function call :(
>
> My compile stops in tree-view.lisp, as the lines below show.  I am using 
> straight Debian Etch (32bit 2.6.18-5-k7 kernel), gcc that came with it 
> v4.1.2 20061115 (prerelease)(Debian 4.1.1-21), SBCL 0.9.16, cffi 0.9.2, 
> and the cells/cells-gtk from cvs using the commands on your site.
The SBCL is quite old, I'd try with a newer version. 
> ;; I wasn't sure if these warnings when compiling gtk-ffi are
> ;; okay/expected or not?
>
> bob <at> work1:~/.sbcl/site/cells-gtk/gtk-ffi$ make
> gcc -fPIC -c gtk-adds.c `pkg-config --cflags --libs gtk+-2.0`
> gtk-adds.c: In function 'gtk_adds_color_new':
> gtk-adds.c:77: warning: incompatible implicit declaration of built-in 
> function 'malloc'
> gcc: -lgtk-x11-2.0: linker input file unused because linking not done
> gcc: -lgdk-x11-2.0: linker input file unused because linking not done
(Continue reading)

Peter Hildebrandt | 1 Feb 12:45 2008
Picon

Re: "First steps" how to compile problem


Hi Bob,

Bob Willan wrote:
> I've been thinking about getting into Lisp and Cells for a while, and your 
> how-to prompted me to give it a try now.  Not to mention all the work 
> you've been doing, making cells-gtk look like more of a going concern 
> now.  Thanks for that.

Thanks for the positive feed back.  Though I see that I might have 
opened a can of worms here ;)

> I followed all your instructions, and when I had a compile problem, I 
> removed everything, downloaded again/updated from cvs, and tried again 
> from scratch, with the same results.  I'm new at lisp and must say the 
> compile errors and debugger aren't exactly intuitive to me, though I'd 
> guess it involves the cffi function call :(

Ok, I since you included all the relevant logs, I will try to shed some 
light on it.

> My compile stops in tree-view.lisp, as the lines below show.  I am using 
> straight Debian Etch (32bit 2.6.18-5-k7 kernel), gcc that came with it 
> v4.1.2 20061115 (prerelease)(Debian 4.1.1-21), SBCL 0.9.16, cffi 0.9.2, 
> and the cells/cells-gtk from cvs using the commands on your site.

As Friedrich pointed out, try using a newer sbcl.  You can download 
binary realeases at sbcl.org.  I have not tested anything with a pre 
1.0.x version of SBCL.

(Continue reading)

Bob Willan | 1 Feb 22:53 2008

Re: "First steps" how to compile problem - fixed

Peter and Friedrich,

Thanks to both of you for your help.  It was the older version of SBCL 
that was the problem.  I've got a working demo now, too cool.

Peter, you might mention on your Getting Started page that (require :asdf) 
might be needed before anything else.  The Debian pkg was setup so I 
didn't need to do that, but the sbcl 1.0.12 compiled tar I downloaded 
did - I received a "Don't know how to REQUIRE CELLS." error without it 
when I typed (require 'cells).  I suppose maybe I should add that to a 
sbclrc initialization file so its always there?

Maybe I'll think about moving up to Debian Unstable (except the kernel, 
because my VMWare Workstation won't work correctly with the latest 
kernels - my only commercial license and its the only software I have 
problems with that I can't get around or fix!)

Thanks, again,
  Bob

===================================
On Friday 01 February 2008, Peter Hildebrandt wrote:
> 
> Hi Bob,
> 
> Bob Willan wrote:
> > I've been thinking about getting into Lisp and Cells for a while, and 
your 
> > how-to prompted me to give it a try now.  Not to mention all the work 
> > you've been doing, making cells-gtk look like more of a going concern 
(Continue reading)

Peter Hildebrandt | 2 Feb 13:23 2008
Picon

Re: "First steps" how to compile problem - fixed


Bob Willan wrote:
> Peter and Friedrich,
> 
> Thanks to both of you for your help.  It was the older version of SBCL 
> that was the problem.  I've got a working demo now, too cool.

Glad to hear it worked for you now.  I added a paragraph to the guide 
about installing a recent sbcl.

> Peter, you might mention on your Getting Started page that (require :asdf) 
> might be needed before anything else.  The Debian pkg was setup so I 
> didn't need to do that, but the sbcl 1.0.12 compiled tar I downloaded 
> did - I received a "Don't know how to REQUIRE CELLS." error without it 
> when I typed (require 'cells).  I suppose maybe I should add that to a 
> sbclrc initialization file so its always there?

Yep, exactly.  Thanks for pointing that out.  I added to the guide how 
to include (require 'asdf) (require 'asdf-install) in your .sbclrc.

I also created a section warning potential users that it might be 
difficult ;-)

> Maybe I'll think about moving up to Debian Unstable (except the kernel, 
> because my VMWare Workstation won't work correctly with the latest 
> kernels - my only commercial license and its the only software I have 
> problems with that I can't get around or fix!)

A great testimony to open source :)  Maybe you should check out qemu. 
It is a little harder to set up than VMWare, but does a pretty good job 
(Continue reading)

Peter Hildebrandt | 2 Feb 13:51 2008
Picon

Re: Problems with demo


Leandro,

sorry for the late reply.  I've been busy over here.

Leandro Ríos wrote:
> Sorry for getting back late. I've been doing some debugging, and this is 
> what I found so far:
> 
> The error is raised in SBCL's %make-alien function, file 
> target-alienval.lisp. More precisely:
> 
> (defun %make-alien (bits)
>  (declare (type index bits))
>  (alien-funcall (extern-alien "malloc"
>                               (function system-area-pointer unsigned))
>                 (ash (the index (+ bits 7)) -3))) <<<<<<<<here
> 

Alright, so the error actually occurs in one of SBCLs source files.

> This is the backtrace of the last debugging step before the error occurs:
> 
> Evaluating call:
>  (ASH (THE SB-INT:INDEX (+ SB-SYS:BITS 7)) -3)
> With unknown arguments

> Backtrace:
>  0: (CFFI:FOREIGN-ALLOC :INT)
>  1: (GTK-FFI:GTK-LIST-STORE-NEW (:STRING :STRING))
(Continue reading)

Ingo Bormuth | 2 Feb 16:03 2008
Picon

Re: "First steps" how to compile problem - fixed

On 2008-02-02 13:23, Peter Hildebrandt wrote:

> A great testimony to open source :)  Maybe you should check out qemu. It is 
> a little harder to set up than VMWare, but does a pretty good job these 
> days.  Rumour has it you can even run OSX 10.5 Tiger in there.

Check out qemulator (http://qemulator.createweb.de/). Together with qemu
this is as simple to use as vmware, without the need to constantly compile
an external kernel module, which actually makes it even more convenient ;)

--

-- 
Ingo Bormuth, voicebox & fax: +49-(0)-12125-10226517
public key 86326EC9, http://ibormuth.efil.de/contact

Rörd Hinrichsen | 6 Feb 23:25 2008

Patch suggestion for "load.lisp"

Hello,

"load.lisp" doesn't yet include the path to the ph-maths library. I suggest these changes:

$ cvs diff -u load.lisp
Index: load.lisp
===================================================================
RCS file: /project/cells-gtk/cvsroot/load.lisp,v
retrieving revision 1.3
diff -u -r1.3 load.lisp
--- load.lisp   30 Jun 2006 15:24:21 -0000      1.3
+++ load.lisp   6 Feb 2008 22:00:02 -0000
<at> <at> -29,12 +29,14 <at> <at>
               #P"cells-gtk:cffi;"
               #P"cells-gtk:root;pod-utils;"
               #P"cells-gtk:root;gtk-ffi;"
+             #P"cells-gtk:root;ph-maths;"
               #P"cells-gtk:root;cells-gtk;"
               #P"cells-gtk:root;cells-gtk;test-gtk;")))
   (asdf:oos 'asdf:load-op :cells)
   (asdf:oos 'asdf:load-op :cffi)
   (asdf:oos 'asdf:load-op :cffi-uffi-compat)
   (asdf:oos 'asdf:load-op :gtk-ffi)
+  (asdf:oos 'asdf:load-op :ph-maths)
   (asdf:oos 'asdf:load-op :cells-gtk)
   (asdf:oos 'asdf:load-op :test-gtk))

Rörd

<div><p>Hello,<br><br>"load.lisp" doesn't yet include the path to the ph-maths library. I suggest these changes:<br><br>$ cvs diff -u load.lisp <br>Index: load.lisp<br>===================================================================<br>
RCS file: /project/cells-gtk/cvsroot/load.lisp,v<br>retrieving revision 1.3<br>diff -u -r1.3 load.lisp<br>--- load.lisp&nbsp;&nbsp; 30 Jun 2006 15:24:21 -0000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.3<br>+++ load.lisp&nbsp;&nbsp; 6 Feb 2008 22:00:02 -0000<br> <at>  <at>  -29,12 +29,14  <at>  <at> <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #P"cells-gtk:cffi;"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #P"cells-gtk:root;pod-utils;"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #P"cells-gtk:root;gtk-ffi;"<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #P"cells-gtk:root;ph-maths;"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #P"cells-gtk:root;cells-gtk;"<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #P"cells-gtk:root;cells-gtk;test-gtk;")))<br>&nbsp;&nbsp; (asdf:oos 'asdf:load-op :cells)<br>&nbsp;&nbsp; (asdf:oos 'asdf:load-op :cffi)<br>&nbsp;&nbsp; (asdf:oos 'asdf:load-op :cffi-uffi-compat)<br>&nbsp;&nbsp; (asdf:oos 'asdf:load-op :gtk-ffi)<br>
+&nbsp; (asdf:oos 'asdf:load-op :ph-maths)<br>&nbsp;&nbsp; (asdf:oos 'asdf:load-op :cells-gtk)<br>&nbsp;&nbsp; (asdf:oos 'asdf:load-op :test-gtk))<br><br>R&ouml;rd<br></p></div>
Peter Hildebrandt | 7 Feb 11:16 2008
Picon

Re: Patch suggestion for "load.lisp"


Roerd,

thanks for spotting this.  However, I don't see a load.lisp in CVS.  Did 
you install cells-gtk from CVS, from one of the tarballs, or from 
asdf-install?

We have recently changed cells-gtk quite a bit, but the changes are only 
available in CVS, so I'd recommend you go with that.  The preferred 
method to load cells-gtk is via  asdf.  I explain this in more detail in 
my guide over here:

http://www.washbear-network.de/peterblog/getting-started-with-cells-gtk/

(I know, I should get my own (less silly) domain at some point)

If you have further questions, let us know.

Peter

Rörd Hinrichsen wrote:
> Hello,
> 
> "load.lisp" doesn't yet include the path to the ph-maths library. I 
> suggest these changes:
> 
> $ cvs diff -u load.lisp
> Index: load.lisp
> ===================================================================
> RCS file: /project/cells-gtk/cvsroot/load.lisp,v
> retrieving revision 1.3
> diff -u -r1.3 load.lisp
> --- load.lisp   30 Jun 2006 15:24:21 -0000      1.3
> +++ load.lisp   6 Feb 2008 22:00:02 -0000
>  <at>  <at>  -29,12 +29,14  <at>  <at> 
>                #P"cells-gtk:cffi;"
>                #P"cells-gtk:root;pod-utils;"
>                #P"cells-gtk:root;gtk-ffi;"
> +             #P"cells-gtk:root;ph-maths;"
>                #P"cells-gtk:root;cells-gtk;"
>                #P"cells-gtk:root;cells-gtk;test-gtk;")))
>    (asdf:oos 'asdf:load-op :cells)
>    (asdf:oos 'asdf:load-op :cffi)
>    (asdf:oos 'asdf:load-op :cffi-uffi-compat)
>    (asdf:oos 'asdf:load-op :gtk-ffi)
> +  (asdf:oos 'asdf:load-op :ph-maths)
>    (asdf:oos 'asdf:load-op :cells-gtk)
>    (asdf:oos 'asdf:load-op :test-gtk))
> 
> Rörd
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> cells-gtk-devel site list
> cells-gtk-devel <at> common-lisp.net
> http://common-lisp.net/mailman/listinfo/cells-gtk-devel
Peter Hildebrandt | 7 Feb 14:43 2008
Picon

Re: Patch suggestion for "load.lisp"


Peter Hildebrandt wrote:
> thanks for spotting this.  However, I don't see a load.lisp in CVS.  Did 
> you install cells-gtk from CVS, from one of the tarballs, or from 
> asdf-install?

Sorry, my bad here.  I just learned that load.lisp is supposed to be in 
CVS, too.  I will get it from the tarballs, merge in your patch (so it 
is useful, after all!), and commit it to CVS later tonight.
> 
> We have recently changed cells-gtk quite a bit, but the changes are only 
> available in CVS, so I'd recommend you go with that.  The preferred 
> method to load cells-gtk is via  asdf.

I was wrong here.  The (load "load") method should work, too.

Peter

   I explain this in more detail in
> my guide over here:
> 
> http://www.washbear-network.de/peterblog/getting-started-with-cells-gtk/
> 
> (I know, I should get my own (less silly) domain at some point)
> 
> If you have further questions, let us know.
> 
> Peter
> 
> 
> Rörd Hinrichsen wrote:
>> Hello,
>>
>> "load.lisp" doesn't yet include the path to the ph-maths library. I 
>> suggest these changes:
>>
>> $ cvs diff -u load.lisp
>> Index: load.lisp
>> ===================================================================
>> RCS file: /project/cells-gtk/cvsroot/load.lisp,v
>> retrieving revision 1.3
>> diff -u -r1.3 load.lisp
>> --- load.lisp   30 Jun 2006 15:24:21 -0000      1.3
>> +++ load.lisp   6 Feb 2008 22:00:02 -0000
>>  <at>  <at>  -29,12 +29,14  <at>  <at> 
>>                #P"cells-gtk:cffi;"
>>                #P"cells-gtk:root;pod-utils;"
>>                #P"cells-gtk:root;gtk-ffi;"
>> +             #P"cells-gtk:root;ph-maths;"
>>                #P"cells-gtk:root;cells-gtk;"
>>                #P"cells-gtk:root;cells-gtk;test-gtk;")))
>>    (asdf:oos 'asdf:load-op :cells)
>>    (asdf:oos 'asdf:load-op :cffi)
>>    (asdf:oos 'asdf:load-op :cffi-uffi-compat)
>>    (asdf:oos 'asdf:load-op :gtk-ffi)
>> +  (asdf:oos 'asdf:load-op :ph-maths)
>>    (asdf:oos 'asdf:load-op :cells-gtk)
>>    (asdf:oos 'asdf:load-op :test-gtk))
>>
>> Rörd
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> cells-gtk-devel site list
>> cells-gtk-devel <at> common-lisp.net
>> http://common-lisp.net/mailman/listinfo/cells-gtk-devel

Gmane