How to fix "Symbol not found: _is_prefix" when compiling Perl DBD :: mysql?

First I wanted to create a DBD :: mysql package. This did not work, because everything that was done could not be loaded for tests using Symbol not found: _is_prefix . So I suggested that cpan might be a little old. I know this random assumption, but cpan told me to install the latest Bundle :: CPAN .

Who successfully installed DBD :: mysql or Bundle::CPAN on Mac OS X 10.5? Could you recommend any thing that I could do differently?

  This is perl, v5.8.8 built for darwin-thread-multi-2level
 (with 4 registered patches, see perl -V for more detail) 
  / usr / local / mysql / bin / mysql Ver 14.14 Distrib 5.1.36,
 for apple-darwin9.5.0 (i386) using readline 5.1 

Here is the CPAN exit log for DBD :: mysql :

  Writing Makefile for DBD :: mysql
 cc -c -I / Library / Perl / 5.8.8 / darwin-thread-multi-2level / auto / DBI -I / usr / local / mysql / include -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -arch ppc -arch i386 -g -pipe - fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I / usr / local / include -O3 -DVERSION = \ "4.012 \" -DXS_VERSION = \ "4.012 \" " -I / System / Library / Perl / 5.8.8 / darwin-thread-multi-2level / CORE "dbdimp.c
 / usr / bin / perl -p -e "s / ~ DRIVER ~ / mysql / g" /Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBI/Driver.xst> mysql.xsi

 Running Mkbootstrap for DBD :: mysql ()
 chmod 644 mysql.bs
 / usr / bin / perl /System/Library/Perl/5.8.8/ExtUtils/xsubpp -typemap /System/Library/Perl/5.8.8/ExtUtils/typemap mysql.xs> mysql.xsc && mv mysql.xsc mysql. c
 cp lib / DBD / mysql.pm blib / lib / DBD / mysql.pm
 cp lib / DBD / mysql / GetInfo.pm blib / lib / DBD / mysql / GetInfo.pm
 cp lib / DBD / mysql / INSTALL.pod blib / lib / DBD / mysql / INSTALL.pod
 cp lib / bundle / dbd / mysql.pm blib / lib / bundle / dbd / mysql.pm
 cp mysql.bs blib / arch / auto / DBD / mysql / mysql.bs
 chmod 644 blib / arch / auto / DBD / mysql / mysql.bs
 Warning: duplicate function definition 'do' detected in mysql.xs, line 225
 Warning: duplicate function definition 'rows' detected in mysql.xs, line 650
 cc -c -I / Library / Perl / 5.8.8 / darwin-thread-multi-2level / auto / DBI -I / usr / local / mysql / include -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -arch ppc -arch i386 -g -pipe - fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I / usr / local / include -O3 -DVERSION = \ "4.012 \" -DXS_VERSION = \ "4.012 \" " -I / System / Library / Perl / 5.8.8 / darwin-thread-multi-2level / CORE "mysql.c
 dbdimp.c: In function 'mysql_describe':
 dbdimp.c: 3309: warning: assignment from incompatible pointer type
 dbdimp.c: In function 'mysql_describe':
 dbdimp.c: 3309: warning: assignment from incompatible pointer type
 rm -f blib / arch / auto / DBD / mysql / mysql.bundle
 LD_RUN_PATH = "/ usr / local / mysql / lib" / usr / bin / perl myld cc -mmacosx-version-min = 10.5.7 -arch ppc -arch i386 -bundle -undefined dynamic_lookup -L / usr / local / lib dbdimp .o mysql.o -o blib / arch / auto / DBD / mysql / mysql.bundle \
        -L / usr / local / mysql / lib -lmysqlclient -lz -lm \

 chmod 755 blib / arch / auto / DBD / mysql / mysql.bundle
 Manifying blib / man3 / DBD :: mysql.3pm
 Manifying blib / man3 / DBD :: mysql :: INSTALL.3pm
 Manifying blib / man3 / Bundle :: DBD :: mysql.3pm
   CAPTTOFU / DBD-mysql-4.012.tar.gz
   / usr / bin / make -j3 -j3 - OK

 Running make test
 PERL_DL_NONLAZY = 1 / usr / bin / perl "-MExtUtils :: Command :: MM" "-e" "test_harness (0, 'blib / lib', 'blib / arch')" t / *. T
 t / 00base.t .................. 1/6 Bailout called.  Further testing stopped: Unable to load DBD :: mysql

 # Failed test 'use DBD :: mysql;'
 # at t / 00base.t line 21.
 # Tried to use 'DBD :: mysql'.
 # Error: Can't load '/Users/dlamblin/.cpan/build/DBD-mysql-4.012-4n3pv8/blib/arch/auto/DBD/mysql/mysql.bundle' for module DBD :: mysql: dlopen (/ Users / dlamblin / .cpan / build / DBD-mysql-4.012-4n3pv8 / blib / arch / auto / DBD / mysql / mysql.bundle, 2): Symbol not found: _is_prefix
 # Referenced from: /Users/dlamblin/.cpan/build/DBD-mysql-4.012-4n3pv8/blib/arch/auto/DBD/mysql/mysql.bundle
 # Expected in: dynamic lookup
 # at (eval 7) line 2
 # Compilation failed in require at (eval 7) line 2.
 # BEGIN failed - compilation aborted at (eval 7) line 2.
 FAILED - Further testing stopped: Unable to load DBD :: mysql
 make: *** [test_dynamic] Error 255
   CAPTTOFU / DBD-mysql-4.012.tar.gz
   / usr / bin / make test - NOT OK
 // hint // to see the cpan-testers results for installing this module, try:
   reports CAPTTOFU / DBD-mysql-4.012.tar.gz
 Running make install
   make test had returned bad status, won't install without force
 Failed during this command:
  CAPTTOFU / DBD-mysql-4.012.tar.gz: make_test NO
+4
source share
6 answers

Well, if you get these errors, I now know the following:

  • MySQL 5.1 for Mac OS X x86_64 not compatible with DBD::mysql (for now). Install the x86 32-bit version and try again. You will succeed. I would like perl Makefile.pl just tell you what's in the banner.
  • Bundle::CPAN had problems because I did not install them as root. Why this makes reporting circular links instead of problems with installation permissions, I will never understand.

Please add a comment if and when it became obsolete.

+5
source

Installing (beta) version 5.4.1 of the 64-bit version of mysql available on their developer's website fixes the problem. Tested on Snow Leopard.

+2
source

Have you tried installing Bundle :: DBD :: mysql ?

+1
source

I did not address this issue, but found that MacPorts cleared all my problems with UNIX incompatibility. You may want to try this before you endure too much pain and suffering.

0
source

Where does he complain about addiction? It looks like you are trying to link to an incompatible version of mysql libraries. The character that he is looking for is not in the library you downloaded. I do not think this is a problem caused by CPAN.pm or cpan script.

Some questions:

  • Who collected perl? Is this Apple perl?
  • Who compiled mysql? This is your own version, since it is in / usr / local?
  • Have you previously compiled other versions? I start by compiling so that everything points to the right places.
0
source

Installing the latest 64-bit version of the Mysql problem on my computer.

0
source

All Articles