[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compilation and load-extension

From: Tristan Colgate
Subject: Re: Compilation and load-extension
Date: Fri, 18 Dec 2009 13:22:35 +0000

yes, swig generates snmp/net-snmp.scm with the following header...

(define-module (snmp net-snmp))

(load-extension "" "scm_init_snmp_net_snmp_module")

(use-modules (oop goops) (Swig common))
(use-modules ((snmp net-snmp-primitive) :renamer (symbol-prefix-proc

the net-snmp_wrap.c contains...

scm_init_snmp_net_snmp_module (void)
scm_c_define_module("snmp net-snmp-primitive",
  SWIG_init_helper, NULL);

I can confirm that the correct versions of the various files are being
loaded (have confirmed via strace
previously whilst debugging other issues).

  As mentioned before, this is purely cosmetic in that the code does
actually get run and work, it is the
compilation that fails (thhough things carry on anyway)

2009/12/18 Ludovic Courtès <address@hidden>:
> Hi,
> Tristan Colgate <address@hidden> writes:
>> Ah, sorry....
>> ;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0
>> ;;;       or pass the --no-autocompile argument to disable.
>> ;;; compiling /usr/local/share/guile/site/snmp/net-snmp.scm
>> ;;; WARNING: compilation of
>> /usr/local/share/guile/site/snmp/net-snmp.scm failed:
>> ;;; key misc-error, throw args (#f "~A ~S" ("no code for module" (snmp
>> net-snmp-primitive)) #f)
>> STRING: Unknown (edit /etc/snmp/snmpd.conf)
>> STRING: pinot
>> the snmp net-snmp-primitive module is provided by a load-extension in
>> the swig wrapper module.
>> it's loaded by the module that swig has generated (snmp net-snmp)
> So does the .so that’s loaded via ‘load-extension’ calls
> ‘scm_c_define_module ()’, right?  And ‘net-snmp.scm’ does:
>  (define-module (snmp net-snmp)
>    #:export (...))
>  (load-extension ...)
>  (use-modules (snmp net-snmp-primitive))
> Right?
> Could you make sure with strace(1) or some such that the right .so gets
> loaded?
> Thanks,
> Ludo’.

Tristan Colgate-McFarlane
  "You can get all your daily vitamins from 52 pints of guiness, and a
glass of milk"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]