bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] build failure on Android


From: Bruno Haible
Subject: [Bug-tar] build failure on Android
Date: Tue, 29 Jan 2019 02:48:45 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-141-generic; KDE/5.18.0; x86_64; ; )

Hi,

Building GNU tar (newest sources from git, with newest gnulib) on
Android 4.3 fails:

  CC       wordsplit.o
../../lib/wordsplit.c:29:18: error: glob.h: No such file or directory
../../lib/wordsplit.c: In function 'wordsplit_pathexpand':
../../lib/wordsplit.c:1807: error: 'glob_t' undeclared (first use in this 
function)
../../lib/wordsplit.c:1807: error: (Each undeclared identifier is reported only 
once
../../lib/wordsplit.c:1807: error: for each function it appears in.)
../../lib/wordsplit.c:1807: error: expected ';' before 'g'
../../lib/wordsplit.c:1817: warning: implicit declaration of function 'glob'
../../lib/wordsplit.c:1817: error: 'g' undeclared (first use in this function)
../../lib/wordsplit.c:1823: error: 'GLOB_NOSPACE' undeclared (first use in this 
function)
../../lib/wordsplit.c:1827: error: 'GLOB_NOMATCH' undeclared (first use in this 
function)
../../lib/wordsplit.c:1874: warning: implicit declaration of function 'globfree'
make[3]: *** [wordsplit.o] Error 1

The reason is that Android libc (Bionic) does not have the glob() facility.
See https://www.gnu.org/software/gnulib/manual/html_node/glob.html .

The fix is simple: use the replacement from gnulib. With this patch, the
compilation succeeds and most of the tests pass:

diff --git a/gnulib.modules b/gnulib.modules
index 03e01f3..ee78e94 100644
--- a/gnulib.modules
+++ b/gnulib.modules
@@ -51,6 +51,7 @@ getpagesize
 gettext
 gettime
 gitlog-to-changelog
+glob
 hash
 human
 inttostr




reply via email to

[Prev in Thread] Current Thread [Next in Thread]