[FSF India] Re: [Gnu-India]gnuyahoo(cvs version) compiling problem

M.P.Anand Babu fsf-india@gnu.org.in
12 Sep 2001 06:25:19 -0700


Thanks nikunj,
Updated the code. Now gnuyahoo is tested for guile-1.5.2 !!

Next time when u create a patch use the following command

# ls 
  gnuyahoo
  gnuyahoo-hacked
# diff -ruN gnuyahoo gnuyahoo-hacked > patch

then as u did, mail me the patch as inline mail message
with subject: 
  [PATCH:gnuyahoo] actual subject

best regards
ab

nikunj@gmx.net (Nikunj A. Dadhania) writes:
> Hi,
> 
> Gnuyahoo doesn't compile for me. I m using guile-1.4. 
> 
> 
> gcc -DHAVE_CONFIG_H -I. -I. -I. -I.    -Wall -O2 -g -O2 -c gy-guile.c
> gy-guile.c: In function `install_new_hooks':
> gy-guile.c:69: warning: implicit declaration of function `scm_make_named_hook'
> gcc -DHAVE_CONFIG_H -I. -I. -I. -I.    -Wall -O2 -g -O2 -c guile-wrapper.c
> gcc  -Wall -O2 -g -O2  -o gnuyahoo  gnuyahoo.o yahoo-wrapper.o interpreter.o gy-utils.o scm-procedures.o messenger.o gy-guile.o guile-wrapper.o -Llibyahoo -lyahoo -lguile -lqthreads -lreadline
> gy-guile.o: In function `install_new_hooks':
> /home/nikunj/work/cvs/gnuyahoo/gy-guile.c:68: undefined reference to `scm_make_named_hook'
> /home/nikunj/work/cvs/gnuyahoo/gy-guile.c:83: undefined reference to `scm_make_named_hook'
> collect2: ld returned 1 exit status
> make: *** [gnuyahoo] Error 1
> 
> 
> NOTE: 
> ------------------------------------------------------------
> guile/guile-core/NEWS
> 
> ** Deprecated function: scm_make_named_hook
> 
> It is now replaced by:
> 
> ** New function: SCM scm_create_hook (const char *name, int arity)
> 
> Creates a hook in the same way as make-hook above but also
> binds a variable named NAME to it.
> 
> This is the typical way of creating a hook from C code.
> 
> Currently, the variable is created in the "current" module.
> This might change when we get the new module system.
> 
> [The behaviour is identical to scm_make_named_hook.]
> -------------------------------------------------------------------
> 
> So i have replaced scm_make_named_hook with scm_create_hook
> 
> With the patch below i am able to compile gnuyahoo. but it fails to 
> start :(
> 
> (here is the output)
> Initializing yahoo connection ...done
> Connecting to Yahoo ...done
> [ndadhania] logging in [I'm Available] mode ...failed
> 
> 
> [patch]
> 
> --- gy-guile.orig.c	Mon Sep 10 19:03:57 2001
> +++ gy-guile.c	Mon Sep 10 19:04:24 2001
> @@ -66,7 +66,7 @@
>     */
>  
>    gy_message_receive_hook =
> -    scm_make_named_hook ("gy-message-receive-hook", 2);
> +    scm_create_hook ("gy-message-receive-hook", 2);
>    /* hook: gy-message-receive-hook
>  
>       is called from
> @@ -80,7 +80,7 @@
>       (add-hook! gy-message-receive-hook (lambda (from message) (do-something)))
>     */
>  
> -  gy_message_send_hook = scm_make_named_hook ("gy-message-send-hook", 2);
> +  gy_message_send_hook = scm_create_hook ("gy-message-send-hook", 2);
>    /* hook: gy-message-send-hook
>  
>       is called from
-- 
Inspired by GNU