I'm getting the following error while building Android ROM, either it is AOSP/CyanogenMod
In file included from hardware/ril-caf/libril/RilSapSocket.cpp:21:0:
hardware/ril-caf/libril/RilSapSocket.h:22:55: fatal error: hardware/ril/librilutils/proto/sap-api.pb.h: No such file or directory
#include <hardware/ril/librilutils/proto/sap-api.pb.h>
^
compilation terminated.
When I look into the path in github.com/CyanogenMod and github.com/Android I couldn't find sap-api.pb.h
What could be the problem and how can I resolve it?
I got the same error message, and I tried to find the generated file with find command:
$ find . -name "sap-api.pb.h"
./out/target/product/bacon/gen/STATIC_LIBRARIES/librilutils_static_intermediates/proto/hardware/ril-caf/librilutils/proto/sap-api.pb.h
./out/target/product/bacon/gen/SHARED_LIBRARIES/librilutils_intermediates/proto/hardware/ril-caf/librilutils/proto/sap-api.pb.h
then I notice the #include path is a bit different from the real path, I open the error .h file and change hardware/ril/... to hardware/ril-caf/... in these two files:
hardware/ril-caf/libril/rilSocketQueue.h
hardware/ril-caf/libril/RilSapSocket.h
Then, the build passed.
Hope this help.
Related
I am compiling Android Kernel 3.18.
I am getting this error
drivers/built-in.o: In function `enable_extldo':
/home/vinay/customKernel/3.18/kernel_yu_msm8937/drivers/bluetooth/bluetooth-power.c:307: undefined reference to `cnss_get_platform_cap'
/home/vinay/customKernel/3.18/kernel_yu_msm8937/drivers/bluetooth/bluetooth-power.c:307:(.text+0x5c45bc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `cnss_get_platform_cap'
Makefile:951: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1
Here is the source code
I am using aarch64-linux-android-4.9 toolchain
I encountered the same problem when I tried to compile a kernel for a MI device.
First you can see the function cnss_get_platform_cap was declared in cnss.h which is located in include/net:
And you open this file you will find this function was declared as a extern one:
So it is only a declaration here, not a implement.
Then we have a dig where the function is, I used find command to find all cnss related driver files and I find this function was implemented in ./net/wireless/cnss/cnss_pci.c
As we can see, the function was here and it will be a exported symbol after compiling.
And you can log your compile process and you will find actually succeed to compile bluetooth-power.c
Just when the makefile link vmlinux it will be a problem. So here we are. I searched the log and I didn't find cnss_pci.c was ever compiled, only cnss_common.c was compiled, let's open the sub-makefile in net/wireless/cnss/
You will find you need to add a item in your defconfig file to compile cnss_pci.c which is 'CONFIG_CNSS_PCI=y'. I add it to my defconfig file in arch/arm64/configs/xxx_defconfig and I solved this.
I just tried to merge a vendor patch into a newer CAF kernel, and there are many many syntax errors even with auto merge.
As for the logic error and bugs, I don't know. A lot of things need to learn.
Hope you find your way out.
I am getting source code from this directory link but it throwing this error. I already got many source codes from github or git but mostly not getting any error. but this time it is not solving by different tricks. any help will be appreciated
Error:Execution failed for task ':generateDebugProto'.
> protoc: stdout: . stderr: D:\2BVPRO'S\launcher3\launcher3\src\main\proto: warning: directory does not exist.
D:\2BVPRO'S\launcher3\launcher3\build\extracted-protos\main: warning: directory does not exist.
D:\2BVPRO'S\launcher3\launcher3\build\extracted-include-protos\main: warning: directory does not exist.
D:\2BVPRO'S\launcher3\launcher3\src\debug\proto: warning: directory does not exist.
D:\2BVPRO'S\launcher3\launcher3\build\extracted-protos\debug: warning: directory does not exist.
D:\2BVPRO'S\launcher3\launcher3\build\extracted-include-protos\debug: warning: directory does not exist.
D:\2BVPRO'S\launcher3\launcher3\src\debug\proto: warning: directory does not exist.
D:\2BVPRO'S\launcher3\launcher3\build\extracted-protos\debug: warning: directory does not exist.
D:\2BVPRO'S\launcher3\launcher3\build\extracted-include-protos\debug: warning: directory does not exist.
backup.proto:21:8: Option "javanano_use_deprecated_package" unknown.
I ran into the same problem. I tried creating the path but it was getting wiped when I tried to build.
I ended up grabbing the source from https://f-droid.org/wiki/page/com.android.launcher3 They also note an attempt to build failed due to protos which forced the removal of backup. The source can be downloaded directly from https://f-droid.org/repo/com.android.launcher3_1_src.tar.gz
In Launcher3/protos is a file called backup.proto. In the file:
package launcher_backup;
//option javanano_use_deprecated_package = true; >>> remark this line out.
option java_package = "com.android.launcher3.backup";
option java_outer_classname = "BackupProtos";
I was able to compile this. Apparently, this is no longer in later versions of protocol buffers. I have no idea the side effects but I was able to compile, install and use with no problems.
See https://github.com/google/protobuf/releases
I wanted to try out PocketSphinxAndroidDemo. I thought I meticulously followed the tutorial on how to get it running here: https://sites.google.com/site/opiatefuchs/home/pocketsphinxandroiddemo
But I must be missing something. I get the following error when I do a run as as an android application from eclipse:
jni/pocketsphinx_wrap.c:760:26: fatal error: pocketsphinx.h: No such file or directory
compilation terminated.
make: * [obj/local/armeabi/objs-debug/pocketsphinx_jni/pocketsphinx_wrap.c] Error 1
I'm leaning towards maybe I did the ndk-build wrong - but it all seemed to work properly in the cygwin terminal.
I'm hoping someone can point me in the right direction. Thanks.
I've reviewed this previous post and it does not seem to contain an answer for me:
http://sourceforge.net/p/cmusphinx/discussion/help/thread/8369b305/
I use ant to unzip an apk file, but it occurred an error like this:
<unzip src="test.apk" dest="testdir" >
error message:
java.lang.RuntimeException: data starting at 0 is in unknown format
i googled it, and add attribute encoding="native-encoding" , it still error.
great thanks for any help!
ok,finally I wrote a custom ant task using java ziputil to unzip an apk files. It does work well.
Need your guidance, I am writing one app in android with the help of native code which will communicate with CAN (Controller Area Network) port ; for that in my C code i used linux/can.h header file. and i am following "http://mobilepearls.com/labs/ndk-builder-in-eclipse/" this link to build my app. but one i set all thing i got bellow msg in eclipse console box
Compile thumb : can_port <= cansend.c
jni/cansend.c:14:23: fatal error: linux/can.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs/can_port/cansend.o] Error 1
One more thing, i am working on windows environment. But i don't think this may be cause.
It is correct that it is not a Windows/Linux problem. The simple problem is that compiler is unable to find the file can.h. Now, for your info, when the compiler starts compiling, it searches for its header files in the folder
C:\(path to NDK folder)\platforms\(android-version)\(arch)\usr\include\linux
Now, if there isn't a can.h there, the compiler will flag an error. So the best way is
Either copy can.h to the above path (not tested)
Modify your Makefile to path to the correct directory where this header file is kept
Hope this helps!