Package Details: android-ndk r11c-1

Git Clone URL: https://aur.archlinux.org/android-ndk.git (read-only)
Package Base: android-ndk
Description: Android C/C++ developer kit
Upstream URL: https://developer.android.com/ndk/
Licenses: GPL, custom, LGPL
Provides: android-ndk
Replaces: android-ndk64
Submitter: sergej
Maintainer: xyproto
Last Packager: xyproto
Votes: 229
Popularity: 4.637289
First Submitted: 2009-06-26 09:29
Last Updated: 2016-04-06 09:45

Latest Comments

yan12125 commented on 2016-04-20 07:30

This package should now depends on libtinfo-5 instead of libtinfo:

$ for f in $(grep -lr libtinfo /opt/android-ndk/toolchains) ; do ; echo $f ; ldd $f | grep libtinfo ; done
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/lib64/LLVMgold.so
libtinfo.so.5 => not found
libtinfo.so.5 => not found
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/lib64/libLLVM.so
libtinfo.so.5 => not found
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-dis
libtinfo.so.5 => not found
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as
libtinfo.so.5 => not found
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang
libtinfo.so.5 => not found
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++
libtinfo.so.5 => not found
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/FileCheck
libtinfo.so.5 => not found
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-link
libtinfo.so.5 => not found

xyproto commented on 2016-04-18 15:00

That is possible, but introducing epoch is a bit ugly and can never be removed. I am planning to remove the "r" from the package version instead.

yan12125 commented on 2016-04-09 17:29

Add "epoch=1" to PKGBUILD should fix the problem of version comparisons.

xyproto commented on 2016-04-07 13:24

@chenxiaolong, it is possible to have a version number without the "r", like for android-sdk. Someone complained about the "r" being missing in the android-sdk package, but I think it would be an improvement to not have the "r" also for android-ndk.

chenxiaolong commented on 2016-04-06 18:40

@xyproto: Is there a good way to ensure the version numbers are always increasing? Right now, pacman is treating r11c as being older than r11:

chenxiaolong@cxl-4270cto $ vercmp r11 r11c
1

It's not a big deal, just a minor inconvenience.

Thanks!

xyproto commented on 2016-04-06 09:47

@dreamingincode Flagging as out-of-date does the trick.

dreamingincode commented on 2016-04-03 13:19

r11c
sha1sum de5ce9bddeee16fb6af2b9117e9566352aa7e279
sha256sum ba85dbe4d370e4de567222f73a3e034d85fc3011b3cbd90697f3e8dcace3ad94

Please update the PKGBUILD.

xyproto commented on 2016-03-17 11:53

Upstream updated the zip file. Updated the sha256 sum in response.

Added dependency on libtinfo (thanks, @chenxiaolong).

chenxiaolong commented on 2016-03-15 07:31

@xyproto: Could you add libtinfo to the dependencies? clang depends on it:

/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

Thanks!

poom commented on 2016-03-10 00:07

r11 is now released

Nilus commented on 2016-01-11 20:55

GDB exit with error:

UNEXPECTED GDB STDERR: /opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
GDB PROCESS FINISHED, status 0, exit code 127

FOR FIX:
Need install ncurses5-compat-libs from AUR

xyproto commented on 2015-11-20 15:09

r10e is still the latest official release. Unflagging as out-of-date.

xyproto commented on 2015-06-30 15:43

Updated the package to r10e. Everything works here.

xyproto commented on 2015-06-30 15:42

Thanks, frownlee. Updated the package.

frownlee commented on 2015-05-19 02:03

A slightly simplified PKGBUILD is available at:
https://gist.github.com/anonymous/208585ccd718fe081b99

The main change moves the android-ndk.sh file to the normal source array, and also removes a redundant provides and changes the url to use https.

ikhthiandor commented on 2015-05-02 09:56

I am getting this error.

Extracting android-ndk-r10d/build/awk
Extracting android-ndk-r10d/build
Extracting android-ndk-r10d

Sub items Errors: 1398

Archive Errors: 1

Sub items Errors: 1398
==> ERROR: A failure occurred in prepare().
Aborting...

This stackoverflow thread might be relevant.
http://stackoverflow.com/questions/28458758/error-encountered-installing-android-ndk

xyproto commented on 2015-02-11 00:06

Thanks, Kuci. Updated the package. Also using the new "source_x86_64" / "source_i686" possibilities.

Kuci commented on 2015-02-08 19:01

replaces and provides should be global. Otherwise they do not work for me.

senselessfull commented on 2014-12-16 14:36

The problem is, that on some devices /tmp isn't large enough, which explains why manually downloading and extracting works [in home dir].
Changing the yaourt tmp-dir works and the call would be
" yaourt -S --tmp ~/ android-ndk"

trulex commented on 2014-12-14 22:15

I installed it manually now and it worked. My yaourt installation is probably misconfigured.

senselessfull commented on 2014-12-14 21:17

If there are those "Sub item Errors" it might mean that you don't have enough free disk space. The ndk*.bin is 430MB and unzipped it takes up 3.3GB of storage. Try again with more disk space^^

trulex commented on 2014-12-14 19:00

Cannot install with yaourt:
Sub items Errors: 234

Archive Errors: 1

Sub items Errors: 234
==> ERROR: A failure occurred in prepare().
Aborting...
==> ERROR: Makepkg was unable to build android-ndk.

lilydjwg commented on 2014-12-10 04:59

The new PKGBUILD fails with devtools because the source file is read-only. Could you copy it so that users don't have to modify it before building it with devtools?

Also, the source files have the same file name every version. This may make makepkg think it has the sources but the checksum mismatches.

giniu commented on 2014-12-09 14:38

works now, thanks!

xyproto commented on 2014-12-09 10:41

The way the binary files are compressed were changed. Everything works here.

leugenea commented on 2014-12-09 07:43

@xyproto still not working for me:
Sub items Errors: 11
Archive Errors: 1

xyproto commented on 2014-12-09 01:51

Updated the package, please confirm that it works as it should.

hipersayan_x commented on 2014-12-09 01:10

Hi guys, this is fixed PKGBUILD:

# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Daniel Micay <danielmicay@gmail.com>

pkgname=android-ndk
pkgver=r10d
pkgrel=2
pkgdesc='Android C/C++ developer kit'
arch=('x86_64' 'i686')
url='http://developer.android.com/sdk/ndk/'
license=('GPL' 'LGPL' 'custom')
provides=('android-ndk')
replaces=('android-ndk32' 'android-ndk64')
options=('!strip' 'staticlibs')
backup=('etc/profile.d/android-ndk.sh')
install="$pkgname.install"

if [[ $CARCH = i686 ]]; then
source=("${pkgname}_$CARCH.bin::http://dl.google.com/android/ndk/${pkgname}-$pkgver-linux-x86.bin" 'android-ndk.sh')
md5sums=('SKIP' '372f74400bfa061642c4b4175f2ddb48')
else
source=("${pkgname}_$CARCH.bin::http://dl.google.com/android/ndk/${pkgname}-$pkgver-linux-x86_64.bin" 'android-ndk.sh')
md5sums=('SKIP' '372f74400bfa061642c4b4175f2ddb48')
fi

build() {
cd $srcdir

if [[ $CARCH = i686 ]]; then
chmod +x ${pkgname}_x86.bin
./${pkgname}_x86.bin -y
else
chmod +x ${pkgname}_x86_64.bin
./${pkgname}_x86_64.bin -y
fi

cd ${pkgname}-${pkgver}
}

package() {
install -d "$pkgdir/opt"
mv "$pkgname-$pkgver" "$pkgdir/opt/$pkgname"

install -Dm755 android-ndk.sh "$pkgdir/etc/profile.d/android-ndk.sh"

# Fix broken permissions
chmod -R o=g "$pkgdir/opt/$pkgname"
find "$pkgdir/opt/$pkgname" -perm 744 -exec chmod 755 {} +
}

# vim:set ts=2 sw=2 et:

giniu commented on 2014-12-08 22:12

@xyproto - is it fixed? Still not working for me (looks like it is same pkgbuild as before)

xyproto commented on 2014-12-08 14:04

My bad, fixed. Thanks, nly and giniu.

xyproto commented on 2014-12-08 14:03

My bad, fixed. Thanks, nly.

nly commented on 2014-12-07 02:30

x86 and x86_64 hashes for 10d-1 are around the wrong way, and the extraction process seems broken.

giniu commented on 2014-12-06 19:41

For me, it says that android-ndk_x86_64.bin md5sum do not match

xyproto commented on 2014-12-06 18:27

Updated to 10d.

sftrytry commented on 2014-12-05 07:31

Android NDK, Revision 10d (December 2014)

xyproto commented on 2014-11-07 15:05

mmozeiko, it was a dependency when I adopted the package. Removed the dependency on android-sdk, as I agree that is is not stricly needed, even though people are likely to want android-sdk as well.

mmozeiko commented on 2014-11-05 10:34

Why this package depends on android-sdk? I'm pretty sure you can use "ndk-build" without android-sdk installed.

xyproto commented on 2014-11-03 14:21

PedroHLC, I agree. Updated the PKGBUILD.

PedroHLC commented on 2014-11-01 10:31

Wouldn't be better instead of {cp -r "$pkgname-$pkgver" "$pkgdir/opt/$pkgname"} just moving the folder??

PedroHLC commented on 2014-11-01 10:29

I don'

xyproto commented on 2014-10-27 13:03

frownlee, thanks for the suggestion. Now that android-ndk is no longer split in two, I think provides=('android-ndk') makes more sense than provides=('android-ndk32' 'android-ndk64'), but I will certainly take the other suggestions into consideration.

frownlee commented on 2014-10-24 18:51

I would suggest a slightly simplified PKGBUILD (like the following):
https://gist.github.com/anonymous/6bedcde142996f9ca80e

xyproto commented on 2014-10-23 14:24

Upstream has reversed the decision to split the 32-bit version into android-ndk32 and android-ndk64 and the 64-bit version into android-ndk32 and android-ndk64, so I'm also unsplitting this package.

xyproto commented on 2014-10-08 12:54

The packages now doesn't conflict anymore, but the last package to be installed is configured as ANDROID_NDK in /etc/profile.d/android-ndk.sh. Also added a symlink for the gdbserver issue, thanks zenolijo.

xyproto commented on 2014-10-08 09:08

Will look at and fix the issues.

mathben commented on 2014-09-25 20:34

@smsware, I got the same problem.
I solve it by manual installation after the error.


pacman -U /tmp/yaourt-tmp-root/android-ndk32-r10b-1-x86_64.pkg.tar.xz
rm /etc/profile.d/android-ndk.sh
pacman -U /tmp/yaourt-tmp-root/android-ndk64-r10b-1-x86_64.pkg.tar.xz

The file android-ndk.sh is the same in 32 and 64 package.

Anonymous comment on 2014-09-24 05:34

error: failed to commit transaction (conflicting files)
/etc/profile.d/android-ndk.sh exists in both 'android-ndk32' and 'android-ndk64'
Errors occurred, no packages were upgraded.

What should I do?

zenolijo commented on 2014-09-21 21:11

This is really annoying.

It's not possible to run gdbserver at all, because when i run ndk-build with NDK_DEBUG=1 it tries to find the gdbserver file in /opt/android-ndk64/prebuilt/android-arm/gdbserver when it's actually in /opt/android-ndk64/prebuilt/android-arm64/gdbserver which sucks.

It is easily fixable by symlinking android-arm to android-arm64 though, but you guys should do something about it.

xyproto commented on 2014-09-19 20:29

Updated the package to r10b and removed the conflict between android-ndk32 and android-ndk64 by introducing a symlink in /opt. Thanks for the feedback, frownlee.

frownlee commented on 2014-09-07 18:15

Actually, in all honesty, I think these two packages share so little in common they don't deserve to be a split package. Split packages are generally used when they share sources, which these two don't, and they're packaging steps are completely independent. A package group makes more sense IMO.

frownlee commented on 2014-09-06 22:53

I had a little time to implement what I meant. Here's the updated files (I also cleaned up the PKGBUILD a little)

https://gist.github.com/anonymous/fcb67f9194d3862b008e

frownlee commented on 2014-08-30 23:21

I think both are useful at the same time (well, will be, once android L is released). I would set ANDROID_NDK_32 and ANDROID_NDK_64 in the profile.sh, and (perhaps) make ANDROID_NDK an alias for ANDROID_NDK_32.

xyproto commented on 2014-08-30 15:26

frownlee, my assumption was that people would just need one of the packages (android-ndk32). Do you need both packages? I agree that making them not conflict and just set ANDROID_SDK to ndk32 version might be better.

frownlee commented on 2014-08-29 20:02

Why not have each package set the ANDROID_NDK_{32,64} environment variable, and make the user make ANDROID_NDK to point to one or the other? One environment variable not even set by upstream seems like a strange reason to have the packages conflict.

dront78 commented on 2014-08-29 18:13

You are welcome! nothing changed within update :D

muskitu commented on 2014-08-08 20:06

Ok, sorry xyproto, it was my fault. Thank you! :D
Thank you too dront78! :D

dront78 commented on 2014-08-08 19:49

hi here is my filesystem after install
drwxr-xr-x 10 124982 5000 4096 июл 3 00:06 android-ndk-r10

and here is a
cat /etc/profile.d/android-ndk32.sh
export PATH=$PATH:/opt/android-ndk32
export ANDROID_NDK=/opt/android-ndk32

please fix uid:gid and environment path

also as soon the packages are conflict /opt/android-ndk should be ok for both

dront78 commented on 2014-08-08 19:45

hi here is my filesystem after install
drwxr-xr-x 10 124982 5000 4096 июл 3 00:06 android-ndk-r10

and here is a
cat /etc/profile.d/android-ndk32.sh
export PATH=$PATH:/opt/android-ndk32
export ANDROID_NDK=/opt/android-ndk32

please fix uid:gid and environment path

xyproto commented on 2014-08-08 11:34

There is a conflict between android-ndk32 and android-ndk64 because ANDROID_NDK is set in the shell script in /etc/profile.d/ and ANDROID_NDK can't point to both of them at the same time. The idea is that you will have to choose one of them, depending on which one you need (most likely only android-ndk32). This is mentioned in the comments in the PKGBUILD. You can still install both by either forcing the install, editing the PKGBUILD or extracting the tarballs manually (and then deciding what to do about the script in profile.d).

It is downloading both, because it is needed to build the split package. This is one of the reasons for why it may be a better candidate for [community] than AUR.

xyproto commented on 2014-08-08 11:31

There is a conflict between android-ndk32 and android-ndk64 because ANDROID_NDK is set in the shell script in /etc/profile.d/ and ANDROID_NDK can't point to both of them at the same time. The idea is that you will have to choose one of them, depending on which one you need (most likely only android-ndk32).

muskitu commented on 2014-08-07 14:29

I am trying to install android-ndk64, but I can't install it, there is a conflict with android-ndk32, why this is downloading android-ndk32 too?

muskitu commented on 2014-08-07 14:27

I can't install it, conflict with android-ndk32, why this is downloading android-ndk32 too?

muskitu commented on 2014-08-07 14:27

I can't install it, conflict with android-ndk32, why this is downloading android-ndk32 too?

xyproto commented on 2014-08-05 10:29

Adopted and made into a split package. Might be a better fit for [community] than AUR.

thestinger commented on 2014-07-25 23:40

This needs to be split up into separate packages for the 32-bit and 64-bit targets.

thestinger commented on 2014-07-25 23:40

This needs to be split up into separate packages for the 32-bit and 64-bit versions.

prurigro commented on 2014-06-11 01:46

I noticed the python scripts were all pointed to various incorrect paths (for the package), the full list of licenses weren't getting dropped in /usr/share/licenses/android-ndk and fixed a bunch of other issues with namcap and whatnot- feel free to pull in my changes http://96.126.108.7:90/android-ndk-r9d-1.src.tar.gz

morealaz commented on 2014-04-15 13:11

Hi sergej,
Can you please update android-ndk in your repo?

dront78 commented on 2013-12-22 07:47

+1 for sjakub cp -al
checked and works

sftrytry commented on 2013-12-20 03:38

I just found r9c released.

ElNick commented on 2013-11-07 22:51

Looks like options=(!strip) is ignored (because of the second options statement?). I get linking errors, e.g. try ndk-build native-audio sample. Replacing both lines with options=(!strip staticlibs) fixes it for me. Not sure if it is the correct way, since I'm not familiar with PKGBUILD.

thestinger commented on 2013-11-07 21:14

@henranto: Ah, that's from Arch Linux switching to stripping static libraries by default.

henranto commented on 2013-11-07 16:21

Might something is very very strange with my setup but the /opt/android-ndk is missing some files, 200 MB less than src/android-ndk-r9b after makepkg. The missing files are .a and .pod files. Is it only me or do others have same issue?

allencch commented on 2013-08-07 05:57

sha1sum for i686 should be "563ed727849f6b2f3ae43412e734865642e4554f"

sjakub commented on 2013-08-01 11:29

Could you please change "cp -a" at the end to "cp -al"?
It would dramatically reduce disk usage and build times.
Thanks!

thestinger commented on 2013-03-29 17:48

@PedoHLC: thanks, didn't realize it was broken on i686 :)

PedroHLC commented on 2013-03-29 14:50

Line 18 and 19 from PKGBUILD should have no space between variable, operator and value or it throws a "command not founded"

thestinger commented on 2013-03-25 21:26

@dront78: Thanks! I didn't notice that they finally added proper x86_64 support.

dront78 commented on 2013-03-25 11:22

please support new x86_64 ndk toolchain
http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86_64.tar.bz2

xgdgsc commented on 2013-03-12 04:18

You can add a default commented out line #PKGEXT=".pkg.tar" and your makedepends of "tar" is unnecessary (it is in base) .

thestinger commented on 2013-03-11 14:24

@xgdgsc: why override the user preference and skip it for this?

xgdgsc commented on 2013-03-11 11:59

Why not skip compression by adding PKGEXT=".pkg.tar" to the PKGBUILD?

thestinger commented on 2012-11-18 07:56

@AlexanderR: removed, thanks

thestinger commented on 2012-11-18 07:56

@AlexanderR: removed :)

AlexanderR commented on 2012-11-18 06:22

According to http://developer.android.com/tools/sdk/ndk/index.html, "All files and executables in the NDK release package are set to have read and execute permissions for all", so there is probably no need for the last line of package()

gabx commented on 2012-11-15 10:25

r8c-1 is out. TY for updating

kornerr commented on 2012-09-06 13:05

Android docs explicitly say that one needs SDK along with NDK since NDK does not have tools like emulator and such.

matsic commented on 2012-05-30 08:46

there no need to depend on android-sdk package

mikezackles commented on 2011-09-30 19:18

make-standalone-toolchain.sh fails because it can't write inside the directories that it has copied. It appears that none of the files/directories are writable by the owner.
chmod -R u+w /opt/android-ndk appears to have fixed things for me.

thestinger commented on 2011-08-20 21:48

@buergi: That's a very elegant fix to the problem. Thanks :).

buergi commented on 2011-08-20 20:49

Actually there are so many wrong permissions, that it's hopeless to do it this way.
I'd suggest the following command to copy the permissions from group to other:
chmod -R a=g /opt/android-ndk

This would hopefully fix all problems, since the group permissions seems to be correctly set.

buergi commented on 2011-08-20 20:21

Ah and also the ndk-* files in /opt/android-ndk of course.

buergi commented on 2011-08-20 20:19

Could the current maintainer please do something to fix those permission problems.
There are about 150 directories which are only accessible from the root group.
To fix all problems one could use something like the following command
> find /opt/android-ndk -type d -and -not -perm -a+x -exec chmod 755 {} \;

Furthermore the shell scripts in build/tools are not executable, but i don't know if those are really necessary.
Nevertheless i'd fix those permissions too:
> chmod 755 /opt/android-ndk/build/tools/*.sh

syntobu commented on 2011-08-04 03:07

The package as it is still has the permissions problem, 90% of the files installed are accessible to root only

Anonymous comment on 2011-07-12 17:27

Updated

Svenstaro commented on 2011-06-09 20:25

Adopted and updated, please try it out.

Svenstaro commented on 2011-06-04 11:28

Thanks marquicus. g.vialetto, please use marquicus' files to update the package. :)

marquicus commented on 2011-06-04 04:13

I was unable to use the tools unless you are root, I used the files below to fix the permissions
pkgbuild http://pastebin.com/L1hgcB4H
install http://pastebin.com/RTChR7ZX

Anonymous comment on 2011-02-25 08:23

Done.

falconindy commented on 2011-02-25 00:00

Please add options=(!strip) to this PKGBUILD to avoid failures with pacman-git (pacman 3.5).

guardian commented on 2011-02-15 08:32

g.vialetto > nice I was about to adopt it but didn't find time to read the wiki about adopting and updating packages yet.

Anonymous comment on 2011-02-14 22:16

Adopted and updated.

Anonymous comment on 2011-02-10 14:58

i drop this package since unfortunately i don't have time to spend it on :(

guardian commented on 2011-02-10 10:53

see https://gist.github.com/820248 for an updated PKGBUILD

peoro commented on 2011-01-19 12:39

Sample `hello-gl2' fails building (while others, like `hello-jni' work):

$ cd /opt/android-ndk/samples/hello-gl2/
$ ../../ndk-build
/usr/bin/make -f /opt/android-ndk/build/core/build-local.mk
Compile++ thumb : gl2jni <= gl_code.cpp
/opt/android-ndk/samples/hello-gl2/jni/gl_code.cpp:22:23: error: GLES2/gl2.h: No such file or directory
/opt/android-ndk/samples/hello-gl2/jni/gl_code.cpp:23:26: error: GLES2/gl2ext.h: No such file or directory
--- etc etc ---

Anonymous comment on 2011-01-18 18:49

Works as a charm on a fresh install.

Anonymous comment on 2011-01-07 12:10

Please, add the android-ndk on PATH

Anonymous comment on 2010-12-14 09:35

adopted & updated to r5

Svenstaro commented on 2010-12-14 02:25

User seems inactive. I will orphan this for now. eXine, if you want to resume maintainership, mail me.

guardian commented on 2010-12-12 13:12

see https://gist.github.com/738029 for an updated PKGBUILD

MCMic commented on 2010-09-07 19:29

It miss an apps folder with Application.mk file that allow to build samples.

Maybe I'm wrong but I had hard time trying to make the sample hello-jni work.

exine commented on 2010-05-28 17:15

Added android-sdk as an dependience (referring to android ndk documentation, it's required), bumped to r4

nirev commented on 2010-05-26 01:05

Note: changing the version from r3 to r4 and the corresponding md5 works!