> -----Original Message-----
> From: uClibc [mailto:[email protected]] On Behalf Of Rich Felker
> Sent: 04 February 2015 17:26
> To: [email protected]
> Subject: Re: [PATCH] ARC: Add GNU glob to ARC defconfigs
> 
> On Wed, Feb 04, 2015 at 03:34:51PM +0300, Anton Kolesov wrote:
> > GNU glob is required by make.
> 
> Could you clarify this claim? GNU make works fine on musl and we don't
> have GNU glob. If there's some incompatibility with the uclibc glob
> implementation it could probably be fixed by a tiny improvement to
> uclibc rather than just replacing yet another part of uclibc with
> glibc code by default...

I had a compilation error when building make with uClibc without GNU glob:
-------->8--------
dir.c: In function 'dir_setup_glob':
dir.c:1225:5: error: 'glob_t' has no member named 'gl_opendir'
   gl->gl_opendir = open_dirstream;
     ^
dir.c:1226:5: error: 'glob_t' has no member named 'gl_readdir'
   gl->gl_readdir = read_dirstream;
     ^
dir.c:1227:5: error: 'glob_t' has no member named 'gl_closedir'
   gl->gl_closedir = ansi_free;
     ^
dir.c:1228:5: error: 'glob_t' has no member named 'gl_stat'
   gl->gl_stat = local_stat;
     ^
-------->8--------

Enabling GNU glob resolved my troubles. 

Now I've looked into more details of error cause and what happens is that those 
fields (gl_opendir, gl_readdir, gl_closedir, gl_stat) in glob_t in 
uclibc/include/glob.h are surrounded by "#ifdef __UCLIBC_HAS_GNU_GLOB__". 
"Make" might be built without GNU glob on target system because it contains its 
own copy in source tree and uses it when it detects that target system doesn’t 
have GNU glob. However the way it checks for GNU glob is not compatible with 
uClibc, because make/configure checks for " _GNU_GLOB_INTERFACE_VERSION == 1" 
as an indicator that GNU glob is present, but uclibc/gnu-versions.h defines 
_GNU_GLOB_INTERFACE_VERSION as 1 regardless of whether GNU glob is present in 
configuration. Thus make/configure decides that GNU glob is present when it is 
not, which causes further compilation error.

I also has been told that arcv2_defconfig file is not yet present in upstream 
uClibc repository, so only "defconfig" is applicable.

Anton

> 
> Rich
> _______________________________________________
> uClibc mailing list
> [email protected]
> http://lists.busybox.net/mailman/listinfo/uclibc
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to