2009年11月11日星期三

[PerlChina] Re: 安装DBI, DBD::mysql, make的时候报错

谢谢强.

我确认是下的32位的, 在dev.mysql.com上32bit的预编译的pkg, 接下来删除再用source编译的, 后来又装回了预编译的包.

中间都是同样的错误...

[10:08@/usr/local] pwd
/usr/local

[10:08@/usr/local] ls -l mysql
lrwxr-xr-x  1 root  wheel  24 11 11 14:59 mysql@ -> mysql-5.1.40-osx10.5-x86

[10:08@/usr/local] mysql-5.1.40-osx10.5-x86/bin/mysql_config 
Usage: mysql-5.1.40-osx10.5-x86/bin/mysql_config [OPTIONS]
Options:
        --cflags         [-I/usr/local/mysql-5.1.40-osx10.5-x86/include  -g -Os -arch i386 -fno-common   -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT  -DDONT_DECLARE_CXA_PURE_VIRTUAL]
        --include        [-I/usr/local/mysql-5.1.40-osx10.5-x86/include]
        --libs           [-L/usr/local/mysql-5.1.40-osx10.5-x86/lib -lmysqlclient -lz -lm     -lmygcc]
        --libs_r         [-L/usr/local/mysql-5.1.40-osx10.5-x86/lib -lmysqlclient_r -lz -lm     -lmygcc]
        --plugindir      [/usr/local/mysql/lib/plugin]
        --socket         [/tmp/mysql.sock]
        --port           [0]
        --version        [5.1.40]
        --libmysqld-libs [-L/usr/local/mysql-5.1.40-osx10.5-x86/lib -lmysqld -ldl  -lz -lm       -lmygcc]
[10:09@/usr/local]



会不会跟系统自带的perl有关? 系统自带的perl的arch是x86_64, i386, ppc都有. mysql是i386, DBI是默认的安装, 默认是用的perl的cflags



bash-3.2$ perl -V
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
  Platform:
    osname=darwin, osvers=10.0, archname=darwin-thread-multi-2level
    uname='darwin neige.apple.com 10.0 darwin kernel version 10.0.0d8: tue may 5 19:29:59 pdt 2009; root:xnu-1437.2~2release_i386 i386 '
    config_args='-ds -e -Dprefix=/usr -Dccflags=-g  -pipe  -Dldflags= -Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc=gcc-4.2'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc-4.2', ccflags ='-arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include',
    optimize='-Os',
    cppflags='-g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='4.2.1 (Apple Inc. build 5646)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='gcc-4.2 -mmacosx-version-min=10.6', ldflags ='-arch x86_64 -arch i386 -arch ppc -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib
    libs=-ldbm -ldl -lm -lutil -lc
    perllibs=-ldl -lm -lutil -lc
    libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true, libperl=libperl.dylib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-arch x86_64 -arch i386 -arch ppc -bundle -undefined dynamic_lookup -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
                        PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_64_BIT_ALL
                        USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
                        USE_PERLIO USE_REENTRANT_API
  Locally applied patches:
/Library/Perl/Updates/<version> comes before system perl directories
installprivlib and installarchlib points to the Updates directory
  Built under darwin
  Compiled at Jun 24 2009 00:35:27

***********


在 2009-11-12,上午9:32, Qiang (James) 写道:

估计你装的是 64bit 的 mysql 的原因,卸载mysql 64 bit(可能需要把刚装的
DBI, DBD::Mysql 也删了)然后重装 mysql 32bit.

google 一下 "dyld: Symbol not found: _mysql_init" 第一个结果就是你要看的。

http://forums.movabletype.org/2008/11/symbol-not-found--mysql-init-on-leopard.html

Qiang


Felix New wrote:
在linux上安装cpan模块很顺利的, 这2天想在mac(snow leopard)弄个环境, DBI和DBD::mysal死活都搞不定.



首先是编译DBI的时候, 到DBI.xs的时候是一堆警告, 但没有退出;

而编译DBD::mysql的时候, 在dbdimp.c和DBD.xs的时候, 又是一堆警告.

虽然2个模块最后都可以make install, 但DBD::mysql最后安装的是不可用的.


问了下狗狗, 也没找到很好的答案, 大家遇到这样的出错么? 如果我缺少了什么东西, 还希望大家指点, 少走弯路. (Xcode是装了的, 系统光盘带的版本)







--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina Mongers 讨论组"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

没有评论: