[racket-dev] up-to-date libgtk for drracket on debian stable?

2010-12-31 Thread John Clements
Debian is a slow-moving distribution, and it looks to me like the version of 
libgtk in the stable version of Debian Lenny isn't new enough for DrRacket. 
Here's what I get on startup:

ffi-obj: couldn't get "gtk_combo_box_set_button_sensitivity" from 
"libgtk-x11-2.0.so.0" (/usr/lib/libgtk-x11-2.0.so.0: undefined symbol: 
gtk_combo_box_set_button_sensitivity)

=== context ===
/home/clements/plt/collects/ffi/unsafe.rkt:176:2: get-ffi-obj*
/home/clements/plt/collects/mred/private/wx/gtk/platform.rkt: [traversing 
imports]
/home/clements/plt/collects/mred/private/kernel.rkt: [traversing imports]
/home/clements/plt/collects/mred/private/const.rkt: [traversing imports]
/home/clements/plt/collects/mred/private/check.rkt: [traversing imports]
/home/clements/plt/collects/mred/mred.rkt: [traversing imports]
/home/clements/plt/collects/mred/main.rkt: [traversing imports]
/home/clements/plt/collects/racket/gui/base.rkt: [traversing imports]
/home/clements/plt/collects/drracket/drracket.rkt: [traversing imports]

I know I've seen the racket build download its own libraries during compilation 
on my mac, but I didn't find a 'configure' option that allowed me to specify 
this manually.

Thanks for any suggestions,

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] up-to-date libgtk for drracket on debian stable?

2010-12-31 Thread Neil Van Dyke
In case anyone is interested, following are versions of GTK-related 
libraries on one of my Debian Stable boxes.  The GTK API documentation 
generally tells you in which version an API feature was introduced.  I 
can provide shared library symbol dumps if someone would like that.


dpkg -l | grep libgtk
ii  libgtk1.21.2.10-18.1
The GIMP Toolkit set of widgets for X
ii  libgtk1.2-common 1.2.10-18.1
Common files for the GTK+ library
ii  libgtk2-perl 1:1.190-1  
Perl interface to the 2.x series of the Gimp
ii  libgtk2.0-0  2.12.12-1~lenny2   
The GTK+ graphical user interface library
ii  libgtk2.0-bin2.12.12-1~lenny2   
The programs for the GTK+ graphical user int
ii  libgtk2.0-common 2.12.12-1~lenny2   
Common files for the GTK+ graphical user int
ii  libgtk2.0-dev2.12.12-1~lenny2   
Development files for the GTK+ library
ii  libgtkhtml2-02.11.1-2   
HTML rendering/editing library - runtime fil
ii  libgtkmm-2.4-1c2a1:2.12.7-1 
C++ wrappers for GTK+ 2.4 (shared libraries)
ii  libgtksourceview-common  1.8.5-1
common files for the GTK+ syntax highlightin
ii  libgtksourceview1.0-01.8.5-1
shared libraries for the GTK+ syntax highlig
ii  libgtksourceview2.0-02.2.2-1
shared libraries for the GTK+ syntax highlig
ii  libgtksourceview2.0-common   2.2.2-1
common files for the GTK+ syntax highlightin
ii  libgtkspell0 2.0.13-1+b1
a spell-checking addon for GTK's TextView wi


dpkg -l | grep libpango
ii  libpango1.0-01.20.5-6   
Layout and rendering of internationalized te
ii  libpango1.0-common   1.20.5-6   
Modules and configuration files for the Pang
ii  libpango1.0-dev  1.20.5-6   
Development files for the Pango


dpkg -l | grep gdk
ii  gdk-imlib11  1.9.15-7   
imaging library for use with gtk


--
http://www.neilvandyke.org/
_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] up-to-date libgtk for drracket on debian stable?

2010-12-31 Thread Matthew Flatt
Thanks!

I have a Debian Stable installation that I try periodically. I guess
it's time to give it a try and patch up the problems.

Also, I try to pay attention to the version information in Gtk and
other documentation, but sometimes I forget to pay attention, and
sometimes I forget that a version like "2.14" is too new for Gtk on
Debian.

_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] up-to-date libgtk for drracket on debian stable?

2011-01-01 Thread Philippe Meunier
John Clements wrote:
>Debian is a slow-moving distribution, and it looks to me like the
>version of libgtk in the stable version of Debian Lenny isn't new
>enough for DrRacket. Here's what I get on startup:

On a related note, I just tried to compile DrRacket on a week-old
OpenBSD 4.8-current and got the following error when starting
drracket:

ffi-lib: couldn't open "libcairo.so.2" (File not found)
 === context ===
