unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* ossaulib dbus error
@ 2014-07-22 16:00 Max
  2014-07-22 16:23 ` Neil Jerram
  0 siblings, 1 reply; 10+ messages in thread
From: Max @ 2014-07-22 16:00 UTC (permalink / raw)
  To: guile-user, Neil Jerram

Hi.

I'm trying to use dbus from ossaulib (as far as I recall it's the only dbus library
for guile which is still alive) but got errors from the very beginning:
_____
(set! %load-path (append %load-path '("/home/lol/source/ossaulib/")))

(use-modules (oop goops) (gnome gobject) (gnome glib) (gnome gtk) (glib dbus) (os
process) (gnome gobject utils))
_____


guile-gnome-2 dbus-test.scm

;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/god/source/lisp/dbus-test.scm
;;; WARNING: compilation of /home/god/source/lisp/dbus-test.scm failed:
;;; ERROR: no code for module (glib dbus)

Any ideas why guile does not see it?

I've checked ossaulib/ and glib/dbus.scm is right there.

cheers,
Max.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ossaulib dbus error
  2014-07-22 16:00 ossaulib dbus error Max
@ 2014-07-22 16:23 ` Neil Jerram
  2014-07-22 16:39   ` Max
  0 siblings, 1 reply; 10+ messages in thread
From: Neil Jerram @ 2014-07-22 16:23 UTC (permalink / raw)
  To: Max; +Cc: guile-user

On 2014-07-22 17:00, Max wrote:
> Hi.
> 
> I'm trying to use dbus from ossaulib (as far as I recall it's the only
> dbus library
> for guile which is still alive) but got errors from the very beginning:
> _____
> (set! %load-path (append %load-path '("/home/lol/source/ossaulib/")))
> 
> (use-modules (oop goops) (gnome gobject) (gnome glib) (gnome gtk)
> (glib dbus) (os
> process) (gnome gobject utils))
> _____
> 
> 
> guile-gnome-2 dbus-test.scm
> 
> ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
> ;;;       or pass the --no-auto-compile argument to disable.
> ;;; compiling /home/god/source/lisp/dbus-test.scm
> ;;; WARNING: compilation of /home/god/source/lisp/dbus-test.scm failed:
> ;;; ERROR: no code for module (glib dbus)
> 
> Any ideas why guile does not see it?
> 
> I've checked ossaulib/ and glib/dbus.scm is right there.

You're clearly also using guile-gnome.  I wonder if there's also a (glib 
...) hierarchy provided by guile-gnome, and if that might be conflicting 
with the (glib ...) modules in ossaulib?

You could try renaming the "glib" directory in ossaulib to something 
else, and correspondingly replacing (glib ...) throughout the ossaulib 
source.  If there is a conflict with guile-gnome, that should avoid it.

Regards,
      Neil




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ossaulib dbus error
  2014-07-22 16:23 ` Neil Jerram
@ 2014-07-22 16:39   ` Max
  2014-07-22 17:05     ` Neil Jerram
  0 siblings, 1 reply; 10+ messages in thread
From: Max @ 2014-07-22 16:39 UTC (permalink / raw)
  To: Neil Jerram; +Cc: guile-user

I've copied glib/ to neil/, replaced all the instances of glib with neil (except for
libglib of course :) and tried to use (neil dbus) but the result is exactly the same
- ERROR: no code for module (neil dbus)

Can you try it on your machine alongside with guile-gnome?

22.07.2014 18:23, Neil Jerram пишет:
>
> You're clearly also using guile-gnome.  I wonder if there's also a (glib ...)
> hierarchy provided by guile-gnome, and if that might be conflicting with the (glib
> ...) modules in ossaulib?
>
> You could try renaming the "glib" directory in ossaulib to something else, and
> correspondingly replacing (glib ...) throughout the ossaulib source.  If there is a
> conflict with guile-gnome, that should avoid it.
>
> Regards,
>      Neil
>
>




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ossaulib dbus error
  2014-07-22 16:39   ` Max
@ 2014-07-22 17:05     ` Neil Jerram
  2014-07-22 18:46       ` Max
  0 siblings, 1 reply; 10+ messages in thread
From: Neil Jerram @ 2014-07-22 17:05 UTC (permalink / raw)
  To: Max; +Cc: guile-user

On 2014-07-22 17:39, Max wrote:
> I've copied glib/ to neil/, replaced all the instances of glib with
> neil (except for
> libglib of course :) and tried to use (neil dbus) but the result is
> exactly the same
> - ERROR: no code for module (neil dbus)

OK, sorry to take your time on that attempt.

What if you do "guile --debug test.scm" where test.scm has just the 
load-path appending and (use-modules (glib dbus)) ?  If that still 
doesn't work, then clearly this is nothing to do with guile-gnome.

Could it be that one or more of the calls like (dynamic-link 
"libgio-2.0") are failing?  These are executed during module loading, 
and I think could cause the "no code" error if they throw an exception.  
To allow these calls to succeed, you need to have installed the -dev or 
-devel package that provides <name>.so; e.g. the libglib2.0-dev package 
(on Debian) for libgio-2.0.so.

> Can you try it on your machine alongside with guile-gnome?

I can try that later this evening.  Right now I'm afraid I'm not at the 
right computer for that.

Regards,
      Neil




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ossaulib dbus error
  2014-07-22 17:05     ` Neil Jerram
