【问题标题】:python-MySQLdb iphonepython-MySQLdb iphone
【发布时间】:2011-06-08 16:22:17
【问题描述】:

有人知道在哪里可以为 arm iPhone 架构编译 python-MySQLdb 吗?或者怎么做? 我被困在这一点上:

:~/MySQL-python-1.2.3 root# python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.darwin-10.5-arm-2.5/MySQLdb
running build_ext
building '_mysql' extension
arm-apple-darwin9-gcc -undefined dynamic_lookup -dynamiclib build/temp.darwin-10.5-arm-2.5/_mysql.o -L/usr/local/arm-apple-darwin/lib/ -L/private/var/root/mysql/lib/mysql -lmysqlclient_r -lz -lm -o build/lib.darwin-10.5-arm-2.5/_mysql.dylib
ld: library not found for -lmysqlclient_r
collect2: ld returned 1 exit status
error: command 'arm-apple-darwin9-gcc' failed with exit status 1

【问题讨论】:

    标签: iphone python compilation arm mysql-python


    【解决方案1】:

    我解决了前面的问题.....它是 site.cfg 中的 threadsafe = True 我不得不把 False。 现在我遇到了另一个非常相似的问题

    python setup.py build
    running build
    running build_py
    copying MySQLdb/release.py -> build/lib.darwin-10.5-arm-2.5/MySQLdb
    running build_ext
    building '_mysql' extension
    arm-apple-darwin9-gcc -undefined dynamic_lookup -dynamiclib build/temp.darwin-10.5-arm-2.5/_mysql.o -L/usr/local/arm-apple-darwin/lib/ -L/private/var/root/mysql/lib/mysql -lmysqlclient -lz -lm -o build/lib.darwin-10.5-arm-2.5/_mysql.dylib
    ld: library not found for -lm
    collect2: ld returned 1 exit status
    error: command 'arm-apple-darwin9-gcc' failed with exit status 1
    

    -lm 需要哪个库? (例如对于 -lz 它需要 zlib 库)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-01-20
      • 2010-11-10
      • 2012-12-04
      • 2011-11-10
      • 2011-11-14
      • 1970-01-01
      相关资源
      最近更新 更多