I am trying to build cubieboard 4 AOSP source (version 4.4. I think it has nothing to do with Cubieboard). But I am getting errors related to proguard: Error: Can't read [proguard.ClassPathEntry#5f893efe] (unexpected EOF)
build/core/java.mk:435: recipe for target 'out/target/common/obj/APPS/Camera2_intermediates/proguard.classes.jar' failed
In fact I was able to build complete source without errors previously. But don't know all of a sudden how come this error started appearing.
I have gone through link Android Proguard java.io.IOException, though this is related to file not found and mine is unexpected EOF (End of file); and have already tried below things:
Deleting complete out folder and then doing $make -j4
sourcing envsetup.sh $. build/envsetup.sh
Replacing original proguard tool(4.7) with latest (5.3.1)
I can comment particular PRODUCT_PACKAGES from /build/target/product/sdk.mk etc for which proguard error was coming. But finally came across error for Camera2 which is absolutely needed for my application and cannot be commented.
Anybody came across this and found solution? Please Help!
DETAILED LOG with proguard 5.3.1:
Reading library jar [/home/osboxes/Project/Semapresence/cc-a80/android-fresh/out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/classes.jar]
Reading library jar [/home/osboxes/Project/Semapresence/cc-a80/android-fresh/out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/classes.jar]
Error: Can't read [/home/osboxes/Project/Semapresence/cc-a80/android-fresh/out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/classes.jar] (unexpected EOF)
Error: Can't read [/home/osboxes/Project/Semapresence/cc-a80/android-fresh/out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/classes.jar] (unexpected EOF)
build/core/java.mk:435: recipe for target 'out/target/common/obj/APPS/DeskClock_intermediates/proguard.classes.jar' failed
make: *** [out/target/common/obj/APPS/DeskClock_intermediates/proguard.classes.jar] Error 1
make: *** Waiting for unfinished jobs....
build/core/java.mk:435: recipe for target 'out/target/common/obj/APPS/Camera2_intermediates/proguard.classes.jar' failed
make: *** [out/target/common/obj/APPS/Camera2_intermediates/proguard.classes.jar] Error 1
Answering my own question. Hope it can help other who faced similar issue:
I could temporarily solve my problem by disabling proguard for particular module for which it was giving error.
To do this added below line to Android.mk
LOCAL_PROGUARD_ENABLED := disabled
Related
i keep getting this error when it builds the kernel module. i tried to go to the directory to fix it. (built-in.o) it didnt work and caused more problems with the build/kernel directory folder.
LD drivers/input/touchscreen/built-in.o
arm-eabi-ld: cannot find /home/taco/android/system/kernel/lge/msm8909/drivers/input/touchscreen/ft_gesture_lib.a: No such file or directory
/home/taco/android/system/kernel/lge/msm8909/scripts/Makefile.build:387: recipe for target 'drivers/input/touchscreen/built-in.o' failed
make[5]: *** [drivers/input/touchscreen/built-in.o] Error 1
/home/taco/android/system/kernel/lge/msm8909/scripts/Makefile.build:455: recipe for target 'drivers/input/touchscreen' failed
make[4]: *** [drivers/input/touchscreen] Error 2
/home/taco/android/system/kernel/lge/msm8909/scripts/Makefile.build:455: recipe for target 'drivers/input' failed
make[3]: *** [drivers/input] Error 2
/home/taco/android/system/kernel/lge/msm8909/Makefile:815: recipe for target 'drivers' failed
make[2]: *** [drivers] Error 2
Makefile:130: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/home/taco/android/system/kernel/lge/msm8909'
build/core/tasks/kernel.mk:286: recipe for target 'TARGET_KERNEL_BINARIES' failed
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: Leaving directory '/home/taco/android/system'
#### make failed to build some targets (11:59 (mm:ss)) ####
taco#taco-VirtualBox:~/android/system$
Usually it happens when repo manifest uses projects of incompatible version, say if you take CM13 manifest and add msm8909 drivers which were built against some older kernel version than that used in CM13 manifest.
Are you building an existing official or unofficial CM port for your device, or do you assemble a new port? In any case you should provide more info about your repo manifest and CM port if you use any.
If the issue is that I described, it is usually hard to fix, as it means porting driver code to a newer kernel version. This work is usually made by people maintaining driver's code, it needs proper experience. Of course there's a chance that it may need just cosmetic changes, but it's a rare case.
In your repo manifest check what git repository is used for the driver, then check for what kernel version that code was used (it's usually can be seen in git tags/branches). There's a chance that the repo has an updated branch for kernel version you need, but your repo manifest takes an old version.
I am trying to compile vlc-android from source acording to this manual. AndroidCompile
I'm getting this error:
CC src/smb_utils.lo
src/smb_utils.c:32:19: fatal error: iconv.h: No such file or directory
#include <iconv.h>
^
compilation terminated.
make[1]: *** [src/smb_utils.lo] Error 1
And at the end this:
checking for iconv... no, consider installing GNU libiconv
configure: error: iconv() not found
make: *** [.zvbi] Error 1
contribs: make failed
The weird thing is that it workied fine yesterday.
Im using Linux Mint 17.2
Found the solution (workaround actually).
Problem is that android patch for iconv (contrib/src/iconv/libiconv-android-ios.patch) fails to apply. It is already applied in iconv version 1.14
Temporary workaround is to comment out patch applying for android. It is on line 26 of contrib/src/iconv/rules.mak
Im trying to build AOSP 5.1.51, I machine meets requirements
Following the instructions but the make -j4 never build succesfully.
Recently trying to lunch aosp_mips-eng terminates with
target C++: v8_tools_gyp_v8_base_gyp <= external/chromium_org/v8/src/mips/lithium-mips.cc
In file included from external/chromium_org/v8/src/mips/lithium-codegen-mips.h:11:0, from external/chromium_org/v8/src/mips/lithium-codegen-mips.cc:36:
external/chromium_org/v8/src/mips/lithium-mips.h: In member function 'bool v8::internal::LCodeGen::GeneratePrologue()':
external/chromium_org/v8/src/mips/lithium-mips.h:2718:7: internal compiler error: Segmentation fault
class LChunkBuilder FINAL : public LChunkBuilderBase {
^
Please submit a full bug report, with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
make: *** [/home/userAndroid/Builds/AOSP/target/product/generic_mips/obj/STATIC_LIBRARIES/v8_tools_gyp_v8_base_gyp_intermediates/v8/src/mips/lithium-codegen-mips.o] Error 1
make: *** Waiting for unfinished jobs....
#### make failed to build some targets (21:29 (mm:ss)) ####
And it ends there :(
After so many tries, I ended up removing the entire source repo, fetch everything and build. Now everything works way better than before. I have not read everything to see if its the introduction of jackor things are better with the latest branch of android source.
If you are struggling with your build, this could be the way to go.
I am cross compiling gdcm with cmake android it goes till end of compilation but at last I get following error. how do you guys set -soname in cmake-gui or cmake while compiling libraries so that we can avoid below kind of error.
/opt/android/android-ndk-r10c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux- androideabi/bin/ld: fatal error: -soname: must take a non-empty argument
collect2: error: ld returned 1 exit status
make[2]: *** [/home/likewise-open/SLKTECHLABS/kirtan.patel/Desktop/GDCM/GDCMSource/libs/armeabi-v7a/libgdcmjni.so] Error 1
make[1]: *** [Wrapping/Java/CMakeFiles/gdcmjni.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/home/kirtan.patel/Desktop/GDCM/GDCMSource/Source/MediaStorageAndFileFormat/gdcmImageWriter.h:36: Warning 822: Covariant return types not supported in Java. Proxy method will return gdcm::Pixmap const &.
/home/kirtan.patel/Desktop/GDCM/GDCMSource/Source/MediaStorageAndFileFormat/gdcmImageCodec.h:45: Warning 473: Returning a pointer or reference in a director method is not recommended.
As Romanski pointed out CMake versions 3.2 and 3.0 have different behaviour because of difference in UseSWIG.cmake files. In 3.2 NO_SONAME property enabled by default looks like it raises conflict in android build producing invalid linking option -Wl,-soname, with empty TARGET_SONAME.
There are two ways to fix build with 3.2 version
string(REPLACE "<CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME>" "" CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE}") eliminates broken linking option at all
set_target_properties(${MY_TARGET} PROPERTIES NO_SONAME OFF) fix broken linking option with correct so-name.
I am trying to build and run a test project for android following this guide :
"http://www.cocos2d-x.org/wiki/Setting_up_Android_Development_Environment_on_Mac_OSX#Get-the-NDK"
The specific problem is after building the Test demo in eclipse which is called "TestCpp"
which has another project linked to it "libcocos2dx" i get an error stating:
make: *** [obj/local/armeabi/objs/cocos_extension_static/CocoStudio/Reader/WidgetReader/LabelReader/LabelReader.o] Error 1
This is what the console displayed through the build process:
**** Build of configuration Default for project TestCpp ****
bash /Users/mohammadbaroudi/Downloads/cocos2d-x-2.2.5/samples/Cpp/TestCpp/proj.android/build_native.sh
NDK_ROOT = /Users/mohammadbaroudi/Downloads/android-ndk-r10
COCOS2DX_ROOT = /Users/mohammadbaroudi/Downloads/cocos2d-x-2.2.5/samples/Cpp/TestCpp/proj.android/../../../..
APP_ROOT = /Users/mohammadbaroudi/Downloads/cocos2d-x-2.2.5/samples/Cpp/TestCpp/proj.android/..
APP_ANDROID_ROOT = /Users/mohammadbaroudi/Downloads/cocos2d-x-2.2.5/samples/Cpp/TestCpp/proj.android
Using prebuilt externals
Android NDK: WARNING:/Users/mohammadbaroudi/Downloads/cocos2d-x-2.2.5/samples/Cpp/TestCpp/proj.android/../../../../cocos2dx/Android.mk:cocos2dx_static: LOCAL_LDLIBS is always ignored for static libraries
make: Entering directory /Users/mohammadbaroudi/Downloads/cocos2d-x-2.2.5/samples/Cpp/TestCpp/proj.android'
[armeabi] Compile++ thumb: cocos_extension_static <= LabelReader.cpp
/Users/mohammadbaroudi/Downloads/cocos2d-x-2.2.5/samples/Cpp/TestCpp/proj.android/../../../../extensions/CocoStudio/Reader/WidgetReader/LabelReader/LabelReader.cpp: In member function 'virtual void cocos2d::extension::LabelReader::setPropsFromJsonDictionary(cocos2d::ui::Widget*, const Value&)':
/Users/mohammadbaroudi/Downloads/cocos2d-x-2.2.5/samples/Cpp/TestCpp/proj.android/../../../../extensions/CocoStudio/Reader/WidgetReader/LabelReader/LabelReader.cpp:54:9: error: 'transform' is not a member of 'std'
std::transform(file_extension.begin(),file_extension.end(), file_extension.begin(), (int(*)(int))toupper);
^
make: *** [obj/local/armeabi/objs/cocos_extension_static/CocoStudio/Reader/WidgetReader/LabelReader/LabelReader.o] Error 1
make: Leaving directory/Users/mohammadbaroudi/Downloads/cocos2d-x-2.2.5/samples/Cpp/TestCpp/proj.android'
**** Build Finished ****
Now I checked the file path and it pointed to a non-existing obj file "LabelReader.o", the strange thing is that in the "/WidgetReader" folder "mentioned in the error above", there are multiple reader folders e.g:"ButtonReader,CheckBoxReader,etc" all with accompanying ".o" & ".o.d" files with the same names except for the LabelReader folder which is empty.
I tried to exclude the "LabelReader.o" file from the build process through right clicking on the file in eclipse and excluding it, but the same error occurred and I tried to right click on the error in the problems tab and hit "fix" which notified me that it cant fix it.The last thing that came to mind was excluding the "LabelReader.o" file from compilation through modifying the makefile itself, where its discussed here:
Makefile. How to exclude one particular file from compilation?
But there seemed to be multiple methods of doing so, and still i am not sure i completely understand whats wrong other than there is a missing file thats being complied but can't be built.I am sorry if this question is too big and it also is my first question here so excuse me if i wrote a lot.
add this line in file where error occurred
#include <algorithm>