Makefile:133: recipe for target ‘sub-make’ failed
make: *** [sub-make] Error 2
make: Leaving directory ‘/media/gytis/raid2tb/gytis/development/git-files/khadas/android-7/common’
[ 11% 5410/47622] target Java: core-oj (out/target/common/obj/JAVA_LIBRARIES/core-oj_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ 11% 5410/47622] build out/target/common/obj/JAVA_LIBRARIES/sdk_v16_intermediates/classes.jack
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target ‘ninja_wrapper’ failed
make: *** [ninja_wrapper] Error 1
make failed to build some targets (21:26 (mm:ss))
Or this one:
1 warning generated.
[ 67% 32013/47622] target thumb C++: libamnuplayer_32 <= vendor/amlogic/frameworks/av/media/Am-NuPlayer/AmNuPlayer.cpp
vendor/amlogic/frameworks/av/media/Am-NuPlayer/AmNuPlayer.cpp:547:45: warning: ISO C++11 does not allow conversion from string literal to ‘char *’ [-Wwritable-strings]
mStrCurrentAudioCodec = “DTSHD”;
^
vendor/amlogic/frameworks/av/media/Am-NuPlayer/AmNuPlayer.cpp:648:49: warning: ISO C++11 does not allow conversion from string literal to ‘char *’ [-Wwritable-strings]
mStrCurrentAudioCodec = “DTSHD”;
^
vendor/amlogic/frameworks/av/media/Am-NuPlayer/AmNuPlayer.cpp:575:30: warning: comparison of integers of different signs: ‘size_t’ (aka ‘unsigned int’) and ‘int’ [-Wsign-compare]
for (size_t i = 0; i < track_num; i++) {
~ ^ ~~~~~~~~~
vendor/amlogic/frameworks/av/media/Am-NuPlayer/AmNuPlayer.cpp:609:23: warning: comparison of integers of different signs: ‘size_t’ (aka ‘unsigned int’) and ‘ssize_t’ (aka ‘int’) [-Wsign-compare]
if (i == mSource->getSelectedTrack(MEDIA_TRACK_TYPE_VIDEO)) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vendor/amlogic/frameworks/av/media/Am-NuPlayer/AmNuPlayer.cpp:644:23: warning: comparison of integers of different signs: ‘size_t’ (aka ‘unsigned int’) and ‘ssize_t’ (aka ‘int’) [-Wsign-compare]
if (i == mSource->getSelectedTrack(MEDIA_TRACK_TYPE_AUDIO)) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 warnings generated.
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target ‘ninja_wrapper’ failed
make: *** [ninja_wrapper] Error 1
Now it keeps failing on this each time:
[ 67% 31955/47622] target SharedLib: libamffmpeg_32 (out/target/product/kvim/obj_arm/SHARED_LIBRARIES/libamffmpeg_intermediates/LINKED/libamffmpeg.so)
FAILED: /bin/bash out/target/product/kvim/obj_arm/SHARED_LIBRARIES/libamffmpeg_intermediates/LINKED/libamffmpeg.so.rsp
clang++: error: unable to execute command: Aborted
clang++: error: linker command failed due to signal (use -v to see invocation)
[ 67% 31955/47622] target arm C++: libamffmpegadapter_32 <= vendor/amlogic/frameworks/av/AmFFmpegAdapter/utils/AmFFmpegByteIOAdapter.cpp
How you set up your building environment? Maybe my issues comes up from that. If I use Ubuntu 16, by default it ships with gcc 5.x. Maybe it is wrong for building Android? Somewhere I’ve read it needs gcc 4.9 or so…
Mainly I get clang++ errors and when I run clang++ -v I can see that it uses gcc 5.
Actually it fails in the same place regardless of gcc/g++ version - tried on fresh environment with gcc 4.8 and failed in the very same place:
[ 67% 31964/47622] target SharedLib: libamffmpeg_32 (out/targe…RED_LIBRARIES/libamffmpeg_intermediates/LINKED/libamffmpeg.so)
FAILED: /bin/bash out/target/product/kvim/obj_arm/SHARED_LIBRARIES/libamffmpeg_intermediates/LINKED/libamffmpeg.so.rsp
clang++: error: unable to execute command: Aborted
clang++: error: linker command failed due to signal (use -v to see invocation)
One more thing I’ve tried was using ffmpeg from LineageOS and CyanogenMod, but it failed with build script error. Then I’ve tried using Nougat branch of following:
But again error here:
[quote][ 67% 31963/47622] target SharedLib: libamffmpeg_32 (out/target/product/kvim/obj_arm/SHARED_LIBRARIES/libamffmpeg_intermediates/LINKED/libamffmpeg.so)
FAILED: /bin/bash out/target/product/kvim/obj_arm/SHARED_LIBRARIES/libamffmpeg_intermediates/LINKED/libamffmpeg.so.rsp
clang++: error: unable to execute command: Aborted
clang++: error: linker command failed due to signal (use -v to see invocation)
[ 67% 31963/47622] target arm C++: libamffmpegadapter_32 <= vendor/amlogic/frameworks/av/AmFFmpegAdapter/utils/AmPTSPopulator.cpp[/quote]
Sorry, Marshmallow uses android_external_ffmpeg while Nougat uses android_vendor_amlogic_external_ffmpeg.
Tried to build on virtual PCs with Ubuntu 14 and Ubuntu 15 (on VirtualBox), then tried building on physical computers: one running Linux Mint 18 (= Ubuntu 16) with 16 GB RAM, another Linux Mint 17 (= Ubuntu 14) with 8 GB RAM - they all fail on the same error at 67%:
[quote][ 67% 31963/47622] target SharedLib: libamffmpeg_32 (out/target/product/kvim/obj_arm/SHARED_LIBRARIES/libamffmpeg_intermediates/LINKED/libamffmpeg.so)
FAILED: /bin/bash out/target/product/kvim/obj_arm/SHARED_LIBRARIES/libamffmpeg_intermediates/LINKED/libamffmpeg.so.rsp
clang++: error: unable to execute command: Aborted
clang++: error: linker command failed due to signal (use -v to see invocation)[/quote]
Build environment is established according to instructions and it builds uboot successfully. On the same system I successcully build Lineage OS 14.1 for Odroid XU3/4 and Shamu, so I believe it is sufficient to build Android Nougat.
Did extend swap partition, results are the same.
Can you try to sync fresh repository (or at least android_vendor_amlogic_external_ffmpeg) to make sure you build exactly what is on repository and try to build it?
Maybe something missing on GitHub or incorrect version?
Hi,Gytis
The source code on github is correct. The user ‘Davemf’ build the Android Nougat successfully. I don’t build the source code with Linux Mint.I build it with Ubuntu14.04. Of course,I can’t give you more suggestions.I’am sorry for that.
Well it is still possible to build on that kind of old machines… At least I can build Pie image with 8 GB RAM, just add more swap at least to 16GB.
me@server:~$ LANG=C free
total used free shared buff/cache available
Mem: 8151216 469636 979744 10576 6701836 7366664
Swap: 16777212 315392 16461820
However a possibility to build android system will depend on your processor features - it requires SSE4 and POPCNT instruction to be supported. If there is no POPCNT instruction supported by processor - it will require some changes to the sources to build successfully.