On Tue 06/12/11 13:56 , Eric Blake ebl...@redhat.com sent:
> There's your problem. You have to #include prior to any
> other include files, if you want gnulib's getopt replacements to work.
Thanks Eric, that worked.
May I suggest that gnulib-tool is improved to check that a) config.h is being
On 12/06/2011 04:58 AM, Mark R Bannister wrote:
> Hi,
>
> I'm banging my head against a wall here trying to port nss_db to Solaris 10.
>
> It includes a source file called makedb.c that requires argp.h and error.h.
> Incidentally it also requires a Berkeley database which I have in
> /opt/csw/bd
:
./lib/getopt.h:197: error: redefinition of `struct option'
I can only assume that the redefinition of struct option comes from the other
getopt.h, but maybe I'm barking up the wrong tree here because I can't figure
out
how that would be included in my build anyway:
$ grep get
Indeed 'make distclean' does fix this. Sorry for the noise ..
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_st
On 06/04/2010 08:05 AM, Richard W.M. Jones wrote:
>
> On Fri, Jun 04, 2010 at 03:16:38PM +0200, Bruno Haible wrote:
>> The first one is fine. The second one should not be there.
>
> Yes, I see now that gnulib/lib/getopt.h is present on the machine
> which fails and absent on the other one.
>
>>
On Fri, Jun 04, 2010 at 03:16:38PM +0200, Bruno Haible wrote:
> The first one is fine. The second one should not be there.
Yes, I see now that gnulib/lib/getopt.h is present on the machine
which fails and absent on the other one.
> Conclusion: You had a getopt.h that was necessary for one platfo
Richard W.M. Jones wrote:
> /bin/sh ../../libtool --tag=CC --mode=compile gcc -std=gnu99
> -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT xstrtol.lo -MD -MP -MF
> $depbase.Tpo -c -o xstrtol.lo xstrtol.c &&\
This command line is line.
> > 2) the contents of config.h
>
> At
99 -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -g -O2
-MT xstrtol.lo -MD -MP -MF .deps/xstrtol.Tpo -c xstrtol.c -fPIC -DPIC -o
.libs/xstrtol.o
In file included from xstrtol.h:23,
from xstrtol.c:32:
./getopt.h:195: error: redefinition of 'struct option'
[...]
> > In
t; In file included from xstrtol.h:23,
> from xstrtol.c:32:
> ./getopt.h:195: error: redefinition of 'struct option'
Next, you need to show
1) grep GETOPT config.status
2) the contents of config.h
3) if the first two don't help, also the output of the
make[4]: Entering directory `/home/rjones/d/libguestfs/gnulib/lib'
CC xstrtol.lo
In file included from xstrtol.h:23,
from xstrtol.c:32:
./getopt.h:195: error: redefinition of 'struct option'
In file included from xstrtol.h:23,
from xstrtol.c
Bruno Haible wrote:
> Bruce Korb wrote:
>> there is a bizarre
>> dependency problem that causes close-hook.c to be recompiled for me,
>> but you don't see it. Just for grins, try removing close-hook.o and
>> see if it rebuilds correctly. :-}
>> ...
>> Some more data points. sharutils-bld/lib/get
Bruce Korb wrote:
> there is a bizarre
> dependency problem that causes close-hook.c to be recompiled for me,
> but you don't see it. Just for grins, try removing close-hook.o and
> see if it rebuilds correctly. :-}
> ...
> Some more data points. sharutils-bld/lib/getopt.h gets rewritten
> somew
Hi Bruno, Eric,
Bruno Haible wrote:
> Hi Bruce,
>
>> My build procedure is to blow away the build tree, copy in the
>> repository source files and do the build. It doesn't get any cleaner.
>
> Can you give us a recipe how to reproduce it? In the worst case, you can
> do a "make distclean", tar
Bruno Haible wrote:
> Hi Bruce,
Hi Bruno, Eric,
Some more data points. sharutils-bld/lib/getopt.h gets rewritten
somewhere along the line. The first version is correct and the
initial build is successful. The second version is in error and
the new copy time stamp triggers a recompile of close-
Hi Bruce,
> My build procedure is to blow away the build tree, copy in the
> repository source files and do the build. It doesn't get any cleaner.
Can you give us a recipe how to reproduce it? In the worst case, you can
do a "make distclean", tar up your source tarball on some site and let us
in
x27;
>> gcc -DHAVE_CONFIG_H -I. -I.. -g -Wall -MT close-hook.o -MD -MP -MF
>> .deps/close-hook.Tpo -c -o close-hook.o close-hook.c
>> In file included from ./xstrtol.h:22,
>> from ../config.h:1469,
>> from close-hook.c:18:
>>
e-hook.Tpo -c -o close-hook.o close-hook.c
> In file included from ./xstrtol.h:22,
> from ../config.h:1469,
> from close-hook.c:18:
> ./getopt.h:195: error: redefinition of 'struct option'
What platform is this on? Is this a fresh bootstrap, with
trtol.h:22,
from ../config.h:1469,
from close-hook.c:18:
./getopt.h:195: error: redefinition of 'struct option'
The preprocessed source contains this text:
> # 106 "/usr/include/getopt.h" 3 4
> struct option
> {
>
18 matches
Mail list logo