Thank you! It works now!
I still get errorâŚ
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
make failed to build some targets (48:19 (mm:ss))
Not sure, it kind of keeps failing on random places:
[ 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
vendor/amlogic/frameworks/av/AmFFmpegAdapter/utils/AmFFmpegByteIOAdapter.cpp:179:50: warning: unused parameter âthizâ [-Wunused-parameter]
int32_t AmFFmpegByteIOAdapter::staticWrite(void* thiz, uint8_t* buf, int amt) {
^
vendor/amlogic/frameworks/av/AmFFmpegAdapter/utils/AmFFmpegByteIOAdapter.cpp:179:65: warning: unused parameter âbufâ [-Wunused-parameter]
int32_t AmFFmpegByteIOAdapter::staticWrite(void* thiz, uint8_t* buf, int amt) {
^
vendor/amlogic/frameworks/av/AmFFmpegAdapter/utils/AmFFmpegByteIOAdapter.cpp:179:74: warning: unused parameter âamtâ [-Wunused-parameter]
int32_t AmFFmpegByteIOAdapter::staticWrite(void* thiz, uint8_t* buf, int amt) {
^
3 warnings generated.
[ 67% 31955/47622] target arm C++: libamffmpegadapter_32 <= vendor/amlogic/frameworks/av/AmFFmpegAdapter/utils/AmPTSPopulator.cpp
vendor/amlogic/frameworks/av/AmFFmpegAdapter/utils/AmPTSPopulator.cpp:44:42: warning: unused parameter âdtsâ [-Wunused-parameter]
const int64_t pts, const int64_t dts, const bool isKeyFrame) {
^
vendor/amlogic/frameworks/av/AmFFmpegAdapter/utils/AmPTSPopulator.cpp:44:58: warning: unused parameter âisKeyFrameâ [-Wunused-parameter]
const int64_t pts, const int64_t dts, const bool isKeyFrame) {
^
2 warnings generated.
[ 67% 31955/47622] target arm C++: libamffmpegadapter_32 <= vendor/amlogic/frameworks/av/AmFFmpegAdapter/utils/AmFFmpegUtils.cpp
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 (01:17:34 (hh:mm:ss))
After installing additional packages:
sudo apt-get install clang-3.5 llvm clang g++ subversion cmake
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
Did you Establish a Build Environment for your host PC?
If you have already done it , you can try to extend the swap partitions.
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
Have a try! Thanks!
Didnât help - still stuch on similar error:
[ 67% 31969/47622] target SharedLib: libamffmpeg_32 (out/âŚIBRARIES/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% 31969/47622] target arm C++: libamffmpegadapter_32 âŚogic/frameworks/av/AmFFmpegAdapter/codec/AmAudioCodec.cpp
In file included from vendor/amlogic/frameworks/av/AmFFmpegAdapter/codec/AmAudioCodec.cpp:24:
In file included from vendor/amlogic/frameworks/av/AmFFmpegAdapter/codec/AmAudioCodec.h:24:
vendor/amlogic/frameworks/av/AmFFmpegAdapter/include/AmFFmpegCodec.h:76:52: warning: unused parameter âcodecMimeâ [-Wunused-parameter]
virtual int32_t video_decode_init(const char * codecMime, VIDEO_INFO_T *video_info=NULL){return 0;} //= 0;
^
vendor/amlogic/frameworks/av/AmFFmpegAdapter/include/AmFFmpegCodec.h:76:77: warning: unused parameter âvideo_infoâ [-Wunused-parameter]
virtual int32_t video_decode_init(const char * codecMime, VIDEO_INFO_T *video_info=NULL){return 0;} //= 0;
^
vendor/amlogic/frameworks/av/AmFFmpegAdapter/include/AmFFmpegCodec.h:77:63: warning: unused parameter âdataâ [-Wunused-parameter]
virtual int32_t video_decode_frame(VIDEO_FRAME_WRAPPER_T *data, int *got_frame, PACKET_WRAPPER_T * pkt) {return 0;}//= 0;
^
vendor/amlogic/frameworks/av/AmFFmpegAdapter/include/AmFFmpegCodec.h:77:74: warning: unused parameter âgot_frameâ [-Wunused-parameter]
virtual int32_t video_decode_frame(VIDEO_FRAME_WRAPPER_T *data, int *got_frame, PACKET_WRAPPER_T * pkt) {return 0;}//= 0;
^
vendor/amlogic/frameworks/av/AmFFmpegAdapter/include/AmFFmpegCodec.h:77:104: warning: unused parameter âpktâ [-Wunused-parameter]
virtual int32_t video_decode_frame(VIDEO_FRAME_WRAPPER_T *data, int *got_frame, PACKET_WRAPPER_T * pkt) {return 0;}//= 0;
^
vendor/amlogic/frameworks/av/AmFFmpegAdapter/include/AmFFmpegCodec.h:83:56: warning: unused parameter âwidthâ [-Wunused-parameter]
virtual int32_t video_decode_get_display(int32_t * width, int32_t * height) {return 0;}//= 0;
^
vendor/amlogic/frameworks/av/AmFFmpegAdapter/include/AmFFmpegCodec.h:83:73: warning: unused parameter âheightâ [-Wunused-parameter]
virtual int32_t video_decode_get_display(int32_t * width, int32_t * height) {return 0;}//= 0;
^
vendor/amlogic/frameworks/av/AmFFmpegAdapter/include/AmFFmpegCodec.h:88:52: warning: unused parameter âcodeMimeâ [-Wunused-parameter]
virtual int32_t audio_decode_init(const char * codeMime, AUDIO_INFO_T *ainfo){return 0;}
^
vendor/amlogic/frameworks/av/AmFFmpegAdapter/include/AmFFmpegCodec.h:88:76: warning: unused parameter âainfoâ [-Wunused-parameter]
virtual int32_t audio_decode_init(const char * codeMime, AUDIO_INFO_T *ainfo){return 0;}
^
vendor/amlogic/frameworks/av/AmFFmpegAdapter/include/AmFFmpegCodec.h:89:64: warning: unused parameter âdataâ [-Wunused-parameter]
virtual int32_t audio_decode_frame(AUDIO_FRAME_WRAPPER_T * data, int * got_frame, PACKET_WRAPPER_T * avpkt){return 0;}
^
vendor/amlogic/frameworks/av/AmFFmpegAdapter/include/AmFFmpegCodec.h:89:76: warning: unused parameter âgot_frameâ [-Wunused-parameter]
virtual int32_t audio_decode_frame(AUDIO_FRAME_WRAPPER_T * data, int * got_frame, PACKET_WRAPPER_T * avpkt){return 0;}
^
vendor/amlogic/frameworks/av/AmFFmpegAdapter/include/AmFFmpegCodec.h:89:106: warning: unused parameter âavpktâ [-Wunused-parameter]
virtual int32_t audio_decode_frame(AUDIO_FRAME_WRAPPER_T * data, int * got_frame, PACKET_WRAPPER_T * avpkt){return 0;}
^
12 warnings generated.
[ 67% 31969/47622] target arm C++: libamffmpegadapter_32 âŚrameworks/av/AmFFmpegAdapter/formatters/AVCCFormatter.cpp
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 (01:01:10 (hh:mm:ss))
I will try on different machine (probably on VirtualBox). This was failing on Linux Mint 18.1 (not virtual machine).
No luck
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.
So totally confusedâŚ
What is the environment you build Android Nougat?
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)
So maybe somethingâs missing in sources?
Might me something with this as error also mentions libamffmpeg: https://github.com/khadas/android_external_ffmpeg/commit/275dee1cfd4d40b121ef4c74629db38d7498e9df
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.
Maybe itâs actually this repository that triggers error: GitHub - khadas/android_vendor_amlogic_external_ffmpeg
Please give me more informations about it
- whatâs the system of your host PC ?
- Did you try to Establish a Build Environment ?
- Did you extend the swap partition ?
terry@Server:~/project/vim/nougat/vendor/amlogic/external/ffmpeg$ free -m
total used free shared buffers cached
Mem: 19955 13181 6773 15 6905 2179
-/+ buffers/cache: 4097 15857
Swap: 20351 0 20351
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.
@davemf, have you stumbled upon some of these errors while building Nougat? Which ubuntu version did you use?
[quote]clang++: error: unable to execute command: Aborted
clang++: error: linker command failed due to signal (use -v to see invocation)[/quote]
I managed to build Android Nougat successfully on Ubuntu 14 under VirtualBox, will post instructions how Iâve made it
However, when booted Android keeps triggering âsystem UI failedâ error.
Does it work with your 8 GB RAM to build Nougat? Thank you very much. @Terry
root@doelmann-HP-EliteDesk-800-G1-TWR:/home/doelmann/AOSP_7/vendor/amlogic/external/ffmpeg# free -m
total used free shared buffers cached
Mem: 7895 6052 1843 231 434 3503
-/+ buffers/cache: 2113 5781
Swap: 8102 291 7811
Does it work with this PC Environment to build Nougat?
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.