Android OS Forum banner
1 - 4 of 4 Posts

·
Android Beginner
Joined
·
9 Posts
Discussion Starter · #1 ·
Hi,
I am trying to compile bash from source on android.
I am using the pre-built tool chain that comes with android for cross-compiling.
I am using this command

Code:
export CC=/home/tutysra/src/aosp/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-gcc<br />
./configure -build=arm-unknown-eabi -host=arm-unknown-linux-gnu -enable-static-link -without-bash-malloc
It is getting struck with an error message

Code:
[email protected]:~/src/bash-4.0$ ./configure -build=arm-unknown-eabi -host=arm-unknown-linux-gnu -enable-static-link -without-bash-malloc<br />
checking build system type... arm-unknown-eabi<br />
checking host system type... arm-unknown-linux-gnu<br />
checking for emacs... no<br />
checking for xemacs... no<br />
<br />
Beginning configuration for bash-4.0-release for arm-unknown-linux-gnu<br />
<br />
checking for arm-unknown-linux-gnu-gcc... /home/tutysra/src/aosp/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-gcc<br />
checking for C compiler default output file name... <br />
configure: error: in `/home/tutysra/src/bash-4.0':<br />
configure: error: C compiler cannot create executables<br />
See `config.log' for more details.<br />
[email protected]:~/src/bash-4.0$
Has anyone did something similar and got the executable for android from source?
 

·
Android Beginner
Joined
·
9 Posts
./Configure was successful after installing the compiler from codesourcery.
Not sure why it is failing with the pre-build cross compiler that comes with android source.
It had failed at a later stage when compiling some file.

I got your source from github.
I found a Andriod.mk file in the So, tried compiling with ndk-build.
However I am getting the following exception

Code:
[email protected]:~/src/github/temp$ ndk-build<br />
Compile thumb  : sh <= shmatch.c<br />
/home/tutysra/src/github/temp/jni/lib/sh/shmatch.c:36:19: error: regex.h: No such file or directory<br />
/home/tutysra/src/github/temp/jni/lib/sh/shmatch.c: In function 'sh_regmatch':<br />
/home/tutysra/src/github/temp/jni/lib/sh/shmatch.c:50: error: 'regex_t' undeclared (first use in this function)<br />
/home/tutysra/src/github/temp/jni/lib/sh/shmatch.c:50: error: (Each undeclared identifier is reported only once<br />
/home/tutysra/src/github/temp/jni/lib/sh/shmatch.c:50: error: for each function it appears in.)<br />
/home/tutysra/src/github/temp/jni/lib/sh/shmatch.c:50: error: expected ';' before 'regex'<br />
/home/tutysra/src/github/temp/jni/lib/sh/shmatch.c:51: error: 'regmatch_t' undeclared (first use in this function)<br />
/home/tutysra/src/github/temp/jni/lib/sh/shmatch.c:51: error: 'matches' undeclared (first use in this function)<br />
/home/tutysra/src/github/temp/jni/lib/sh/shmatch.c:66: error: 'REG_EXTENDED' undeclared (first use in this function)<br />
/home/tutysra/src/github/temp/jni/lib/sh/shmatch.c:68: error: 'REG_ICASE' undeclared (first use in this function)<br />
/home/tutysra/src/github/temp/jni/lib/sh/shmatch.c:73: error: 'regex' undeclared (first use in this function)<br />
/home/tutysra/src/github/temp/jni/lib/sh/shmatch.c:77: error: expected expression before ')' token
Does this code compile for you? What compilation method are you using?
 
1 - 4 of 4 Posts
Top