/home/meunier/lang/plt/collects/racket/draw/unsafe/cairo.rkt: [running body]
/home/meunier/lang/plt/collects/racket/draw/private/font.rkt: [traversing 
imports]
/home/meunier/lang/plt/collects/racket/draw/private/post-script-dc.rkt: 
[traversing imports]
/home/meunier/lang/plt/collects/racket/draw.rkt: [traversing imports]
/home/meunier/lang/plt/collects/mred/private/kernel.rkt: [traversing imports]
/home/meunier/lang/plt/collects/mred/private/const.rkt: [traversing imports]
/home/meunier/lang/plt/collects/mred/private/check.rkt: [traversing imports]
/home/meunier/lang/plt/collects/mred/mred.rkt: [traversing imports]
/home/meunier/lang/plt/collects/mred/main.rkt: [traversing imports]
/home/meunier/lang/plt/collects/scheme/gui/base.rkt: [traversing imports]
/home/meunier/lang/plt/collects/scheme/gui.rkt: [traversing imports]
/home/meunier/lang/plt/collects/racket/gui/init.rkt: [traversing imports]
/home/meunier/lang/plt/collects/scheme/gui/init.rkt: [traversing imports]

(the same error also shows up here and there during the setup phase of
the build)

I had to change a bunch of files in collects/racket/draw/unsafe to get
it to work (see the attached diff).  For reference, on OpenBSD the
library versions are currently as follows:

libcairo.so.11.0
libglib-2.0.so.2600.0
libgmodule-2.0.so.2600.0
libgobject-2.0.so.2600.0
libjpeg.so.64.0
libpango-1.0.so.1802.0
libpangocairo-1.0.so.1802.0
libpng.so.10.0
libgdk-x11-2.0.so.2200.0
libgdk_pixbuf-2.0.so.2200.0
libgtk-x11-2.0.so.2200.0

Just to make things more annoying, libcairo needs libpthread:

$ nm /usr/local/lib/libcairo.so.11.0 | egrep -i pthread
 U pthread_mutex_destroy
 U pthread_mutex_init
 U pthread_mutex_lock
 U pthread_mutex_unlock
 U pthread_mutexattr_destroy
 U pthread_mutexattr_init
 U pthread_mutexattr_settype
$ 

so I also had to change the define-runtime-lib macro from
collects/racket/draw/private/libs.rkt so that the unix case of the
macro accepts multiple libraries.  I'm not sure that's the best way to
go about adding libpthread though, and I'm definitely not sure that my
simple change to collects/racket/draw/unsafe/cairo.rkt to add
libpthread works on other platforms...

For reference, the current version of libpthread on OpenBSD is
libpthread.so.13.1.

With theses changes I was able to run drracket, except that:

- I got the following error at startup while the steep tool is being
  loaded:

Error invoking tool 
#;("stepper+xml-tool.ss")
xml-box: bitmap scheme-box.jpg failed to load
 === context ===
/home/meunier/lang/plt/collects/drracket/private/tools-drs.rkt:96:0: 
invoke-drs-tool
/home/meunier/lang/plt/collects/drracket/drracket.rkt: [running body]

(I have no problem looking at the jpg file using xv or gimp)

- at startup I also got a good half dozen popup windows with error
  messages about preference files.  These were gray popup windows with
  a triangular red-white icon with a black question mark in it.  I
  tried to use the "copy message" mouse menu of these popup windows
  but it didn't work.  One popup window was different though (it
  seemed to use a text% editor rather than being just a basic frame
  with a gray background, and had a round red-white "no entry" icon)
  so I could copy from it the error message (which was similar to all
  the previous ones, and was also printed to the console):

copy-file: read or write failed; cannot copy: 
/home/meunier/.racket/racket-prefs.rktd to: 
/home/meunier/.racket/TMPPREF12938920161293892016827
 === context ===
/home/meunier/lang/plt/collects/racket/file.rkt:249:10
/home/meunier/lang/plt/collects/framework/splash.rkt:172:0: close-splash
/home/meunier/lang/plt/collects/drracket/private/drracket-normal.rkt: [running 
body]
/home/meunier/lang/plt/collects/drracket/drracket.rkt: [running body]

internal error: wrong eventspace for constrained event handling

/home/meunier/lang/plt/collects/mred/private/wx/common/freeze.rkt:9:0 
internal-error
/home/meunier/lang/plt/collects/mred/private/wx/common/freeze.rkt:36:0 
constrained-reply
/home/meunier/lang/plt/collects/mred/private/wx/gtk/queue.rkt:184:31
/home/meunier/lang/plt/collects/ffi/unsafe/try-atomic.rkt:32:0 
call-as-nonatomic-retry-point
/home/meunier/lang/plt/collects/mred/private/wx/common/queue.rkt:374:7
/home/meunier/lang/plt/collects/mred/private/wx/common/queue.rkt:409:32

