PHP install on 32 bit OS x 10.6.6 Kernel

No tags yet.

started at 11 Jun 2011 by draconis1
  • draconis1
    11 Jun 2011

    First, Thanks for these tutorials. Until I hit this snafu everything was going well. Second, I tried to post this as a comment in the 32 PHP post but it told me I was a spammer so my apologies to Richard if he sees this twice.

    When I run these commands:

    ./configure --prefix=/usr/local/php5 \
      --mandir=/usr/share/man \
      --infodir=/usr/share/info \
      --sysconfdir=/etc \
      --with-config-file-path=/etc \
      --with-zlib \
      --with-zlib-dir=/usr \
      --with-openssl \
      --without-iconv \
      --enable-exif \
      --enable-ftp \
      --enable-mbstring \
      --enable-mbregex \
      --enable-sockets \
      --with-mysql=/usr/local/mysql \
      --with-pdo-mysql=/usr/local/mysql \
      --with-mysqli=/usr/local/mysql/bin/mysql_config \
      --with-apxs2=/usr/local/apache2/bin/apxs

    which gives back this error:
    configure: error: mysql configure failed. Please check config.log for more information.

    The config.log looks like:

    int main() {
    mysql_close()
    ; return 0; }
    configure:60143: checking for mysql_error in -lmysqlclient
    configure:60162: gcc -o conftest -g -O2 -fvisibility=hidden  -no-cpp-precomp -Wl,-rpath,/usr/local/mysql/lib -L/usr/local/mysql/lib  -Wl,-rpath,/usr -L/usr conftest.c -lmysqlclient  -lz -lssl -lcrypto -lz -lssl -lcrypto -lm  -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm 1>&5
    ld: warning: in /usr/local/mysql/lib/libmysqlclient.dylib, file was built for i386 which is not the architecture being linked (x86_64)
    Undefined symbols:
      "_mysql_error", referenced from:
          _main in ccp4vIIv.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    configure: failed program was:
    #line 60151 "configure"
    #include "confdefs.h"
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char mysql_error();
    
    int main() {
    mysql_error()
    ; return 0; }

    I've double and triple checked that I have installed the 32 bit Mysql, any idea what I'm doing wrong?
    Thanks!
    Robert

  • Richard
    13 Jun 2011

    This does not look like a 64/32 bit problem. Can you tell me which versions you used and if you compiled mysql or used a binary installer?

Reply

You must log in to post.