Jason Dunsmore | 1 Sep 23:08 2006
Picon

cells-gtk and opengl

Hi, I'd like to use cells-gtk for my gui, but I need opengl for
displaying an interactive 3d graph.  How would one use cl-opengl with
cells-gtk?  Would I be better off just using another toolkit, such as
celtk or cello?

Thank you,
Jason Dunsmore
Ken Tilton | 1 Sep 23:48 2006
Picon

Re: cells-gtk and opengl



On 9/1/06, Jason Dunsmore <jasondunsmore <at> gmail.com> wrote:
Hi, I'd like to use cells-gtk for my gui, but I need opengl for
displaying an interactive 3d graph.  How would one use cl-opengl with
cells-gtk?  Would I be better off just using another toolkit, such as
celtk or cello?

fwiw, I am using Celtk/Cello in anger every day on a big project and it is working well, but it is all new and unpolished and as always undocumented (tho Tcl/Tk and Togl doc apply). It is really nice having full access to the event stream (and of course OpenGL).

FrankG has gotten Celtk/togl stuff working on OSX under AllegroCL, also fwiw.

All in all, i think your tolerance for rough edges and wet paint has to be pretty high to jump in with me on Celtk/Cello, but with FTGL and GraphicsMagick /and/ OpenAL I am definitely having a ball. I also like the othe portable things one gets from Tcl besides just the Tk GUI.

hth, ken

<div>
<br><br><div>
<span class="gmail_quote">On 9/1/06, Jason Dunsmore &lt;<a href="mailto:jasondunsmore <at> gmail.com">jasondunsmore <at> gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote">
Hi, I'd like to use cells-gtk for my gui, but I need opengl for<br>displaying an interactive 3d graph.&nbsp;&nbsp;How would one use cl-opengl with<br>cells-gtk?&nbsp;&nbsp;Would I be better off just using another toolkit, such as<br>celtk or cello?
</blockquote>
<div>
<br>fwiw, I am using Celtk/Cello in anger every day on a big project and it is working well, but it is all new and unpolished and as always undocumented (tho Tcl/Tk and Togl doc apply). It is really nice having full access to the event stream (and of course OpenGL).
<br><br>FrankG has gotten Celtk/togl stuff working on OSX under AllegroCL, also fwiw.<br><br>All in all, i think your tolerance for rough edges and wet paint has to be pretty high to jump in with me on Celtk/Cello, but with FTGL and GraphicsMagick /and/ OpenAL I am definitely having a ball. I also like the othe portable things one gets from Tcl besides just the Tk GUI.
<br><br>hth, ken<br><br>
</div>
</div>
</div>
rd | 9 Sep 11:59 2006
Picon

Unable to load foreign library: X with cells-gtk-2006-06-30, SBCL, and FreeBSD


I posted the following to comp.lang.lisp a few days
ago, and it was suggested that this list or the cffi
devel list would be more topical (and so here I am).

I'm very inexperienced with Lisp, and I'm trying to
poke around with cells-gtk.

I'm using SBCL-0.9.0 on FreeBSD6, installed from the
ports system.  I downloaded cells-gtk-2006-06-30 and
followed the INSTALL instructions.

The test TEST-GTK:GTK-DEMO fails with one of the two
following errors (they alternate):

      Unable to load foreign library: libgthread-2.0.so
      Unable to load foreign library: libglib-2.0.so

I manually did

      (cffi:load-foreign-library :GLIB)

and it returned T, although it complains about undefined
aliens.  After I did this, GTK-DEMO will only fail because
it can't load libgthread.

All of these libraries are in /usr/local/lib.  Any help
would be appreciated.

Peter Denno | 9 Sep 13:28 2006

Re: Unable to load foreign library: X with cells-gtk-2006-06-30, SBCL, and FreeBSD

On Saturday 09 September 2006 05:59, rd wrote:
> I posted the following to comp.lang.lisp a few days
> ago, and it was suggested that this list or the cffi
> devel list would be more topical (and so here I am).
>

You came to the right place (this time). Talking to someone about on cffi 
about FreeBSD6  is also a good idea. If you go there and learn anything, 
please let us know.

>
>
> I'm very inexperienced with Lisp, and I'm trying to
> poke around with cells-gtk.

Playing with cells-gtk probably isn't the easiest way to learn lisp, but then 
doing so sound like something I'd try too ;^)

>
> I'm using SBCL-0.9.0 on FreeBSD6, installed from the
> ports system.  I downloaded cells-gtk-2006-06-30 and
> followed the INSTALL instructions.
>
> The test TEST-GTK:GTK-DEMO fails with one of the two
> following errors (they alternate):
>
>       Unable to load foreign library: libgthread-2.0.so
>       Unable to load foreign library: libglib-2.0.so

Can you tell me what is returned when you evaluate this? :

(cffi-sys::%load-foreign-library "/usr/local/lib/libglib-2.0.so") 

>
>
> I manually did
>
>       (cffi:load-foreign-library :GLIB)
>
> and it returned T, although it complains about undefined
> aliens.  After I did this, GTK-DEMO will only fail because
> it can't load libgthread.
>
> All of these libraries are in /usr/local/lib.  Any help
> would be appreciated.
>
> _______________________________________________
> cells-gtk-devel site list
> cells-gtk-devel <at> common-lisp.net
> http://common-lisp.net/mailman/listinfo/cells-gtk-devel

--

-- 
- Best regards,
   Peter
rd | 9 Sep 14:22 2006
Picon

