我正在使用python for Android构建zope2,但我最终得到以下错误:
Leaving ARM enviromnent
Skipped build_python
Skipped build_pil
Entering in ARM enviromnent
Compiler found at /home/zachary/android-ndk-r8c/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin//arm-linux-androideabi-gcc
Biglink create /home/zachary/python-for-android/build/libs/libpymodules.so library
Biglink arguments:
/home/zachary/python-for-android/build/objects/_arraysurfarray.so.o
/home/zachary/python-for-android/build/objects/c_opengl_debug.so.o
/home/zachary/python-for-android/build/objects/_MethodObject.so.o
/home/zachary/python-for-android/build/objects/_android_sound.so.o
/home/zachary/python-for-android/build/objects/key.so.o
/home/zachary/python-for-android/build/objects/pixelarray.so.o
/home/zachary/python-for-android/build/objects/shader.so.o
/home/zachary/python-for-android/build/objects/buffer.so.o
/home/zachary/python-for-android/build/objects/cPickleCache.so.o
/home/zachary/python-for-android/build/objects/stencil_instructions.so.o
/home/zachary/python-for-android/build/objects/draw.so.o
/home/zachary/python-for-android/build/objects/instructions.so.o
/home/zachary/python-for-android/build/objects/TimeStamp.so.o
/home/zachary/python-for-android/build/objects/gfxdraw.so.o
/home/zachary/python-for-android/build/objects/fbo.so.o
/home/zachary/python-for-android/build/objects/_android.so.o
/home/zachary/python-for-android/build/objects/opengl_utils.so.o
/home/zachary/python-for-android/build/objects/_event.so.o
/home/zachary/python-for-android/build/objects/transformation.so.o
/home/zachary/python-for-android/build/objects/_proxy.so.o
/home/zachary/python-for-android/build/objects/surface.so.o
/home/zachary/python-for-android/build/objects/_IOBTree.so.o
/home/zachary/python-for-android/build/objects/display.so.o
/home/zachary/python-for-android/build/objects/_initgroups.so.o
/home/zachary/python-for-android/build/objects/_LOBTree.so.o
/home/zachary/python-for-android/build/objects/transform.so.o
/home/zachary/python-for-android/build/objects/_imagingmath.so.o
/home/zachary/python-for-android/build/objects/_Record.so.o
/home/zachary/python-for-android/build/objects/_IIBTree.so.o
/home/zachary/python-for-android/build/objects/vertex.so.o
/home/zachary/python-for-android/build/objects/gl_instructions.so.o
/home/zachary/python-for-android/build/objects/_zope_interface_coptimizations.so.o
/home/zachary/python-for-android/build/objects/opengl.so.o
/home/zachary/python-for-android/build/objects/_ExtensionClass.so.o
/home/zachary/python-for-android/build/objects/properties.so.o
/home/zachary/python-for-android/build/objects/_Persistence.so.o
/home/zachary/python-for-android/build/objects/surflock.so.o
/home/zachary/python-for-android/build/objects/texture.so.o
/home/zachary/python-for-android/build/objects/_zope_security_checker.so.o
/home/zachary/python-for-android/build/objects/joystick.so.o
/home/zachary/python-for-android/build/objects/_OIBTree.so.o
/home/zachary/python-for-android/build/objects/_LLBTree.so.o
/home/zachary/python-for-android/build/objects/_zope_i18nmessageid_message.so.o
/home/zachary/python-for-android/build/objects/context_instructions.so.o
/home/zachary/python-for-android/build/objects/_IFBTree.so.o
/home/zachary/python-for-android/build/objects/_fsBTree.so.o
/home/zachary/python-for-android/build/objects/_MultiMapping.so.o
/home/zachary/python-for-android/build/objects/font.so.o
-lsdl_ttf
/home/zachary/python-for-android/build/objects/base.so.o
/home/zachary/python-for-android/build/objects/_OOBTree.so.o
/home/zachary/python-for-android/build/objects/vbo.so.o
/home/zachary/python-for-android/build/objects/event.so.o
/home/zachary/python-for-android/build/objects/_ComputedAttribute.so.o
/home/zachary/python-for-android/build/objects/imageext.so.o
-lsdl_image
-lpng
/home/zachary/python-for-android/build/objects/cdrom.so.o
/home/zachary/python-for-android/build/objects/_zope_container_contained.so.o
/home/zachary/python-for-android/build/objects/color.so.o
/home/zachary/python-for-android/build/objects/_android_billing.so.o
/home/zachary/python-for-android/build/objects/constants.so.o
/home/zachary/python-for-android/build/objects/rwobject.so.o
/home/zachary/python-for-android/build/objects/_Acquisition.so.o
/home/zachary/python-for-android/build/objects/cPersistence.so.o
/home/zachary/python-for-android/build/objects/context.so.o
/home/zachary/python-for-android/build/objects/vertex_instructions.so.o
/home/zachary/python-for-android/build/objects/bufferproxy.so.o
/home/zachary/python-for-android/build/objects/image.so.o
/home/zachary/python-for-android/build/objects/_LFBTree.so.o
/home/zachary/python-for-android/build/objects/rect.so.o
/home/zachary/python-for-android/build/objects/mask.so.o
/home/zachary/python-for-android/build/objects/cAccessControl.so.o
/home/zachary/python-for-android/build/objects/overlay.so.o
/home/zachary/python-for-android/build/objects/jnius.so.o
-Llibs/armeabi
-llog
/home/zachary/python-for-android/build/objects/_imaging.so.o
-L/home/zachary/python-for-android/src/obj/local/armeabi
-L/home/zachary/android-ndk-r8c/platforms/android-14/arch-arm/usr/lib
-ljpeg
/home/zachary/python-for-android/build/objects/time.so.o
/home/zachary/python-for-android/build/objects/fastevent.so.o
/home/zachary/python-for-android/build/objects/okascore.so.o
/home/zachary/python-for-android/build/objects/compiler.so.o
-lGLESv2
/home/zachary/python-for-android/build/objects/_Missing.so.o
/home/zachary/python-for-android/build/objects/cDocumentTemplate.so.o
/home/zachary/python-for-android/build/objects/_zope_proxy_proxy.so.o
/home/zachary/python-for-android/build/objects/mouse.so.o
-L/home/zachary/python-for-android/src/obj/local/armeabi/
-lz
-L/home/zachary/python-for-android/build/python-install/lib
-lsdl
-lpython2.7
/home/zachary/python-for-android/build/objects/_OLBTree.so.o
/home/zachary/python-for-android/build/objects/stopper.so.o
-lm
-L/home/zachary/python-for-android/build/libs
/home/zachary/python-for-android/build/objects/_LOBTree.so.o: In function `init_persist_type':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeModuleTemplate.c:455: multiple definition of `init_persist_type'
/home/zachary/python-for-android/build/objects/_IOBTree.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeModuleTemplate.c:455: first defined here
/home/zachary/python-for-android/build/objects/_LOBTree.so.o: In function `get_bucket_state':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeTemplate.c:1150: multiple definition of `get_bucket_state'
/home/zachary/python-for-android/build/objects/_IOBTree.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeTemplate.c:1150: first defined here
/home/zachary/python-for-android/build/objects/_IIBTree.so.o: In function `init_persist_type':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeModuleTemplate.c:455: multiple definition of `init_persist_type'
/home/zachary/python-for-android/build/objects/_IOBTree.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeModuleTemplate.c:455: first defined here
/home/zachary/python-for-android/build/objects/_IIBTree.so.o: In function `get_bucket_state':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeTemplate.c:1150: multiple definition of `get_bucket_state'
/home/zachary/python-for-android/build/objects/_IOBTree.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeTemplate.c:1150: first defined here
/home/zachary/python-for-android/build/objects/_OIBTree.so.o: In function `init_persist_type':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeModuleTemplate.c:455: multiple definition of `init_persist_type'
/home/zachary/python-for-android/build/objects/_IOBTree.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeModuleTemplate.c:455: first defined here
/home/zachary/python-for-android/build/objects/_OIBTree.so.o: In function `get_bucket_state':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeTemplate.c:1150: multiple definition of `get_bucket_state'
/home/zachary/python-for-android/build/objects/_IOBTree.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeTemplate.c:1150: first defined here
/home/zachary/python-for-android/build/objects/_LLBTree.so.o: In function `init_persist_type':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeModuleTemplate.c:455: multiple definition of `init_persist_type'
/home/zachary/python-for-android/build/objects/_IOBTree.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeModuleTemplate.c:455: first defined here
/home/zachary/python-for-android/build/objects/_LLBTree.so.o: In function `get_bucket_state':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeTemplate.c:1150: multiple definition of `get_bucket_state'
/home/zachary/python-for-android/build/objects/_IOBTree.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeTemplate.c:1150: first defined here
/home/zachary/python-for-android/build/objects/_IFBTree.so.o: In function `init_persist_type':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeModuleTemplate.c:455: multiple definition of `init_persist_type'
/home/zachary/python-for-android/build/objects/_IOBTree.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeModuleTemplate.c:455: first defined here
/home/zachary/python-for-android/build/objects/_IFBTree.so.o: In function `get_bucket_state':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeTemplate.c:1150: multiple definition of `get_bucket_state'
/home/zachary/python-for-android/build/objects/_IOBTree.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeTemplate.c:1150: first defined here
/home/zachary/python-for-android/build/objects/_fsBTree.so.o: In function `init_persist_type':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeModuleTemplate.c:455: multiple definition of `init_persist_type'
/home/zachary/python-for-android/build/objects/_IOBTree.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeModuleTemplate.c:455: first defined here
/home/zachary/python-for-android/build/objects/_fsBTree.so.o: In function `get_bucket_state':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeTemplate.c:1150: multiple definition of `get_bucket_state'
/home/zachary/python-for-android/build/objects/_IOBTree.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeTemplate.c:1150: first defined here
/home/zachary/python-for-android/build/objects/_OOBTree.so.o: In function `init_persist_type':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeModuleTemplate.c:455: multiple definition of `init_persist_type'
/home/zachary/python-for-android/build/objects/_IOBTree.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeModuleTemplate.c:455: first defined here
/home/zachary/python-for-android/build/objects/_OOBTree.so.o: In function `get_bucket_state':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeTemplate.c:1150: multiple definition of `get_bucket_state'
/home/zachary/python-for-android/build/objects/_IOBTree.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeTemplate.c:1150: first defined here
/home/zachary/python-for-android/build/objects/cPersistence.so.o: In function `ring_move_to_head':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/persistent/ring.c:55: multiple definition of `ring_move_to_head'
/home/zachary/python-for-android/build/objects/cPickleCache.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/persistent/ring.c:55: first defined here
/home/zachary/python-for-android/build/objects/cPersistence.so.o: In function `ring_add':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/persistent/ring.c:38: multiple definition of `ring_add'
/home/zachary/python-for-android/build/objects/cPickleCache.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/persistent/ring.c:38: first defined here
/home/zachary/python-for-android/build/objects/cPersistence.so.o: In function `ring_del':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/persistent/ring.c:46: multiple definition of `ring_del'
/home/zachary/python-for-android/build/objects/cPickleCache.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/persistent/ring.c:46: first defined here
/home/zachary/python-for-android/build/objects/_LFBTree.so.o: In function `init_persist_type':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeModuleTemplate.c:455: multiple definition of `init_persist_type'
/home/zachary/python-for-android/build/objects/_IOBTree.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeModuleTemplate.c:455: first defined here
/home/zachary/python-for-android/build/objects/_LFBTree.so.o: In function `get_bucket_state':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeTemplate.c:1150: multiple definition of `get_bucket_state'
/home/zachary/python-for-android/build/objects/_IOBTree.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeTemplate.c:1150: first defined here
/home/zachary/python-for-android/build/objects/_zope_proxy_proxy.so.o: In function `init_zope_proxy_proxy':
/tmp/easy_install-pE3zst/zope.proxy-3.6.1/src/zope/proxy/_zope_proxy_proxy.c:1120: multiple definition of `init_zope_proxy_proxy'
/home/zachary/python-for-android/build/objects/_zope_container_contained.so.o:/tmp/easy_install-yJWap3/zope.container-3.11.2/src/zope/container/_zope_proxy_proxy.c:1074: first defined here
/home/zachary/python-for-android/build/objects/_zope_proxy_proxy.so.o: In function `WrapperType_Lookup':
/tmp/easy_install-pE3zst/zope.proxy-3.6.1/src/zope/proxy/_zope_proxy_proxy.c:154: multiple definition of `WrapperType_Lookup'
/home/zachary/python-for-android/build/objects/_zope_container_contained.so.o:/tmp/easy_install-yJWap3/zope.container-3.11.2/src/zope/container/_zope_proxy_proxy.c:154: first defined here
/home/zachary/python-for-android/build/objects/_OLBTree.so.o: In function `init_persist_type':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeModuleTemplate.c:455: multiple definition of `init_persist_type'
/home/zachary/python-for-android/build/objects/_IOBTree.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeModuleTemplate.c:455: first defined here
/home/zachary/python-for-android/build/objects/_OLBTree.so.o: In function `get_bucket_state':
/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeTemplate.c:1150: multiple definition of `get_bucket_state'
/home/zachary/python-for-android/build/objects/_IOBTree.so.o:/tmp/easy_install-mi1nSH/ZODB3-3.10.5/src/BTrees/BTreeTemplate.c:1150: first defined here
collect2: ld returned 1 exit status
zachary@zachary-VirtualBox:~/python-for-android$
为了得到这一点(从而复制错误/问题),我必须做以下事情:
!/斌/庆典
VERSION_zope2=${VERSION_zope2:-2.13} URL_zope2=http://github.com/zopefoundation/Zope/archive/$VERSION_zope2.zip BUILD_zope2=$BUILD_PATH/zope2/$(get_directory $URL_zope2) RECIPE_zope2=$RECIPES_PATH/zope2 function prebuild_zope2() { true } function build_zope2() { cd $BUILD_zope2 push_arm export LDFLAGS="$LDFLAGS -L$LIBS_PATH" export LDSHARED="$LIBLINK" HOSTPYTHON=/home/zac/Documents/Projects/Apps/python-for-android/build/hostpython/Python-2.7.2/hostpython try $HOSTPYTHON bootstrap.py try bin/buildout unset LDSHARED pop_arm } function postbuild_zope2() { true }
通过执行以下操作修复Zope2和_SSL的错误:
python-for-android / build / hostpython / Python-2.7.2 / Lib ln -s ../build/lib.linux-x86_64-2.7 plat-linux3
然后一切都应该建立到上面
答案 0 :(得分:0)
biglink脚本基本上从build / objects / * so.o
中找到的所有内容创建一个库但是zope对象有时会定义相同的符号,例如这是_IFBTree.c的实现:
/* IFBTree - int key, float value BTree
Implements a collection using int type keys
and float type values
*/
/* Setup template macros */
#define PERSISTENT
#define MOD_NAME_PREFIX "IF"
#define DEFAULT_MAX_BUCKET_SIZE 120
#define DEFAULT_MAX_BTREE_SIZE 500
#include "_compat.h"
#include "intkeymacros.h"
#include "floatvaluemacros.h"
#ifdef PY3K
#define INITMODULE PyInit__IFBTree
#else
#define INITMODULE init_IFBTree
#endif
#include "BTreeModuleTemplate.c"
/* IIBTree - int key, int value BTree
Implements a collection using int type keys
and int type values
*/
/* Setup template macros */
#define PERSISTENT
#define MOD_NAME_PREFIX "II"
#define DEFAULT_MAX_BUCKET_SIZE 120
#define DEFAULT_MAX_BTREE_SIZE 500
#include "_compat.h"
#include "intkeymacros.h"
#include "intvaluemacros.h"
#ifdef PY3K
#define INITMODULE PyInit__IIBTree
#else
#define INITMODULE init_IIBTree
#endif
#include "BTreeModuleTemplate.c"
如您所见,两者都包含BTreeModuleTemplate.c,因此如果生成的.o文件合并在一起,则函数之间的名称冲突是不可避免的。
在您的情况下,您可以从结果库中排除冲突对象:
diff --git a/src/tools/biglink b/src/tools/biglink
index 1f82d18..7b05fb5 100755
--- a/src/tools/biglink
+++ b/src/tools/biglink
@@ -7,9 +7,24 @@ import subprocess
sofiles = [ ]
+blacklist = [
+ '_LOBTree.so', '_LLBTree.so', 'cPersistence.so', '_zope_', 'cPickleCache.so',
+ '_LFBTree.so', '_OOBTree.so', '_IIBTree.so', '_OLBTree.so', '_IFBTree.so',
+ '_IOBTree.so', '_fsBTree.so',
+]
+
+def is_blacklisted(fn):
+ for name in blacklist:
+ if fn.startswith(name):
+ return True
+ return False
+
+
for directory in sys.argv[2:]:
for fn in os.listdir(directory):
+ if is_blacklisted(fn):
+ continue
fn = os.path.join(directory, fn)
if not fn.endswith(".so.o"):