使用CyanogenMod编译SDK遇到的问题总结
2014-01-09 20:44
609 查看
使用CyanogenMod编译SDK遇到的问题总结
我编译的源码是CM11
一、编译方法
参考http://book.51cto.com/art/201212/374929.htm
二、遇到的问题
1、错误提示一:
build/core/main.mk:667: *** : Module 'Gallery' in PRODUCT_PACKAGES has nothing to install!. Stop.
类似这样的错误修改build/target/product/sdk.mk,把相应的模块去掉如删除Gallery \。
原因是CM11的不断,删除或更换了一些应用。
2、错误提示二:
/home/tony.wu/project_tony/code/cm/cm-11.0/out/host/linux-x86/obj/STATIC_LIBRARIES/libusbx_intermediates/libusbx.a(linux_usbfs.o):
In function `op_hotplug_poll':
/home/tony.wu/project_tony/code/cm/cm-11.0/external/libusbx/libusb/os/linux_usbfs.c:495: undefined reference to `linux_netlink_hotplug_poll'
/home/tony.wu/project_tony/code/cm/cm-11.0/out/host/linux-x86/obj/STATIC_LIBRARIES/libusbx_intermediates/libusbx.a(linux_usbfs.o): In function `linux_stop_event_monitor':
/home/tony.wu/project_tony/code/cm/cm-11.0/external/libusbx/libusb/os/linux_usbfs.c:469: undefined reference to `linux_netlink_stop_event_monitor'
/home/tony.wu/project_tony/code/cm/cm-11.0/out/host/linux-x86/obj/STATIC_LIBRARIES/libusbx_intermediates/libusbx.a(linux_usbfs.o): In function `linux_start_event_monitor':
/home/tony.wu/project_tony/code/cm/cm-11.0/external/libusbx/libusb/os/linux_usbfs.c:460: undefined reference to `linux_netlink_start_event_monitor'
/home/tony.wu/project_tony/code/cm/cm-11.0/out/host/linux-x86/obj/STATIC_LIBRARIES/libusbx_intermediates/libusbx.a(linux_usbfs.o): In function `linux_stop_event_monitor':
/home/tony.wu/project_tony/code/cm/cm-11.0/external/libusbx/libusb/os/linux_usbfs.c:469: undefined reference to `linux_netlink_stop_event_monitor'
collect2: ld returned 1 exit status
make: *** [/home/tony.wu/project_tony/code/cm/cm-11.0/out/host/linux-x86/obj/EXECUTABLES/heimdall_intermediates/heimdall] 错误 1
为编译通过,没有实际解决这个问题,只是粗暴地注释掉。
3、错误提示三:
## Running sdk/eclipse/scripts/create_all_symlinks.sh
### Starting tools/base: gradlew publishLocal
sdk/eclipse/scripts/create_all_symlinks.sh: 第 285 行: cd: tools/base: 没有那个文件或目录
make: *** [/home/tony.wu/project_tony/code/cm/cm-11.0/out/host/linux-x86/obj/EXECUTABLES/monitor_intermediates/monitor] 错误 1
确实没有tools/base这个目录,而.repo/manifest.xml有定义。
根据https://groups.google.com/forum/#!msg/android-building/DpKnrpLMBgI/AEDpB4XA8e4J提示,需要"repo
init -g all ; repo sync" 重新同步下来。
4、 错误提示四:
make: *** 没有规则可以创建“/home/tony.wu/project_tony/code/cm/cm-11.0/out/target/product/generic/obj/STATIC_LIBRARIES/libminui_intermediates/events.o”需要的目标“/home/tony.wu/project_tony/code/cm/cm-11.0/out/target/product/generic/obj/KERNEL_OBJ/usr”。
停止。
make: *** 正在等待未完成的任务....
将其它编译过的项目的KERNEL_OBJ目录复制过来
如:cp out/target/product/vivo/obj/KERNEL_OBJ/ out/target/product/generic/obj/KERNEL_OBJ/
5、错误提示五:
target Prebuilt: (/home/tony.wu/project_tony/code/cm/cm-11.0/out/target/product/generic/kernel)
acp: missing destination file
make: *** [/home/tony.wu/project_tony/code/cm/cm-11.0/out/target/product/generic/kernel] 错误 2
将其它编译过的项目的kernel如cp out/target/product/vivo/kernel out/target/product/generic/kernel目录复制过来
至此编译生成了out\host\linux-x86\sdk\android-sdk_4c423d77ba_linux-x86.zip
这个是linux平台上使用的SDK,打开eclipse配置SDK的目录即可使用。
三、windows平台的SDK编译
四、编win版本SDK遇到的问题
frameworks/native/include/binder/Parcel.h:69: 错误: expected ‘,’ or ‘...’ before ‘struct’
frameworks/native/include/binder/Parcel.h:78: 错误: expected ‘,’ or ‘...’ before ‘struct’
make[1]: *** [/home/tony.wu/project_tony/code/cm/cm-11.0/out/host/windows-x86/obj/STATIC_LIBRARIES/libandroidfw_intermediates/AssetManager.o] 错误 1
查看frameworks/native/include/binder/Parcel.h代码
// Writes the RPC header.
status_t writeInterfaceToken(const String16& interface);
bool enforceInterface(const String16& interface,
IPCThreadState* threadState = NULL) const;
应该是interface 被宏义为struct。
所以在该文件中加入取消宏定义的代码。
#undef interface //加入的代码
class Parcel {
N久的等待,终于在out\host\windows\sdk\下生成SDK包。
我编译的源码是CM11
一、编译方法
参考http://book.51cto.com/art/201212/374929.htm
$. build/envsetup.sh//这里容易出错的地方就是,build前有一个空格 $lunch sdk-eng//加载sdk-eng,默认是full-eng $make sdk//编译SDK
二、遇到的问题
1、错误提示一:
build/core/main.mk:667: *** : Module 'Gallery' in PRODUCT_PACKAGES has nothing to install!. Stop.
类似这样的错误修改build/target/product/sdk.mk,把相应的模块去掉如删除Gallery \。
原因是CM11的不断,删除或更换了一些应用。
2、错误提示二:
/home/tony.wu/project_tony/code/cm/cm-11.0/out/host/linux-x86/obj/STATIC_LIBRARIES/libusbx_intermediates/libusbx.a(linux_usbfs.o):
In function `op_hotplug_poll':
/home/tony.wu/project_tony/code/cm/cm-11.0/external/libusbx/libusb/os/linux_usbfs.c:495: undefined reference to `linux_netlink_hotplug_poll'
/home/tony.wu/project_tony/code/cm/cm-11.0/out/host/linux-x86/obj/STATIC_LIBRARIES/libusbx_intermediates/libusbx.a(linux_usbfs.o): In function `linux_stop_event_monitor':
/home/tony.wu/project_tony/code/cm/cm-11.0/external/libusbx/libusb/os/linux_usbfs.c:469: undefined reference to `linux_netlink_stop_event_monitor'
/home/tony.wu/project_tony/code/cm/cm-11.0/out/host/linux-x86/obj/STATIC_LIBRARIES/libusbx_intermediates/libusbx.a(linux_usbfs.o): In function `linux_start_event_monitor':
/home/tony.wu/project_tony/code/cm/cm-11.0/external/libusbx/libusb/os/linux_usbfs.c:460: undefined reference to `linux_netlink_start_event_monitor'
/home/tony.wu/project_tony/code/cm/cm-11.0/out/host/linux-x86/obj/STATIC_LIBRARIES/libusbx_intermediates/libusbx.a(linux_usbfs.o): In function `linux_stop_event_monitor':
/home/tony.wu/project_tony/code/cm/cm-11.0/external/libusbx/libusb/os/linux_usbfs.c:469: undefined reference to `linux_netlink_stop_event_monitor'
collect2: ld returned 1 exit status
make: *** [/home/tony.wu/project_tony/code/cm/cm-11.0/out/host/linux-x86/obj/EXECUTABLES/heimdall_intermediates/heimdall] 错误 1
为编译通过,没有实际解决这个问题,只是粗暴地注释掉。
3、错误提示三:
## Running sdk/eclipse/scripts/create_all_symlinks.sh
### Starting tools/base: gradlew publishLocal
sdk/eclipse/scripts/create_all_symlinks.sh: 第 285 行: cd: tools/base: 没有那个文件或目录
make: *** [/home/tony.wu/project_tony/code/cm/cm-11.0/out/host/linux-x86/obj/EXECUTABLES/monitor_intermediates/monitor] 错误 1
确实没有tools/base这个目录,而.repo/manifest.xml有定义。
根据https://groups.google.com/forum/#!msg/android-building/DpKnrpLMBgI/AEDpB4XA8e4J提示,需要"repo
init -g all ; repo sync" 重新同步下来。
4、 错误提示四:
make: *** 没有规则可以创建“/home/tony.wu/project_tony/code/cm/cm-11.0/out/target/product/generic/obj/STATIC_LIBRARIES/libminui_intermediates/events.o”需要的目标“/home/tony.wu/project_tony/code/cm/cm-11.0/out/target/product/generic/obj/KERNEL_OBJ/usr”。
停止。
make: *** 正在等待未完成的任务....
将其它编译过的项目的KERNEL_OBJ目录复制过来
如:cp out/target/product/vivo/obj/KERNEL_OBJ/ out/target/product/generic/obj/KERNEL_OBJ/
5、错误提示五:
target Prebuilt: (/home/tony.wu/project_tony/code/cm/cm-11.0/out/target/product/generic/kernel)
acp: missing destination file
make: *** [/home/tony.wu/project_tony/code/cm/cm-11.0/out/target/product/generic/kernel] 错误 2
将其它编译过的项目的kernel如cp out/target/product/vivo/kernel out/target/product/generic/kernel目录复制过来
至此编译生成了out\host\linux-x86\sdk\android-sdk_4c423d77ba_linux-x86.zip
这个是linux平台上使用的SDK,打开eclipse配置SDK的目录即可使用。
三、windows平台的SDK编译
$. build/envsetup.sh//这里容易出错的地方就是,build前有一个空格 $lunch sdk-eng//加载sdk-eng,默认是full-eng $make win_sdk//编译SDK
四、编win版本SDK遇到的问题
frameworks/native/include/binder/Parcel.h:69: 错误: expected ‘,’ or ‘...’ before ‘struct’
frameworks/native/include/binder/Parcel.h:78: 错误: expected ‘,’ or ‘...’ before ‘struct’
make[1]: *** [/home/tony.wu/project_tony/code/cm/cm-11.0/out/host/windows-x86/obj/STATIC_LIBRARIES/libandroidfw_intermediates/AssetManager.o] 错误 1
查看frameworks/native/include/binder/Parcel.h代码
// Writes the RPC header.
status_t writeInterfaceToken(const String16& interface);
bool enforceInterface(const String16& interface,
IPCThreadState* threadState = NULL) const;
应该是interface 被宏义为struct。
所以在该文件中加入取消宏定义的代码。
#undef interface //加入的代码
class Parcel {
N久的等待,终于在out\host\windows\sdk\下生成SDK包。
相关文章推荐
- 使用CyanogenMod编译SDK遇到的问题总结
- 编译hadoop,spark遇到的问题总结
- matlab文件编译成库在C++环境下使用遇到的问题记录
- iOS: FFmpeg编译和使用问题总结
- ===注册时使用消息队列 发送邮件。遇到的【环境问题】总结。==比代码问题难找!!!
- iOS: FFmpeg编译和使用问题总结
- VS2010 DSOFrame 编译遇到的问题总结
- 使用ICE遇到的编译问题
- [图解]Symbian 编程总结-工具与扩展-让Symbian SDK使用最新的GCCE进行编译
- 使用U盘安装centos6.8遇到的一点问题总结
- (原创)开发使用Android studio所遇到的一些问题总结
- oracle 11g使用deferred_segment_creation 延迟段创建特性时遇到的问题总结
- iOS: FFmpeg编译和使用问题总结
- 使用mybatis分页插件PageHelper5.0.0遇到的问题总结
- iOS: FFmpeg编译和使用问题总结
- 使用eclipse编译jni代码遇到的问题记录
- g++使用第三方库编译时遇到的一个小问题
- iOS: FFMpeg编译和使用问题总结
- 使用mybatis分页插件PageHelper5.0.0遇到的问题总结
- spring cloud-Feign使用中遇到的问题总结