Re: Unable to load foreign library: X with cells-gtk-2006-06-30, SBCL, and FreeBSD

Peter Denno wrote:
> On Saturday 09 September 2006 05:59, rd wrote:
>> I posted the following to comp.lang.lisp a few days
>> ago, and it was suggested that this list or the cffi
>> devel list would be more topical (and so here I am).
>>
> 
> You came to the right place (this time). Talking to someone about on cffi 
> about FreeBSD6  is also a good idea. If you go there and learn anything, 
> please let us know.
> 
>>
>> I'm very inexperienced with Lisp, and I'm trying to
>> poke around with cells-gtk.
> 
> Playing with cells-gtk probably isn't the easiest way to learn lisp, but then 
> doing so sound like something I'd try too ;^)
> 
>> I'm using SBCL-0.9.0 on FreeBSD6, installed from the
>> ports system.  I downloaded cells-gtk-2006-06-30 and
>> followed the INSTALL instructions.
>>
>> The test TEST-GTK:GTK-DEMO fails with one of the two
>> following errors (they alternate):
>>
>>       Unable to load foreign library: libgthread-2.0.so
>>       Unable to load foreign library: libglib-2.0.so
> 
> Can you tell me what is returned when you evaluate this? :
> 
> (cffi-sys::%load-foreign-library "/usr/local/lib/libglib-2.0.so") 

It returns T.

However, (cffi-sys::%load-foreign-library "/usr/local/lib/libgthread-2.0.so")
fails with the following:

Error opening shared object "/usr/local/lib/libgthread-2.0.so":
   /usr/local/lib/libgthread-2.0.so: Undefined symbol "pthread_attr_destroy".
    [Condition of type SIMPLE-ERROR]

So this indicates that it's CFFI (or perhaps something in the way
FreeBSD sets these libraries up)?

> 
> 
>>
>> I manually did
>>
>>       (cffi:load-foreign-library :GLIB)
>>
>> and it returned T, although it complains about undefined
>> aliens.  After I did this, GTK-DEMO will only fail because
>> it can't load libgthread.
>>
>> All of these libraries are in /usr/local/lib.  Any help
>> would be appreciated.
>>
>> _______________________________________________
>> cells-gtk-devel site list
>> cells-gtk-devel <at> common-lisp.net
>> http://common-lisp.net/mailman/listinfo/cells-gtk-devel
> 

Peter Denno | 9 Sep 14:55 2006

Re: Re: Unable to load foreign library: X with cells-gtk-2006-06-30, SBCL, and FreeBSD

On Saturday 09 September 2006 08:22, rd wrote:
> > (cffi-sys::%load-foreign-library "/usr/local/lib/libglib-2.0.so")
>
> It returns T.
>
> However, (cffi-sys::%load-foreign-library
> "/usr/local/lib/libgthread-2.0.so") fails with the following:
>
> Error opening shared object "/usr/local/lib/libgthread-2.0.so":
>    /usr/local/lib/libgthread-2.0.so: Undefined symbol
> "pthread_attr_destroy". [Condition of type SIMPLE-ERROR]
>
> So this indicates that it's CFFI (or perhaps something in the way
> FreeBSD sets these libraries up)?

I don't know about that. I don't see anything in cells-gtk that contains the 
string pthread.  Perhaps one of the other glib libraries is referencing this 
symbol and it isn't in libgthread-2.0.so ??? nm doesn't print anything (not 
that I'm very adept with it...). But using emacs, I can see a string 
pthread_attr_destroy in libgthread. You can run other glib apps, right?

I'll look deeper tomorrow maybe, but I've gotta put my son to bed (Beijing 
time).

--

-- 
- Best regards,
   Peter
rd | 10 Sep 01:18 2006
Picon

Re: Unable to load foreign library: X with cells-gtk-2006-06-30, SBCL, and FreeBSD

Peter Denno wrote:
> On Saturday 09 September 2006 08:22, rd wrote:
>>> (cffi-sys::%load-foreign-library "/usr/local/lib/libglib-2.0.so")
>> It returns T.
>>
>> However, (cffi-sys::%load-foreign-library
>> "/usr/local/lib/libgthread-2.0.so") fails with the following:
>>
>> Error opening shared object "/usr/local/lib/libgthread-2.0.so":
>>    /usr/local/lib/libgthread-2.0.so: Undefined symbol
>> "pthread_attr_destroy". [Condition of type SIMPLE-ERROR]
>>
>> So this indicates that it's CFFI (or perhaps something in the way
>> FreeBSD sets these libraries up)?
> 
> I don't know about that. I don't see anything in cells-gtk that contains the 
> string pthread.  Perhaps one of the other glib libraries is referencing this 
> symbol and it isn't in libgthread-2.0.so ??? nm doesn't print anything (not 
> that I'm very adept with it...). But using emacs, I can see a string 
> pthread_attr_destroy in libgthread. You can run other glib apps, right?

I didn't see anything about pthread in the cells-gtk
tree either, but I'm so new to it that I don't know if
that means anything.  As far as I can remember, the glib
stuff installed normally, probably as a dependency for GTK.
I've never had any trouble running any glib/gtk application.

That's part of why this was so confusing to me; I ought to
have pretty close to a default setup for FreeBSD.  I would've
thought that other people would've seen this before.

I think I'm going to try to set up a temporary linux in qemu,
just to see if it'll work.

> 
> I'll look deeper tomorrow maybe, but I've gotta put my son to bed (Beijing 
> time).
> 

Thank you for all your help.


Gmane