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

From: Philippe Meunier (meunier at ccs.neu.edu)
Date: Mon Jan 3 09:05:15 EST 2011

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 0    11   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




Posted on the dev mailing list.