Discussion:
glob.h and glob.c for the Android NDK
JM Krishna
2012-03-16 04:53:39 UTC
Permalink
Hi,
I am not able to download glob.c and glob.h files.
Links provided are not working.Can u please provide the files.
Thanks in advance.
Regards,
JMKrishna
glob.h and glob.c are not included in the Android NDK, and a bunch of
http://groups.google.com/group/android-ndk/browse_thread/thread/26bd9c02574aa033/
http://groups.google.com/group/android-ndk/browse_thread/thread/8f17b42525b9c3fa/
I massaged a FreeBSD glob.c/glob.h into something that compiles onto
Android. (Thx to David Turner who provided me with the original
files.)
http://www.gaborcselle.com/open_source/android/ndk/glob/glob.c
http://www.gaborcselle.com/open_source/android/ndk/glob/glob.h
Hope you find these useful.
Gabor
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/RQFErYlcQAIJ.
To post to this group, send email to android-***@googlegroups.com.
To unsubscribe from this group, send email to android-ndk+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
white_gecko
2012-03-17 18:24:14 UTC
Permalink
Hi,
I have adopted a version of glob.h and glob.c from FreeBSD to compile for
Android. You can find them in my github:
https://github.com/white-gecko/TokyoCabinet

https://github.com/white-gecko/TokyoCabinet/raw/master/glob.c
and
https://github.com/white-gecko/TokyoCabinet/raw/master/glob.h

Nate
Post by JM Krishna
Hi,
I am not able to download glob.c and glob.h files.
Links provided are not working.Can u please provide the files.
Thanks in advance.
Regards,
JMKrishna
glob.h and glob.c are not included in the Android NDK, and a bunch of
http://groups.google.com/group/android-ndk/browse_thread/thread/26bd9c02574aa033/
http://groups.google.com/group/android-ndk/browse_thread/thread/8f17b42525b9c3fa/
I massaged a FreeBSD glob.c/glob.h into something that compiles onto
Android. (Thx to David Turner who provided me with the original
files.)
http://www.gaborcselle.com/open_source/android/ndk/glob/glob.c
http://www.gaborcselle.com/open_source/android/ndk/glob/glob.h
Hope you find these useful.
Gabor
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/bkF9f0zFSRwJ.
To post to this group, send email to android-***@googlegroups.com.
To unsubscribe from this group, send email to android-ndk+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
Yuri Andronachi
2012-10-30 10:10:43 UTC
Permalink
And where should i put them?
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/fsSgjFe87gYJ.
To post to this group, send email to android-***@googlegroups.com.
To unsubscribe from this group, send email to android-ndk+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
e***@gmail.com
2013-08-01 10:02:29 UTC
Permalink
Just wanted to update this thread with some information on how I solved it
for libxml2.
I downloaded glob.c/.h from white_gecko above and put them in my lib's top
folder before compiling glob.c using the arm gcc compiler:

$ arm-linux-androideabi-gcc -c -I. glob.c