@ 2014-07-22 18:46       ` Max
  2014-07-23  8:59         ` Neil Jerram
  0 siblings, 1 reply; 10+ messages in thread
From: Max @ 2014-07-22 18:46 UTC (permalink / raw)
  To: Neil Jerram; +Cc: guile-user

22.07.2014 19:05, Neil Jerram пишет:
> On 2014-07-22 17:39, Max wrote:
>>
>
> OK, sorry to take your time on that attempt.
>
> What if you do "guile --debug test.scm" where test.scm has just the load-path
> appending and (use-modules (glib dbus)) ?  If that still doesn't work, then clearly
> this is nothing to do with guile-gnome.

Sure thing - this is my test file:

(set! %load-path (append %load-path '("/home/lol/source/lisp/ossaulib/")))
(use-modules (neil dbus))

Here is the compilation results:

guile-gnome-2 --debug
dbus-test.scm                                                                           
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/lol/source/lisp/dbus-test.scm
;;; WARNING: compilation of /home/lol/source/lisp/dbus-test.scm failed:
;;; ERROR: no code for module (neil dbus)

Changing "neil" to "glib" only changes the name in the error message above. I'd
appreciate any hints with debugging. Do you have some small test application I can use?
>
> Could it be that one or more of the calls like (dynamic-link "libgio-2.0") are
> failing?  These are executed during module loading, and I think could cause the "no
> code" error if they throw an exception.  To allow these calls to succeed, you need
> to have installed the -dev or -devel package that provides <name>.so; e.g. the
> libglib2.0-dev package (on Debian) for libgio-2.0.so.

I've installed libgio2.0-cil-dev just in case (already got libglib2.0-dev installed
before on my ubuntu) - no effects.

>
>> Can you try it on your machine alongside with guile-gnome?
>
> I can try that later this evening.  Right now I'm afraid I'm not at the right
> computer for that.

Neat, thanks.
Max.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ossaulib dbus error
  2014-07-22 18:46       ` Max
@ 2014-07-23  8:59         ` Neil Jerram
  2014-07-23 12:00           ` Max
  2014-07-24 14:33           ` Max
  0 siblings, 2 replies; 10+ messages in thread
From: Neil Jerram @ 2014-07-23  8:59 UTC (permalink / raw)
  To: Max; +Cc: guile-user

On 2014-07-22 19:46, Max wrote:
> 22.07.2014 19:05, Neil Jerram пишет:
>> On 2014-07-22 17:39, Max wrote:
>>> 
>> 
>> OK, sorry to take your time on that attempt.
>> 
>> What if you do "guile --debug test.scm" where test.scm has just the 
>> load-path
>> appending and (use-modules (glib dbus)) ?  If that still doesn't work, 
>> then clearly
>> this is nothing to do with guile-gnome.
> 
> Sure thing - this is my test file:
> 
> (set! %load-path (append %load-path 
> '("/home/lol/source/lisp/ossaulib/")))
> (use-modules (neil dbus))
> 
> Here is the compilation results:
> 
> guile-gnome-2 --debug
> dbus-test.scm
> 
> ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
> ;;;       or pass the --no-auto-compile argument to disable.
> ;;; compiling /home/lol/source/lisp/dbus-test.scm
> ;;; WARNING: compilation of /home/lol/source/lisp/dbus-test.scm failed:
> ;;; ERROR: no code for module (neil dbus)
> 
> Changing "neil" to "glib" only changes the name in the error message 
> above. I'd
> appreciate any hints with debugging. Do you have some small test
> application I can use?

Just remembered / worked this out.  The problem is that %load-path isn't 
extended when dbus-test.scm is being compiled, and the solution for that 
is to use 'eval-when'.  Here's my test script, showing the use of 
eval-when:

(eval-when (expand load eval)
   (set! %load-path (append %load-path '("/home/neil/ossaulib"))))
(use-modules (glib dbus))

Regards,
      Neil




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ossaulib dbus error
  2014-07-23  8:59         ` Neil Jerram
@ 2014-07-23 12:00           ` Max
  2014-07-24 14:33           ` Max
  1 sibling, 0 replies; 10+ messages in thread
From: Max @ 2014-07-23 12:00 UTC (permalink / raw)
  To: Neil Jerram; +Cc: guile-user

Excellent - works like a charm, thank you!

23.07.2014 10:59, Neil Jerram пишет:
>
> Just remembered / worked this out.  The problem is that %load-path isn't extended
> when dbus-test.scm is being compiled, and the solution for that is to use
> 'eval-when'.  Here's my test script, showing the use of eval-when:
>
> (eval-when (expand load eval)
>   (set! %load-path (append %load-path '("/home/neil/ossaulib"))))
> (use-modules (glib dbus))
>
> Regards,
>      Neil
>
>




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ossaulib dbus error
  2014-07-23  8:59         ` Neil Jerram
  2014-07-23 12:00           ` Max
@ 2014-07-24 14:33           ` Max
  2014-07-29  9:05             ` Neil Jerram
  1 sibling, 1 reply; 10+ messages in thread
From: Max @ 2014-07-24 14:33 UTC (permalink / raw)
  To: Neil Jerram; +Cc: guile-user

When I set GUILE_WARN_DEPRECATED to "detailed" I got warning that "Eval closures are
deprecated".
Is this related to eval-when workaround? If so - what would be relevant solution?

cheers,
Max.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ossaulib dbus error
  2014-07-24 14:33           ` Max
@ 2014-07-29  9:05             ` Neil Jerram
  2014-07-29 18:53               ` David Pirotte
  0 siblings, 1 reply; 10+ messages in thread
From: Neil Jerram @ 2014-07-29  9:05 UTC (permalink / raw)
  To: Max; +Cc: guile-user

On 2014-07-24 15:33, Max wrote:
> When I set GUILE_WARN_DEPRECATED to "detailed" I got warning that
> "Eval closures are
> deprecated".
> Is this related to eval-when workaround? If so - what would be
> relevant solution?

No, I don't think this is related to eval-when.  I believe an eval 
closure is what guile-gnome uses to lazily bind Scheme procedure names 
to the relevant underlying C code.  Perhaps David Pirotte might comment 
more on that, as he is working a lot with guile-gnome now.

Regards,
       Neil




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ossaulib dbus error
  2014-07-29  9:05             ` Neil Jerram
@ 2014-07-29 18:53               ` David Pirotte
  0 siblings, 0 replies; 10+ messages in thread
From: David Pirotte @ 2014-07-29 18:53 UTC (permalink / raw)
  To: Neil Jerram; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]

Hi Neil,
Mark,

	note that, for info, there is no glib hierarchy in guile-gnome, but a (gnome
	glib) module 'only'

> On 2014-07-24 15:33, Max wrote:
> > When I set GUILE_WARN_DEPRECATED to "detailed" I got warning that
> > "Eval closures are deprecated". Is this related to eval-when workaround? If so -
> > what would be relevant solution?

> No, I don't think this is related to eval-when.  I believe an eval 
> closure is what guile-gnome uses to lazily bind Scheme procedure names 
> to the relevant underlying C code.  Perhaps David Pirotte might comment 
> more on that, as he is working a lot with guile-gnome now.

I am indeed working on guile-gnome, but it's still is a learning process, there is
a lot I don't know yet, both about gnome and the guile-gnome bindings, so always take
what I say/write with caution.

I hope a release comes out in ... I don't know when yet, don't hold your breath!

If you're willing to help though, you could check out, the guile-gnome devel branch
I'm working on: note that I still have to push all patches I submitted for review,
but here I don't have any deprecated messages anymore.

Also note that [Mark] I send patches for review to guile-devel [not guile-user]. I
should push them soon now, as soon as the help I required with the last one comes
out...

Cheers,
David

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 173 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-07-29 18:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-22 16:00 ossaulib dbus error Max
2014-07-22 16:23 ` Neil Jerram
2014-07-22 16:39   ` Max
2014-07-22 17:05     ` Neil Jerram
2014-07-22 18:46       ` Max
2014-07-23  8:59         ` Neil Jerram
2014-07-23 12:00           ` Max
2014-07-24 14:33           ` Max
2014-07-29  9:05             ` Neil Jerram
2014-07-29 18:53               ` David Pirotte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).