Advertisement

11.18.2008 at 02:45PM PST, ID: 23916125
[x]
Attachment Details

Can't compile DBD::msqyl

[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.8
Tags:

mysql Dperl DBD DBI, Can't load '/data/DBD-mysql-4.010/blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: /data/DBD-mysql-4.010/blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: mysql_stmt_sqlstate at /usr/lib/p

I am running SUSE Linux 10

>uname -a
Linux hostname  2.6.16.60-0.23-smp #1 SMP date x86_64 x86_64 x86_64 GNU/Linux

Mysql
mysql  Ver 14.12 Distrib 5.0.67, for pc-linux-gnu (i686) using readline 5.1


Perl
This is perl, v5.8.8 built for x86_64-linux-thread-multi

I am tring to install the perl modules for mysql.

DBI installed successfully with the command

perl -MCPAN -e 'install Bundle::DBI'

I wasn't so lucky with DBD...
The command perl -MCPAN -e 'install Bundle::DBD::mysql' failed so I am trying to compile by hand.

When I run perl Makefile.PL and then make I received the error messages:

 /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libmysqlclient.so when searching for -lmysqlclient
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status

So I re-ran the command with the following configuration

perl Makefile.PL --cflags="-I/usr/include/mysql/" --libs="-L/usr/lib/mysql/"


This eliminated the compatability errors but make test fails with the following errors:

Tried to use 'DBD::mysql'.
#     Error:  Can't load '/data/DBD-mysql-4.010/blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: /data/DBD-mysql-4.010/blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: mysql_stmt_sqlstate at /usr/lib/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230.
#  at (eval 6) line 2
# Compilation failed in require at (eval 6) line 2.
# BEGIN failed--compilation aborted at (eval 6) line 2.
Bailout called.  Further testing stopped:  Unable to load DBD::mysql
make: *** [test_dynamic] Error 1


I did a make install anyway and it seemed to install without error.  However when I try to access a webpage using perl scripts that need DBD I get the following errors in the apache log files.

 /usr/bin/perl: symbol lookup error: /usr/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/mysql/mysql.so: undefined symbol: mysql_init,

So I am thinking it still is not happy with my -lmysqlclient but I am not sure how to fix it.

I have mysql-server, mysql-client, mysql-devel, and mysql-shared-compat installed.

 
Expert Comment by mjcoyne:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Accepted Solution by mjcoyne:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Author Comment by kgchis:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Author Comment by kgchis:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Author Comment by kgchis:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by Adam314:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Author Comment by kgchis:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by mjcoyne:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by mjcoyne:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
20081119-EE-VQP-45 - Hierarchy / EE_QW_2_20070628