internal error: wrong eventspace for constrained event handling

/home/meunier/lang/plt/collects/mred/private/wx/common/freeze.rkt:9:0 
internal-error
/home/meunier/lang/plt/collects/mred/private/wx/

Re: [racket-dev] up-to-date libgtk for drracket on debian stable?

2011-01-02 Thread Matthew Flatt
At Sat, 1 Jan 2011 10:56:18 -0500, Philippe Meunier wrote:
> I had to change a bunch of files in collects/racket/draw/unsafe to get
> it to work (see the attached diff).  For reference, on OpenBSD the
> library versions are currently as follows:

The main change seems to be dropping the "0" version. Does replacing
'("0") with '("0" "") also work, so that a versionless name is tried
when the versioned name fails?

I've pushed a set of changes along those lines, plus falling back to
"libpng" when "libpng12" fails and dynamically detecting the libjpeg
version.


> Just to make things more annoying, libcairo needs libpthread:
> [...]
> so I also had to change the define-runtime-lib macro from
> collects/racket/draw/private/libs.rkt so that the unix case of the
> macro accepts multiple libraries.  I'm not sure that's the best way to
> go about adding libpthread though, and I'm definitely not sure that my
> simple change to collects/racket/draw/unsafe/cairo.rkt to add
> libpthread works on other platforms...

Won't "libpthread" get loaded auomatically when "libcairo" is loaded?


> With theses changes I was able to run drracket, except that:
> 
> - I got the following error at startup while the steep tool is being
>   loaded:
> 
> Error invoking tool 
> #;("stepper+xml-tool.ss")
> xml-box: bitmap scheme-box.jpg failed to load
>  === context ===
> /home/meunier/lang/plt/collects/drracket/private/tools-drs.rkt:96:0: 
> invoke-drs-tool
> /home/meunier/lang/plt/collects/drracket/drracket.rkt: [running body]
> 
> (I have no problem looking at the jpg file using xv or gimp)

I think that's because the libjpeg version 64 wasn't supported by
"jpeg.rkt" --- now fixed.


> copy-file: read or write failed; cannot copy: 
> /home/meunier/.racket/racket-prefs.rktd to: 
> /home/meunier/.racket/TMPPREF12938920161293892016827

I don't know about this one.

_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] up-to-date libgtk for drracket on debian stable?

2011-01-03 Thread Philippe Meunier
Matthew Flatt wrote:
>The main change seems to be dropping the "0" version. Does replacing
>'("0") with '("0" "") also work, so that a versionless name is tried
>when the versioned name fails?

That part seems to work.  See the error message below.  It looks a bit
strange though because the error message from ffi-lib points to
libcairo.so.2 when in fact the library that ffi-lib ends up trying to
load is libcairo.so.11.0.

>> Just to make things more annoying, libcairo needs libpthread:
>> [...]
>> so I also had to change the define-runtime-lib macro from
>> collects/racket/draw/private/libs.rkt so that the unix case of the
>> macro accepts multiple libraries.  I'm not sure that's the best way to
>> go about adding libpthread though, and I'm definitely not sure that my
>> simple change to collects/racket/draw/unsafe/cairo.rkt to add
>> libpthread works on other platforms...
>
>Won't "libpthread" get loaded auomatically when "libcairo" is loaded?

Apparently not:

$ ldd /usr/local/lib/libcairo.so.11.0 | grep pthread
0318a000 2318e000 rlib 011   0
/usr/X11R6/lib/libpthread-stubs.so.1.0
$ 

So it looks like it has to be done explicitely.  This is what
currently happens with the latest version (without any of my patches):

$ gracket/gracket3m 
gracket/gracket3m:/usr/local/lib/libcairo.so.11.0: undefined symbol 
'pthread_mutexattr_destroy'
gracket/gracket3m:/usr/local/lib/libcairo.so.11.0: undefined symbol 
'pthread_mutexattr_settype'
gracket/gracket3m:/usr/local/lib/libcairo.so.11.0: undefined symbol 
'pthread_mutexattr_init'
ffi-lib: couldn't open "libcairo.so.2" (File not found)

 === context ===
