libc6-dev changes (was Re: undefined reference on xfstools)
hello,
On Feb 18, 4:28am, Mike Brancato wrote:
> Subject: undefined reference on xfstools
> /usr/src/linux-2.4-xfs/cmd/xfsprogs/repair/xfs_repair.c:287: undefined
> reference to `va_start'
>
> i've tried patching 2.4.1 with both the patches from Feb 6th, and chcking
> out the linux-2.4-xfs tree. all produce an undefined reference to
> "va_start" and "va_end" in some files.
>
> this is a debian unstable/sid machine. any clues? i've been back and
> forth ont he project site, can't find it. toss me a URL if you can.
I too am using the debian unstable distribution, but I don't
have the problem you're seeing. You'll find va_start and va_end
come from stdarg.h, which is included via stdio.h, which is
included via xfsprogs/include/platform_defs.h, which is included
via xfsprogs/include/libxfs.h, which is included by xfs_repair.c
directly.
10:47 nathans@troppo ~ 20> dpkg --search /usr/include/stdio.h
libc6-dev: /usr/include/stdio.h
10:49 nathans@troppo ~ 21> dpkg --search stdarg.h
gcc-2.95: /usr/lib/gcc-lib/i386-linux/2.95.3/include/stdarg.h
kgcc: /usr/lib/gcc-lib/i386-glibc21-linux/egcs-2.91.66/include/stdarg.h
10:49 nathans@troppo ~ 22>
I guess we might have different versions of either libc6-dev
or gcc installed?
Ahh - I've just done an apt-get upgrade & now things blow up.
It looks like stdio.h has changed from something like this...
# ifndef __USE_XOPEN
# define __need___va_list
# endif
# include <stdarg.h>
(which unconditionally included stdarg.h), to this...
#ifdef __USE_XOPEN
# ifdef __GNUC__
# ifndef _VA_LIST_DEFINED
typedef _G_va_list va_list;
# define _VA_LIST_DEFINED
# endif
# else
# include <stdarg.h>
# endif
#endif
which no longer includes stdarg.h all the time.
oh, well - that's easily fixed - looks like our tools should
have been including stdarg.h directly anyway. I'll put a fix
in shortly.
thanks!
ps: I imagine this change might cause breakage in other
Debian packages, so I'll CC debian-devel. I'm not sure
exactly when this libc6-dev change happened since I hadn't
upgraded for a few weeks now.
--
Nathan
Reply to: