Re: MySQL, Solaris 9 and DBD::mysql

Jochen Wiedmann <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
On Wed, 8 Dec 2004 14:20:22 -0800 (PST), Sakshale eQuorian
<[email protected]> wrote:

> in my instance.... I remember reading a note somewhere about Solaris
> not supporting static libraries without some optional package from Sun.

That is complete and utter nonsense. Sorry!


> [mysql]# ls
> libdbug.a   libmyisam.a       libmysqlclient.la*    libmystrings.a  libvio.a
> libheap.a   libmyisammrg.a    libmysqlclient_r.a    libmysys.a
> libmerge.a  libmysqlclient.a  libmysqlclient_r.la*  libnisam.a

Surprisingly for me, you have no dynamic libraries at all! In other
words, the creation of a separate directory is completely useless,
because it contains the same files.


> t/00base...........install_driver(mysql) failed: Can't load
> '/root/.cpan/build/DBD-mysql-2.9004/blib/arch/auto/DBD/mysql/mysql.so' for
> module DBD::mysql: ld.so.1: /usr/local/bin/perl: fatal: relocation error:
> file /root/.cpan/build/DBD-mysql-2.9004/blib/arch/auto/DBD/mysql/mysql.so:
> symbol mysql_get_parameters: referenced symbol not found at

And this I do not understand. Think of it like this: If a dynamic
library is used, then the linker attempts to find the symbol at
runtime. This seems to be the case here. If a static library is used,
then the symbol is resolved above, when ld is invoked. (The line
beginning with LD_RUN_PATH.) In other words: If a symbol is missing,
then the linker should complain there.

To sum it up, I can only see two reasonable explanations:

- You have more than one libmysqlclient.* on your system and the
linker picks the wrong
  file. This can happen, because your Perl seems to be configured to
look first into
  /usr/local/lib /opt/gnu/lib by default.

- The symbol mysql_get_parameters is defined in some other file than
libmysqlclient.a.
  Try a

     find . -type f -exec grep mysql_get_parameters {} /dev/null \;


Jochen

-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.