next install roadblock

Michael T. Garrison Stuber garrisonstuber@bellsouth.net
Fri, 03 Aug 2001 22:14:15 -0400


> Thanks again for the help; just the simlink seems to work.  The *next*
> inscrutable (for me) roadblock to g-wrap's configuring:

> /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I..
> -O2 -Werror -Wall -g
       ^^^^^^
> -I../libruntime-guile -g -O2 -I/usr/local/include -c gw-test-parent.c
> rm -f .libs/gw-test-parent.lo
> gcc -DHAVE_CONFIG_H -I. -I. -I.. -O2 -Werror -Wall -g
> -I../libruntime-guile -g -O2 -I/usr/local/include -c
> -fPIC -DPIC gw-test-parent.c -o .libs/gw-test-parent.lo
> cc1: warnings being treated as errors
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> gw-test-parent.c: In function `gw_init_module_gw_test_parent':
> gw-test-parent.c:167: warning: implicit declaration of function `strcmp'
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> make[2]: *** [gw-test-parent.lo] Error 1
> make[2]: Leaving directory `/tmp/g-wrap-1.1.9/test'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/tmp/g-wrap-1.1.9'
> make: *** [all-recursive-am] Error 2
> ----------------------------------------------------

This one is actually pretty easy.  The compiler has been set to treat 
warnings as errors.  That's what that -Werror flag is doing.  The warning 
that it's complaining about is likely the result of (a) a sloppy 
programmer, (b) change in header files, or (c) failure to include the 
correct -I directories.  Basically, the source code is using a call to a 
library, but it hasn't declared what the call should look like.  Usually 
this is taken care of by including the the appropriate header file to keep 
the compiler happy.  If the programmer forgot, this can happen. 
Alternatively, if your header files are different from what the g-wrap was 
built against, this can happen because the declaration for strcmp is in a 
different file, which the source code doesn't include.  There is the 
possibility that your header files are in the normal place, but I don't 
think anything else would compile for you if that we're the case.

There are three options here:  (Okay, I'm sure there are more, but there 
are three I'll mention)
(a) figure out which header file you need (grep for strcmp in /usr/include) 
and add an #include<> to the source file.  Usually this is  in string.h. 
On my system I would add:
#include <string.h>

(b) add an extern declaration -- You really need to be able to program to 
do this correctly.

(c) turn off the -Werror switch

Personally, I'd go with option (c).  It's probably going to be the easiest. 
You'll need to grep throught the configuration files and the make files to 
figure out where this is being set.


> Again, sorry to tire all of you with a layperson's attempt--but it may
> give you programmers some insight into what we ignorati are up against.
> Some 6-8 tricky package installations down the road, I'm at least more
> than half-way toward actually running gnucash, right?!

I do program, but I didn't bother building everything from source.  Way, 
way too much hassel.  I just grabbed the packages for everything except 
GNUCash itself.  http://www.rpmfind.net is my friend.  It took a little 
doing, but it was simpler.