ld error when compile the libwebcore.so

来源:互联网 发布:近年物流业发展数据 编辑:程序博客网 时间:2024/06/16 19:03
I had the same issue as you complained about it here. So for me it was due to the fact that I stopped the build process from make by pressing Ctrl+c becauses it slowed down my machine and it took almost 20 hours to compile and the machine seemed to be frozen. I just retype the make command : make -j8 to relaunch the build after stopping it and I got this error:
prebuilts/gcc/darwin-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/SHARED_LIBRARIES/libwebcore_intermediates/Source/WebKit/android/jni/WebCoreJniOnLoad.o: in function gWebCoreRegMethods:WebCoreJniOnLoad.cpp(.data.rel._ZL18gWebCoreRegMethods+0x7c): error: undefined reference to 'android::registerCacheManager(_JNIEnv*)'
collect2: ld returned 1 exit status
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libwebcore_intermediates/LINKED/libwebcore.so] Error 1

The problem was due to some incomplete builds of WebCore libraries files. Here is the solution :
#First I cleaned the build files for libwebcore only not to clean all builds, otherwise, we will have to redo all build again
1. make clean-libwebcore

#Secondly I build only the libwebcore modules to be concerned only about it until it gets to success. That way your build error will be easier to troubleshooting because you focus only on 1 module
2. make -j8 libwebcore

#Third, you just have to launch a normal build process with make to go on  building the other remaining modules 
3. make -j8 

#Cross your finger and pray God that this last step leads you to success. I was facing this issue by building an update of Jelly Bean Branch(android-4.1.2_r1 released in October 9th,2012)

These steps were successful for me after figuring it out after 3 days of unsuccessful attemps. My machine was a MacBook Pro with Snow leopard on it and Intel Core 7 Processor. So I was inspired by the following link :
http://www.mailinglistarchive.com/html/android-platform@googlegroups.com/2009-04/msg00195.html

0 0
原创粉丝点击