Then I changed the .o file to be world-executable (chmod +x glob.o) and
added it to my LIBS env variable (export LIBS=/tmp/libxml2/glob.o).
I then ran ./configure again (according to
http://mortoray.com/2012/08/21/android-ndk-cross-compile-setup-libpng-and-freetype/)
and compiled it using "make".
Compiling and tests worked fine after this (before "runtests" would fail
beacuse of missing glob.c/.h).

Thanks white_gecko for the glob files!

Regards,
Erik
Post by Yuri Andronachi
And where should i put them?
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk.
For more options, visit https://groups.google.com/groups/opt_out.
Stephan Hagios
2013-10-07 12:09:56 UTC
Permalink
I also try to compile libxml2 for Android, but it doesn't work for me.
It stops at the configure part, saying that the C compiler isn't working.

Erik it would be nice if you can provide the compiled libxml2 binaries.

Greetings
Stephan
Post by e***@gmail.com
Just wanted to update this thread with some information on how I solved it
for libxml2.
I downloaded glob.c/.h from white_gecko above and put them in my lib's top
$ arm-linux-androideabi-gcc -c -I. glob.c
Then I changed the .o file to be world-executable (chmod +x glob.o) and
added it to my LIBS env variable (export LIBS=/tmp/libxml2/glob.o).
I then ran ./configure again (according to
http://mortoray.com/2012/08/21/android-ndk-cross-compile-setup-libpng-and-freetype/)
and compiled it using "make".
Compiling and tests worked fine after this (before "runtests" would fail
beacuse of missing glob.c/.h).
Thanks white_gecko for the glob files!
Regards,
Erik
Post by Yuri Andronachi
And where should i put them?
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk.
For more options, visit https://groups.google.com/groups/opt_out.
Jeffrey Walton
2013-10-07 17:30:02 UTC
Permalink
On Mon, Oct 7, 2013 at 8:09 AM, Stephan Hagios
Post by Stephan Hagios
I also try to compile libxml2 for Android, but it doesn't work for me.
It stops at the configure part, saying that the C compiler isn't working.
Yeah, configure tries to execute the ARM binary (target) on my local
machine (host). That won't work.

Does anyone know how to make aututools recognize its a cross compile?
`./configure --host=arm` does not seem work as expected/advertised:

$ echo $PATH
/opt/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin:/opt/android-sdk-macosx/tools/:/opt/android-sdk-macosx/platform-tools/:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/MacGPG2/bin


$ echo $ANDROID_NDK_ROOT
/opt/android-ndk-r9


$ export CPP=arm-linux-androideabi-cpp
$ export CC=arm-linux-androideabi-gcc
...
$ export LD=arm-linux-androideabi-ld


$ echo $ANDROID_SYSROOT
--sysroot=/opt/android-ndk-r9/platforms/android-14/arch-arm
$ export CFLAGS="--sysroot=$ANDROID_SYSROOT"
$ export CXXFLAGS="--sysroot=$ANDROID_SYSROOT"
...


$ ./configure --host=arm
checking build system type... i386-apple-darwin12.5.0
checking host system type... arm-unknown-none
...
checking how to run the C preprocessor... arm-linux-androideabi-cpp
configure: error: in `/Users/jwalton/Desktop/libxml2-2.9.1':
configure: error: C preprocessor "arm-linux-androideabi-cpp" fails sanity check
See `config.log' for more details


$ cat config.log
...
configure:3612: checking whether we are cross compiling
configure:3620: arm-linux-androideabi-gcc -o conftest
--sysroot=/opt/android-ndk-r9/platforms/android-14/arch-arm
conftest.c >&5
configure:3624: $? = 0
configure:3631: ./conftest
./configure: line 3633: ./conftest: cannot execute binary file
configure:3635: $? = 126
configure:3642: error: in `/Users/jwalton/Desktop/libxml2-2.9.1':
configure:3644: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.

And sorry to jump in. I've been meaning to cross compile libxml for my
projects, and it seemed like a good time.

Jeff
Post by Stephan Hagios
Post by e***@gmail.com
Just wanted to update this thread with some information on how I solved it
for libxml2.
I downloaded glob.c/.h from white_gecko above and put them in my lib's top
$ arm-linux-androideabi-gcc -c -I. glob.c
Then I changed the .o file to be world-executable (chmod +x glob.o) and
added it to my LIBS env variable (export LIBS=/tmp/libxml2/glob.o).
I then ran ./configure again (according to
http://mortoray.com/2012/08/21/android-ndk-cross-compile-setup-libpng-and-freetype/)
and compiled it using "make".
Compiling and tests worked fine after this (before "runtests" would fail
beacuse of missing glob.c/.h).
Thanks white_gecko for the glob files!
Regards,
Erik
Post by Yuri Andronachi
And where should i put them?
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk.
For more options, visit https://groups.google.com/groups/opt_out.
e***@gmail.com
2013-10-07 19:43:27 UTC
Permalink
Hi Stephan,

I don't have the binary available anymore. However, I think you might be
able to follow the instructions (some reverse engineering of PATHs might be
necessary) on the link below to compile libxml2 for Android.
https://github.com/mapnik/mapnik-packaging/blob/master/osx/scripts/build_core_deps.sh#L78
Though, I haven't tested my self I am pretty sure the author got it working
with the Android NDK.

Regards,
Erik
Post by Stephan Hagios
I also try to compile libxml2 for Android, but it doesn't work for me.
It stops at the configure part, saying that the C compiler isn't working.
Erik it would be nice if you can provide the compiled libxml2 binaries.
Greetings
Stephan
Post by e***@gmail.com
Just wanted to update this thread with some information on how I solved
it for libxml2.
I downloaded glob.c/.h from white_gecko above and put them in my lib's
$ arm-linux-androideabi-gcc -c -I. glob.c
Then I changed the .o file to be world-executable (chmod +x glob.o) and
added it to my LIBS env variable (export LIBS=/tmp/libxml2/glob.o).
I then ran ./configure again (according to
http://mortoray.com/2012/08/21/android-ndk-cross-compile-setup-libpng-and-freetype/)
and compiled it using "make".
Compiling and tests worked fine after this (before "runtests" would fail
beacuse of missing glob.c/.h).
Thanks white_gecko for the glob files!
Regards,
Erik
Post by Yuri Andronachi
And where should i put them?
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk.
For more options, visit https://groups.google.com/groups/opt_out.
Stephan Hagios
2013-10-08 09:01:10 UTC
Permalink
Hey Erik,

thank you for the link, helped me a lot.
Now I was able to build libxml2 for Android.
I created a Script <https://gist.github.com/EarlOfEgo/6881748> which worked
for me.

Greetings
Stephan
Post by e***@gmail.com
Hi Stephan,
I don't have the binary available anymore. However, I think you might be
able to follow the instructions (some reverse engineering of PATHs might be
necessary) on the link below to compile libxml2 for Android.
https://github.com/mapnik/mapnik-packaging/blob/master/osx/scripts/build_core_deps.sh#L78
Though, I haven't tested my self I am pretty sure the author got it
working with the Android NDK.
Regards,
Erik
Post by Stephan Hagios
I also try to compile libxml2 for Android, but it doesn't work for me.
It stops at the configure part, saying that the C compiler isn't working.
Erik it would be nice if you can provide the compiled libxml2 binaries.
Greetings
Stephan
Post by e***@gmail.com
Just wanted to update this thread with some information on how I solved
it for libxml2.
I downloaded glob.c/.h from white_gecko above and put them in my lib's
$ arm-linux-androideabi-gcc -c -I. glob.c
Then I changed the .o file to be world-executable (chmod +x glob.o) and
added it to my LIBS env variable (export LIBS=/tmp/libxml2/glob.o).
I then ran ./configure again (according to
http://mortoray.com/2012/08/21/android-ndk-cross-compile-setup-libpng-and-freetype/)
and compiled it using "make".
Compiling and tests worked fine after this (before "runtests" would fail
beacuse of missing glob.c/.h).
Thanks white_gecko for the glob files!
Regards,
Erik
Post by Yuri Andronachi
And where should i put them?
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk.
For more options, visit https://groups.google.com/groups/opt_out.
Luca Weiss
2016-10-09 19:29:11 UTC
Permalink
If anybody here finds this: The link ***@gmail.com posted is broken and
now https://github.com/mapnik/mapnik-packaging/blob/master/osx/scripts/build_libxml2.sh
glob.h and glob.c are not included in the Android NDK, and a bunch of
http://groups.google.com/group/android-ndk/browse_thread/thread/26bd9c02574aa033/
http://groups.google.com/group/android-ndk/browse_thread/thread/8f17b42525b9c3fa/
I massaged a FreeBSD glob.c/glob.h into something that compiles onto
Android. (Thx to David Turner who provided me with the original
files.)
http://www.gaborcselle.com/open_source/android/ndk/glob/glob.c
http://www.gaborcselle.com/open_source/android/ndk/glob/glob.h
Hope you find these useful.
Gabor
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/2fb913d7-bb9b-424f-a924-ff9097f7758f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
xinfa tang
2018-08-11 11:50:53 UTC
Permalink
Update NDK to r17-beta2, set API Level to 28, glob's problem is fixed.

圚 2011幎3月4日星期五 UTC+8䞊午4:09:20Gabor Cselle写道
glob.h and glob.c are not included in the Android NDK, and a bunch of
http://groups.google.com/group/android-ndk/browse_thread/thread/26bd9c02574aa033/
http://groups.google.com/group/android-ndk/browse_thread/thread/8f17b42525b9c3fa/
I massaged a FreeBSD glob.c/glob.h into something that compiles onto
Android. (Thx to David Turner who provided me with the original
files.)
http://www.gaborcselle.com/open_source/android/ndk/glob/glob.c
http://www.gaborcselle.com/open_source/android/ndk/glob/glob.h
Hope you find these useful.
Gabor
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/e3db19c0-dcc4-4ef6-9b73-c4ad2de64e6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Dan Albert' via android-ndk
2018-08-13 04:18:39 UTC
Permalink
But note that your minSdkVersion will then be 28.
Post by xinfa tang
Update NDK to r17-beta2, set API Level to 28, glob's problem is fixed.
圚 2011幎3月4日星期五 UTC+8䞊午4:09:20Gabor Cselle写道
glob.h and glob.c are not included in the Android NDK, and a bunch of
http://groups.google.com/group/android-ndk/browse_thread/thread/26bd9c02574aa033/
http://groups.google.com/group/android-ndk/browse_thread/thread/8f17b42525b9c3fa/
I massaged a FreeBSD glob.c/glob.h into something that compiles onto
Android. (Thx to David Turner who provided me with the original
files.)
http://www.gaborcselle.com/open_source/android/ndk/glob/glob.c
http://www.gaborcselle.com/open_source/android/ndk/glob/glob.h
Hope you find these useful.
Gabor
--
You received this message because you are subscribed to the Google Groups
"android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-ndk/e3db19c0-dcc4-4ef6-9b73-c4ad2de64e6e%40googlegroups.com
<https://groups.google.com/d/msgid/android-ndk/e3db19c0-dcc4-4ef6-9b73-c4ad2de64e6e%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAFVaGhtQpFvdTZkRg8_KKSkpA7Qbraitg-o%2BngXLdK7gB9ZxCw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...