/home/meunier/lang/plt/collects/racket/draw/unsafe/cairo.rkt: [running body]
/home/meunier/lang/plt/collects/racket/draw/private/font.rkt: [traversing 
imports]
/home/meunier/lang/plt/collects/racket/draw/private/post-script-dc.rkt: 
[traversing imports]
/home/meunier/lang/plt/collects/racket/draw.rkt: [traversing imports]
/home/meunier/lang/plt/collects/mred/private/kernel.rkt: [traversing imports]
/home/meunier/lang/plt/collects/mred/private/const.rkt: [traversing imports]
/home/meunier/lang/plt/collects/mred/private/check.rkt: [traversing imports]
/home/meunier/lang/plt/collects/mred/mred.rkt: [traversing imports]
/home/meunier/lang/plt/collects/mred/main.rkt: [traversing imports]
/home/meunier/lang/plt/collects/scheme/gui/base.rkt: [traversing imports]
/home/meunier/lang/plt/collects/scheme/gui.rkt: [traversing imports]
/home/meunier/lang/plt/collects/racket/gui/init.rkt: [traversing imports]
/home/meunier/lang/plt/collects/scheme/gui/init.rkt: [traversing imports]

gracket/gracket3m:/usr/local/lib/libgthread-2.0.so.2600.0: undefined symbol 
'pthread_mutex_lock'
gracket/gracket3m:/usr/local/lib/libgthread-2.0.so.2600.0: undefined symbol 
'pthread_mutex_unlock'
gracket/gracket3m:/usr/local/lib/libgthread-2.0.so.2600.0: undefined symbol 
'pthread_cond_signal'
[... 20 more lines like this ...]
gracket/gracket3m:/usr/local/lib/libgthread-2.0.so.2600.0: undefined symbol 
'pthread_attr_getschedparam'
gracket/gracket3m:/usr/local/lib/libgthread-2.0.so.2600.0: undefined symbol 
'pthread_setspecific'
link: reference (phase 0) to a variable in module 
"/home/meunier/lang/plt/collects/racket/draw/unsafe/cairo.rkt" that is 
uninitialized (phase level 0); reference appears in module: 
"/home/meunier/lang/plt/collects/racket/draw/unsafe/pango.rkt" in: _cairo_t

 === context ===
/home/meunier/lang/plt/collects/racket/draw/unsafe/pango.rkt: [running body]
/home/meunier/lang/plt/collects/racket/draw/private/font.rkt: [traversing 
imports]
/home/meunier/lang/plt/collects/racket/draw/private/post-script-dc.rkt: 
[traversing imports]
/home/meunier/lang/plt/collects/racket/draw.rkt: [traversing imports]
/home/meunier/lang/plt/collects/mred/private/kernel.rkt: [traversing imports]
/home/meunier/lang/plt/collects/mred/private/const.rkt: [traversing imports]
/home/meunier/lang/plt/collects/mred/private/check.rkt: [traversing imports]
/home/meunier/lang/plt/collects/mred/mred.rkt: [traversing imports]

Philippe


_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] up-to-date libgtk for drracket on debian stable?

2011-01-03 Thread Matthew Flatt
At Mon, 3 Jan 2011 09:05:15 -0500, Philippe Meunier wrote:
> >> Just to make things more annoying, libcairo needs libpthread:
> >> [...]
> >> so I also had to change the define-runtime-lib macro from
> >> collects/racket/draw/private/libs.rkt so that the unix case of the
> >> macro accepts multiple libraries.  I'm not sure that's the best way to
> >> go about adding libpthread though, and I'm definitely not sure that my
> >> simple change to collects/racket/draw/unsafe/cairo.rkt to add
> >> libpthread works on other platforms...
> >
> >Won't "libpthread" get loaded auomatically when "libcairo" is loaded?
> 
> Apparently not:
> 
> $ ldd /usr/local/lib/libcairo.so.11.0 | grep pthread
> 0318a000 2318e000 rlib 011   0
> /usr/X11R6/lib/libpthread-stubs.so.1.0
> $ 
> 
> So it looks like it has to be done explicitely.

That doesn't make any sense to me, but maybe it doesn't matter.

If you configure with `--enable-pthreads', does it fix the problem?
If so, we can make `--enable-pthreads' the default for OpenBSD.

_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] up-to-date libgtk for drracket on debian stable?

2011-01-04 Thread Philippe Meunier
Matthew Flatt wrote:
>If you configure with `--enable-pthreads', does it fix the problem?
>If so, we can make `--enable-pthreads' the default for OpenBSD.

--enable-pthread

Yes, it works.  Note that I still get a warning when running
configure:

[...]
=== configuring in foreign/libffi 
(/home/meunier/lang/plt/src/build/foreign/libffi)
configure: running /bin/sh ../../../foreign/libffi/configure 
'--prefix=/home/meunier/lang/plt'  '--enable-pthread' --cache-file=/dev/null 
--srcdir=../../../foreign/li
bffi
configure: WARNING: unrecognized options: --enable-pthread

but otherwise it works fine.  Interestingly, the errors I also used to
get from drracket about saving preferences are now all gone too,
though I don't know whether it's directly related or not.

Anyway, thanks a lot!

Philippe


_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev