Android NDK and jenkins

1,129 views
Skip to first unread message

Gus Caplan

unread,
Jul 22, 2014, 10:23:24 AM7/22/14
to andro...@googlegroups.com
So, down to it.

My office uses the SDK and NDK to compile their games, and we are upgrading our systems, and I am settings up the new android build slave for jenkins. When I compile the app via cmd on the slave (which is windows 8, like the other one) it builds correctly, however, when I run the build via jenkins it fails. Here is some output:

make: *** [obj/local/armeabi-v7a/objs-debug/JetsetScratchOffGold/__/__/src/common/AnimationManager.o] Error 2
"""Compile++ thumb""  : JetsetScratchOffGold <= AnimationObject.cpp"
process_begin: CreateProcess(NULL, C:/Android/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-/bin/arm-linux-androideabi-g++ -MMD -MP -MF ./obj/local/armeabi-v7a/objs-debug/JetsetScratchOffGold/__/__/src/common/AnimationObject.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-exceptions -fno-rtti -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -IC:\Jenkins\workspace\framework/Includes -I../../src/common -I../../src/common/Menus -I../../src/common/Tickets -I../../src/IAP/NoIAP -I../../src/Analytics -I../../src/Facebook -IC:/Android/android-ndk/sources/cxx-stl/gnu-libstdc++/4.6/include -IC:/Android/android-ndk/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/include -Ijni -DANDROID -DANDROID_NDK -Wno-multichar -g -DDEBUG -Wa,--noexecstack -fexceptions -O0 -g -Wno-error=format-security -IC:/Android/android-ndk/platforms/android-14/arch-arm/usr/include -c jni/../../src/common/AnimationObject.cpp -o ./obj/local/armeabi-v7a/objs-debug/JetsetScratchOffGold/__/__/src/common/AnimationObject.o, ...) failed.
make (e=2): The system cannot find the file specified.

And also, I have already checked all the file paths and commands, and they all check out, and keep in mind the same commands work in cmd, but when run by jenkins using "run batch commands" they fail.

Any help would be appreciated.

-Gus Caplan

Daniel Tavares

unread,
Jul 22, 2014, 6:01:53 PM7/22/14
to andro...@googlegroups.com
-IC:\Jenkins\workspace\framework/Includes

Does make knows how to parse paths using backslashes correctly on Windows?


make (e=2): The system cannot find the file specified.

Did you check if all the files listed on the output exist on the workspace?

Alex Cohn

unread,
Jul 23, 2014, 1:16:22 PM7/23/14
to andro...@googlegroups.com
First of all: my company runs ndk-build on Jenkins on Windows, with no evident problems. As usual, make sure that no involved paths contain spaces; always use C:/Jenkins/workspace notation.

In your output, though, there is something more weird. I bet the file C:/Android/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-/bin/arm-linux-androideabi-g++.exe does not exist. Some environment variable was intended to expand into x86_64 or x86, but is missing.

BR,
Alex Cohn

Alex Cohn

unread,
Jul 23, 2014, 2:54:50 PM7/23/14
to andro...@googlegroups.com
On Wednesday, July 23, 2014 8:16:22 PM UTC+3, Alex Cohn wrote:
First of all: my company runs ndk-build on Jenkins on Windows, with no evident problems. As usual, make sure that no involved paths contain spaces; always use C:/Jenkins/workspace notation.

In your output, though, there is something more weird. I bet the file C:/Android/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-/bin/arm-linux-androideabi-g++.exe does not exist. Some environment variable was intended to expand into x86_64 or x86, but is missing.

With 32 bit NDK it should be 
 
C:/Android/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/arm-linux-androideabi-g++.exe

with 64-bit NDK,

C:/Android/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++.exe
Message has been deleted

Gus Caplan

unread,
Jul 23, 2014, 5:48:27 PM7/23/14
to andro...@googlegroups.com
Hi!

Fist off, thank you for responding so quickly.

So, I checked out the file paths you mentioned with x86 and x64, and it all checked out. Also to all the other people who may answer, keep in mind that if I literally just copy the commands out of jenkins and into cmd, the build works perfectly.

Thanks,

-Gus Caplan

Gus Caplan

unread,
Jul 23, 2014, 6:14:50 PM7/23/14
to andro...@googlegroups.com
Hello! I fixed it! jenkins was trying to use C:/Android/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/
and it needed C:/Android/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-/bin/

thanks everyone for your responses,

-Gus Caplan
Reply all
Reply to author
Forward
0 new messages