Closed ghost closed 5 years ago
It looks like something is going wrong either with your configuration or with your system setup.
Can you please upload a .txt file showing the full cmake command you ran, its output, and then the output from running make --trace
which shows all the commands executing, up to the point where it fails. That might show what the problem is.
there are no --trace option, I use android-ndk-r14b make.exe Options: -b, -m Ignored for compatibility. -B, --always-make Unconditionally make all targets. -C DIRECTORY, --directory=DIRECTORY Change to DIRECTORY before doing anything. -d Print lots of debugging information. --debug[=FLAGS] Print various types of debugging information. -e, --environment-overrides Environment variables override makefiles. -f FILE, --file=FILE, --makefile=FILE Read FILE as a makefile. -h, --help Print this message and exit. -i, --ignore-errors Ignore errors from commands. -I DIRECTORY, --include-dir=DIRECTORY Search DIRECTORY for included makefiles. -j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg. -k, --keep-going Keep going when some targets can't be made. -l [N], --load-average[=N], --max-load[=N] Don't start multiple jobs unless load is below N. -L, --check-symlink-times Use the latest mtime between symlinks and target. -n, --just-print, --dry-run, --recon Don't actually run any commands; just print them. -o FILE, --old-file=FILE, --assume-old=FILE Consider FILE to be very old and don't remake it. -p, --print-data-base Print make's internal database. -q, --question Run no commands; exit status says if up to date. -r, --no-builtin-rules Disable the built-in implicit rules. -R, --no-builtin-variables Disable the built-in variable settings. -s, --silent, --quiet Don't echo commands. -S, --no-keep-going, --stop Turns off -k. -t, --touch Touch targets instead of remaking them. -v, --version Print the version number of make and exit. -w, --print-directory Print the current directory. --no-print-directory Turn off -w, even if it was turned on implicitly. -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE Consider FILE to be infinitely new. --warn-undefined-variables Warn when an undefined variable is referenced.
What if you try using a different make, from your shell? I wouldn't trust the android SDK's make since it will probably be broken in some way, as it comes from android.
what make should be use ? I have not use cmake / make before.
It will depend on the shell you are using, whether it's cygwin, msys, or window's WSL. Each of them will have a way to install and run make. Any make version since 2013 should have the --trace
option.
[ 98%] Linking CXX shared library ..\lib\libVkLayer_GLES_RenderDoc.so cd /d D:\RenderDoc_Source\renderdoc\build-android\renderdoc && D:\cmake-3.15.0\b in\cmake.exe -E cmake_link_script CMakeFiles\renderdoc.dir\link.txt --verbose= D:/RenderDoc_SDK/android-ndk-r14b/toolchains/arm-linux-androideabi-4.9/prebuilt/ windows-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-android eabi/bin\ld: fatal error: ..\lib\libVkLayer_GLES_RenderDoc.so: File too large clang++.exe: error: linker command failed with exit code 1 (use -v to see invoca tion) renderdoc\CMakeFiles\renderdoc.dir\build.make:1121: recipe for target 'lib/libVk Layer_GLES_RenderDoc.so' failed mingw32-make[2]: [lib/libVkLayer_GLES_RenderDoc.so] Error 1 CMakeFiles\Makefile2:119: recipe for target 'renderdoc/CMakeFiles/renderdoc.dir/ all' failed mingw32-make[1]: [renderdoc/CMakeFiles/renderdoc.dir/all] Error 2 Makefile:128: recipe for target 'all' failed mingw32-make: *** [all] Error 2
this is use mingw32-make.exe with --trace
That looks like Android's linker is producing an invalid error. "File too large" doesn't make sense since the library output is only ~350MB even in a debug build. You could check to see that your drive has enough free space in case it's running out of disk space and producing a misleading error, but that's the only thing I can think of.
You could try reporting this to google but I wouldn't expect much from that. Another thing is that although the SDK r14 should work fine as that's what is used by travis CI, it might be worth updating to the latest SDK to see if that works any better.
This doesn't seem like a RenderDoc bug, it seems like an Android SDK bug, so I'm closing this issue. If you find something that suggests a RenderDoc-specific problem feel free to comment here or open another issue.
[100%] Generating ../bin/org.renderdoc.renderdoccmd.arm32.apk cd /d D:\RenderDoc_Source\renderdoc\build-android\renderdoccmd && D:\cmake-3.15. 0\bin\cmake.exe -E make_directory libs/lib/armeabi-v7a cd /d D:\RenderDoc_Source\renderdoc\build-android\renderdoccmd && D:\cmake-3.15. 0\bin\cmake.exe -E make_directory obj cd /d D:\RenderDoc_Source\renderdoc\build-android\renderdoccmd && D:\cmake-3.15. 0\bin\cmake.exe -E make_directory bin cd /d D:\RenderDoc_Source\renderdoc\build-android\renderdoccmd && D:\cmake-3.15. 0\bin\cmake.exe -E copy D:/RenderDoc_Source/renderdoc/build-android/lib/libVkLay er_GLES_RenderDoc.so libs/lib/armeabi-v7a/libVkLayer_GLES_RenderDoc.so cd /d D:\RenderDoc_Source\renderdoc\build-android\renderdoccmd && D:\cmake-3.15. 0\bin\cmake.exe -E copy D:/RenderDoc_Source/renderdoc/build-android/lib/librende rdoccmd.so libs/lib/armeabi-v7a/librenderdoccmd.so cd /d D:\RenderDoc_Source\renderdoc\build-android\renderdoccmd && D:\RenderDoc_S DK\build-tools\26.0.1\aapt package -f -m -S res -J src -M AndroidManifest.xml -I D:\RenderDoc_SDK/platforms/android-23/android.jar cd /d D:\RenderDoc_Source\renderdoc\build-android\renderdoccmd && D:\jdk8\bin\ja vac -d ./obj -source 1.7 -target 1.7 -bootclasspath D:\jdk8/jre/lib/rt.jar -clas spath D:\RenderDoc_SDK/platforms/android-23/android.jar\;obj -sourcepath src src /org/renderdoc/renderdoccmd/*.java cd /d D:\RenderDoc_Source\renderdoc\build-android\renderdoccmd && call D:\Render Doc_SDK\build-tools\26.0.1\dx.bat --dex --output=bin/classes.dex ./obj cd /d D:\RenderDoc_Source\renderdoc\build-android\renderdoccmd && D:\RenderDoc_S DK\build-tools\26.0.1\aapt package -f -M AndroidManifest.xml --version-code --ve rsion-name 214d85228538e71cc63a0d7fa11dd75b1d56cc81 -S res -I D:\RenderDoc_SDK/p latforms/android-23/android.jar -F RenderDocCmd-unaligned.apk bin libs ERROR: input directory '214d85228538e71cc63a0d7fa11dd75b1d56cc81' does not exist
renderdoccmd\CMakeFiles\apk.dir\build.make:61: recipe for target 'bin/org.render doc.renderdoccmd.arm32.apk' failed mingw32-make[2]: [bin/org.renderdoc.renderdoccmd.arm32.apk] Error 1 CMakeFiles\Makefile2:473: recipe for target 'renderdoccmd/CMakeFiles/apk.dir/all ' failed mingw32-make[1]: [renderdoccmd/CMakeFiles/apk.dir/all] Error 2 Makefile:128: recipe for target 'all' failed mingw32-make: *** [all] Error 2
thanks ! I free some drive space , but get this error .
It looks like the problem is this: --version-code --version-name
it's not specifying the version code properly. Looking back at the cmake log it seems like version wasn't calculated and I don't have any error checking for that.
Does your shell not have awk in its PATH? That's used to fetch the version.
------ use cmake in cmd cmake-log.txt
------ use msys2 make.exe in msys2 shell, have awk in path.
[100%] Built target renderdoccmd CMakeFiles/Makefile2:474:更新“renderdoccmd/CMakeFiles/apk.dir/all”,因为:renderdoccmd/CMakeFiles/renderdoccmd.dir/all renderdoc/CMakeFiles/renderdoc.dir/all make -f renderdoccmd/CMakeFiles/apk.dir/build.make renderdoccmd/CMakeFiles/apk.dir/depend renderdoccmd/CMakeFiles/apk.dir/build.make:97: 目标文件“renderdoccmd/CMakeFiles/apk.dir/depend”不存在 /D/cmake-3.15.0/bin/cmake.exe -E cmake_depends "MSYS Makefiles" /D/RenderDoc_Source/renderdoc /D/RenderDoc_Source/renderdoc/renderdoccmd /D/RenderDoc_Source/renderdoc/build-android /D/RenderDoc_Source/renderdoc/build-android/renderdoccmd /D/RenderDoc_Source/renderdoc/build-android/renderdoccmd/CMakeFiles/apk.dir/DependInfo.cmake --color= Scanning dependencies of target apk make -f renderdoccmd/CMakeFiles/apk.dir/build.make renderdoccmd/CMakeFiles/apk.dir/build renderdoccmd/CMakeFiles/apk.dir/build.make:62:更新“bin/org.renderdoc.renderdoccmd.arm32.apk”,因为:lib/librenderdoccmd.so lib/libVkLayer_GLES_RenderDoc.so /D/cmake-3.15.0/bin/cmake.exe -E cmake_echo_color --switch= --blue --bold --progress-dir=/D/RenderDoc_Source/renderdoc/build-android/CMakeFiles --progress-num= "Generating ../bin/org.renderdoc.renderdoccmd.arm32.apk" [100%] Generating ../bin/org.renderdoc.renderdoccmd.arm32.apk cd /D/RenderDoc_Source/renderdoc/build-android/renderdoccmd && /D/cmake-3.15.0/bin/cmake.exe -E make_directory libs/lib/armeabi-v7a cd /D/RenderDoc_Source/renderdoc/build-android/renderdoccmd && /D/cmake-3.15.0/bin/cmake.exe -E make_directory obj cd /D/RenderDoc_Source/renderdoc/build-android/renderdoccmd && /D/cmake-3.15.0/bin/cmake.exe -E make_directory bin cd /D/RenderDoc_Source/renderdoc/build-android/renderdoccmd && /D/cmake-3.15.0/bin/cmake.exe -E copy D:/RenderDoc_Source/renderdoc/build-android/lib/libVkLayer_GLES_RenderDoc.so libs/lib/armeabi-v7a/libVkLayer_GLES_RenderDoc.so cd /D/RenderDoc_Source/renderdoc/build-android/renderdoccmd && /D/cmake-3.15.0/bin/cmake.exe -E copy D:/RenderDoc_Source/renderdoc/build-android/lib/librenderdoccmd.so libs/lib/armeabi-v7a/librenderdoccmd.so cd /D/RenderDoc_Source/renderdoc/build-android/renderdoccmd && "/D\RenderDoc_SDK/build-tools/26.0.1/aapt" package -f -m -S res -J src -M AndroidManifest.xml -I D:\RenderDoc_SDK/platforms/android-23/android.jar W/asset (11556): Asset path D:RenderDoc_SDK\platforms\android-23\android.jar is neither a directory nor file (type=1). ERROR: Asset package include 'D:RenderDoc_SDK\platforms\android-23\android.jar' not found. make[2]: [renderdoccmd/CMakeFiles/apk.dir/build.make:68:bin/org.renderdoc.renderdoccmd.arm32.apk] 错误 1 make[1]: [CMakeFiles/Makefile2:475:renderdoccmd/CMakeFiles/apk.dir/all] 错误 2 make: *** [Makefile:130:all] 错误 2
You shouldn't use windows cmd at all, use the msys shell consistently and use unix /
path separators. What seems to be happening is the ANDROID_SDK
you've specified contains a DOS \
path separator which is then being confused for an escape character and removed from the command.
Administrator@WIN-46GFP6FMLT5 MSYS /d/RenderDoc_Source/renderdoc/build-android
-- Using JAVA_HOME = D:/jdk8 -- Using Android SDK found in D:/RenderDoc_SDK -- Using Android NDK found in D:/RenderDoc_SDK/android-ndk-r14b -- Android: Targeting API '21' with architecture 'arm', ABI 'armeabi-v7a', and processor 'armv7-a' -- Android: Selected Clang toolchain 'arm-linux-androideabi-clang' with GCC toolchain 'arm-linux-androideabi-4.9' -- Check for working CXX compiler: D:/RenderDoc_SDK/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- Check for working CXX compiler: D:/RenderDoc_SDK/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Check for working C compiler: D:/RenderDoc_SDK/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- Check for working C compiler: D:/RenderDoc_SDK/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Calculating version -- Building RenderDoc version 1.4 -- Disabling GL driver on android -- Disabling qrenderdoc for android build -- Disabling renderdoc python modules for android build -- Using Android ABI armeabi-v7a -- Using Android native API level 21 -- Interceptor-lib not enabled (USE_INTERCEPTOR_LIB) - android hooking will use sometimes less reliable PLT-interception method. -- Could NOT find Java (missing: Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE) CMake Error at renderdoccmd/CMakeLists.txt:73 (if): if given arguments:
"VERSION_LESS" "1.8"
Unknown arguments specified
-- Configuring incomplete, errors occurred! See also "D:/RenderDoc_Source/renderdoc/build-android/CMakeFiles/CMakeOutput.log".
Get error !
if(${Java_VERSION} VERSION_LESS 1.8)
message(FATAL_ERROR "Building Android requires the 'java' program in your PATH to be at least #Java 8 (1.8)")
endif()
when Comment these, everything works.
Yes as it says in the documentation the JDK is required to build on Android. JAVA_HOME must be set appropriately and it is checking to see that the java version is new enough. The cmake error indicates that it's not found.
I'm unclear if there's any actual bug here or if it's only misconfigured build environment. That commit removes the awk and sed dependencies and uses cmake string processing only, just in case.
-------------------------android ndk make.exe [100%] Generating ../bin/org.renderdoc.renderdoccmd.arm32.apk ERROR: input directory '214d85228538e71cc63a0d7fa11dd75b1d56cc81' does not exist
make[2]: [bin/org.renderdoc.renderdoccmd.arm32.apk] Error 1 make[1]: [renderdoccmd/CMakeFiles/apk.dir/all] Error 2 make: *** [all] Error 2
-------------------------mingw32-make.exe [100%] Generating ../bin/org.renderdoc.renderdoccmd.arm32.apk ERROR: input directory '214d85228538e71cc63a0d7fa11dd75b1d56cc81' does not exist
renderdoccmd\CMakeFiles\apk.dir\build.make:61: recipe for target 'bin/org.render doc.renderdoccmd.arm32.apk' failed mingw32-make[4]: [bin/org.renderdoc.renderdoccmd.arm32.apk] Error 1 CMakeFiles\Makefile2:473: recipe for target 'renderdoccmd/CMakeFiles/apk.dir/all ' failed mingw32-make[3]: [renderdoccmd/CMakeFiles/apk.dir/all] Error 2 Makefile:128: recipe for target 'all' failed mingw32-make[2]: *** [all] Error 2
-------------------------MinGW\msys\1.0\bin\make.exe [100%] Generating ../bin/org.renderdoc.renderdoccmd.arm32.apk W/asset (12404): Asset path D:RenderDoc_SDK\platforms\android-23\android.jar i s neither a directory nor file (type=1). ERROR: Asset package include 'D:RenderDoc_SDK\platforms\android-23\android.jar' not found. make[2]: [bin/org.renderdoc.renderdoccmd.arm32.apk] Error 1 make[1]: [renderdoccmd/CMakeFiles/apk.dir/all] Error 2 make: *** [all] Error 2
I can find android.jar in D:\RenderDoc_SDK\platforms\android-23 Asset path D:RenderDoc_SDK\platforms\android-23\android.jar is neither a directory nor file (type=1) D:RenderDoc_SDK not D:\RenderDoc_SDK