problem with building a static linked DBI/DBD-mysql

problem with building a static linked DBI/DBD-mysql

am 15.07.2003 13:58:38 von Sven Hilbert

Hello all,

working on/with:

SuSE Linux 6.1 - Kernel 2.2.5
MySQL 4.0.13 (binary)
Perl 5.8.0 (source)
DBI 1.3.7 (source)
DBD-mysql 2.9002 (source)

all the installation succeded, except DBD-mysql.
Running 'make test' delivers errors like this:


t/00base...........install_driver(mysql) failed: Can't load
'/usr/local/DBD-mysql2.9002/blib/arch/auto/DBD/mysql/mysql.s o' for module
DBD::mysql: libmysqlclient.so.4: cannot open shared object file: No such
file or directory at /usr/local/lib/perl5/5.8.0/i586-linux/DynaLoader.pm
line 229.
at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected at
t/00base.t line 38
t/00base...........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 4-5
Failed 2/5 tests, 60.00% okay


According to install.html I guess, I should build a static linked version of
Perl/DBI/DBD. But when I try
'perl Makefile.PL -static -config'
it returns
'unknown option: static'
'unknown option: config'

And entering
'perl Makefile.PL --libs=/usr/local/mysql/lib/libmysqlclient.a'
is ignorred and the output of mysql_config is used instead.

How can I build a static bundle?
Or what else can I do?
Any hints?


Thanks,

Sven


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: problem with building a static linked DBI/DBD-mysql

am 16.07.2003 14:28:36 von Sven Hilbert

Hello,

>
> Below you find a patch for the documentation describing the necessary
> steps. Ignore all lines with a "-" in front.
>
>
> Jochen
>
> +If you would like to use the static libraries (and there are
> +excellent reasons to do so), you need to create a separate
> +directory, copy the static libraries to that place and use
> +the -L switch above to point to your new directory. For example:
> +
> + mkdir /tmp/mysql-static
> + cp /usr/lib/mysql/*.a /tmp/mysql-static
> + perl Makefile.PL --libs="-L/tmp/mysql-static -lmysqlclient"
> + make
> + make test
> + make install
> + rm -rf /tmp/mysql-static

unfortunately, but not surprising to me, this also doesn't work.

Again 'make test' fails, but with a new error. Before it was 'no such
file...' now it is 'net_buffer_length...':

PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00base...........install_driver(mysql) failed: Can't load
'/usr/local/DBD-mysql-2.9002/blib/arch/auto/DBD/mysql/mysql. so' for module
DBD::mysql: /usr/local/DBD-mysql-2.9002/blib/arch/auto/DBD/mysql/mysql.s o:
undefined symbol: net_buffer_length at
/usr/local/lib/perl5/5.8.0/i586-linux/DynaLoader.pm line 229.
at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
at t/00base.t line 38
t/00base...........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 4-5
Failed 2/5 tests, 60.00% okay


I don't know what this tells me.

Perhaps you can give me a list of examplary shell-commands for building a
statically linked perl/DBI/DBD-mysql starting with the compilation of perl
itself? And I will try again from the beginning...

Thanks
Sven






--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: problem with building a static linked DBI/DBD-mysql

am 16.07.2003 14:28:36 von Sven Hilbert

Hello,

>
> Below you find a patch for the documentation describing the necessary
> steps. Ignore all lines with a "-" in front.
>
>
> Jochen
>
> +If you would like to use the static libraries (and there are
> +excellent reasons to do so), you need to create a separate
> +directory, copy the static libraries to that place and use
> +the -L switch above to point to your new directory. For example:
> +
> + mkdir /tmp/mysql-static
> + cp /usr/lib/mysql/*.a /tmp/mysql-static
> + perl Makefile.PL --libs="-L/tmp/mysql-static -lmysqlclient"
> + make
> + make test
> + make install
> + rm -rf /tmp/mysql-static

unfortunately, but not surprising to me, this also doesn't work.

Again 'make test' fails, but with a new error. Before it was 'no such
file...' now it is 'net_buffer_length...':

PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00base...........install_driver(mysql) failed: Can't load
'/usr/local/DBD-mysql-2.9002/blib/arch/auto/DBD/mysql/mysql. so' for module
DBD::mysql: /usr/local/DBD-mysql-2.9002/blib/arch/auto/DBD/mysql/mysql.s o:
undefined symbol: net_buffer_length at
/usr/local/lib/perl5/5.8.0/i586-linux/DynaLoader.pm line 229.
at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
at t/00base.t line 38
t/00base...........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 4-5
Failed 2/5 tests, 60.00% okay


I don't know what this tells me.

Perhaps you can give me a list of examplary shell-commands for building a
statically linked perl/DBI/DBD-mysql starting with the compilation of perl
itself? And I will try again from the beginning...

Thanks
Sven






--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

RE: problem with building a static linked DBI/DBD-mysql

am 16.07.2003 15:02:05 von Michael Koch

Hello Sven,

I just want to point that this "net_buffer_length" has already happened to
me and Karen Ventura on very different environments: Red Hat Linux 7.2 for
Karen; and Solaris 8 for me.
The fact that it happens on such different OS environments eliminates
several possibilities.

Unfortunately, I didn't find any workaround for this, as also apparently
Karen. One advises me to try building everything from sources (Perl, MySQL
etc...) but I didn't have the time yet. Also, Karen had tried from sources,
and had the same error...

If some developer could help on this, it should be great ! :-)

Meanwhile, if you find any workaround, do not forget to post on the mailing
list to help us...

Rgds,
Mike

-----Message d'origine-----
De : Sven Hilbert
Envoyé : mercredi 16 juillet 2003 14:29
À : Jochen Wiedmann
Cc : perl@lists.mysql.com; rlippan@remotelinux.com
Objet : Re: problem with building a static linked DBI/DBD-mysql


Hello,

>
> Below you find a patch for the documentation describing the necessary
> steps. Ignore all lines with a "-" in front.
>
>
> Jochen
>
> +If you would like to use the static libraries (and there are
> +excellent reasons to do so), you need to create a separate
> +directory, copy the static libraries to that place and use
> +the -L switch above to point to your new directory. For example:
> +
> + mkdir /tmp/mysql-static
> + cp /usr/lib/mysql/*.a /tmp/mysql-static
> + perl Makefile.PL --libs="-L/tmp/mysql-static -lmysqlclient"
> + make
> + make test
> + make install
> + rm -rf /tmp/mysql-static

unfortunately, but not surprising to me, this also doesn't work.

Again 'make test' fails, but with a new error. Before it was 'no such
file...' now it is 'net_buffer_length...':

PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00base...........install_driver(mysql) failed: Can't load
'/usr/local/DBD-mysql-2.9002/blib/arch/auto/DBD/mysql/mysql. so' for module
DBD::mysql: /usr/local/DBD-mysql-2.9002/blib/arch/auto/DBD/mysql/mysql.s o:
undefined symbol: net_buffer_length at
/usr/local/lib/perl5/5.8.0/i586-linux/DynaLoader.pm line 229.
at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
at t/00base.t line 38
t/00base...........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 4-5
Failed 2/5 tests, 60.00% okay


I don't know what this tells me.

Perhaps you can give me a list of examplary shell-commands for building a
statically linked perl/DBI/DBD-mysql starting with the compilation of perl
itself? And I will try again from the beginning...

Thanks
Sven


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

RE: problem with building a static linked DBI/DBD-mysql

am 16.07.2003 15:02:05 von Michael Koch

Hello Sven,

I just want to point that this "net_buffer_length" has already happened to
me and Karen Ventura on very different environments: Red Hat Linux 7.2 for
Karen; and Solaris 8 for me.
The fact that it happens on such different OS environments eliminates
several possibilities.

Unfortunately, I didn't find any workaround for this, as also apparently
Karen. One advises me to try building everything from sources (Perl, MySQL
etc...) but I didn't have the time yet. Also, Karen had tried from sources,
and had the same error...

If some developer could help on this, it should be great ! :-)

Meanwhile, if you find any workaround, do not forget to post on the mailing
list to help us...

Rgds,
Mike

-----Message d'origine-----
De : Sven Hilbert
Envoyé : mercredi 16 juillet 2003 14:29
À : Jochen Wiedmann
Cc : perl@lists.mysql.com; rlippan@remotelinux.com
Objet : Re: problem with building a static linked DBI/DBD-mysql


Hello,

>
> Below you find a patch for the documentation describing the necessary
> steps. Ignore all lines with a "-" in front.
>
>
> Jochen
>
> +If you would like to use the static libraries (and there are
> +excellent reasons to do so), you need to create a separate
> +directory, copy the static libraries to that place and use
> +the -L switch above to point to your new directory. For example:
> +
> + mkdir /tmp/mysql-static
> + cp /usr/lib/mysql/*.a /tmp/mysql-static
> + perl Makefile.PL --libs="-L/tmp/mysql-static -lmysqlclient"
> + make
> + make test
> + make install
> + rm -rf /tmp/mysql-static

unfortunately, but not surprising to me, this also doesn't work.

Again 'make test' fails, but with a new error. Before it was 'no such
file...' now it is 'net_buffer_length...':

PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00base...........install_driver(mysql) failed: Can't load
'/usr/local/DBD-mysql-2.9002/blib/arch/auto/DBD/mysql/mysql. so' for module
DBD::mysql: /usr/local/DBD-mysql-2.9002/blib/arch/auto/DBD/mysql/mysql.s o:
undefined symbol: net_buffer_length at
/usr/local/lib/perl5/5.8.0/i586-linux/DynaLoader.pm line 229.
at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
at t/00base.t line 38
t/00base...........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 4-5
Failed 2/5 tests, 60.00% okay


I don't know what this tells me.

Perhaps you can give me a list of examplary shell-commands for building a
statically linked perl/DBI/DBD-mysql starting with the compilation of perl
itself? And I will try again from the beginning...

Thanks
Sven


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

RE: problem with building a static linked DBI/DBD-mysql

am 16.07.2003 18:39:02 von Michael Koch

Hello Jochen,

Thanks for your help. I should have the time to rebuild everything from
sources next week, and will post the results here.
I hope this will solve this problem, as I'm a system & network admin so my
skills are limited about C libraries and stuff.

Rgds,
Mike

-----Message d'origine-----
De : Jochen Wiedmann
Envoyé : mercredi 16 juillet 2003 15:49
À : Michael Koch
Cc : Sven Hilbert; perl@lists.mysql.com; rlippan@remotelinux.com
Objet : RE: problem with building a static linked DBI/DBD-mysql



Zitat von Michael Koch :

> etc...) but I didn't have the time yet. Also, Karen had tried from
sources,
> and had the same error...

I allow myself some doubts she did it properly.

Unfortunately I do not have access to a Unix or Linux box nowadays,
but such problems with missing symboles are in almost all cases related
to the use of mixed binaries. Possible candidates are MySQL, Perl, DBI
and DBD. An experienced C developer can exactly tell what library is
requesting the symbol using 'nm' or simiilar tools.

The absence of such symbols can be detected at compile time or at runtime.
At compile time, if you compile everything from scratch. At runtime, if
you import binaries from some other source. It's that simple.


Sorry,

Jochen


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

RE: problem with building a static linked DBI/DBD-mysql

am 16.07.2003 18:39:02 von Michael Koch

Hello Jochen,

Thanks for your help. I should have the time to rebuild everything from
sources next week, and will post the results here.
I hope this will solve this problem, as I'm a system & network admin so my
skills are limited about C libraries and stuff.

Rgds,
Mike

-----Message d'origine-----
De : Jochen Wiedmann
Envoyé : mercredi 16 juillet 2003 15:49
À : Michael Koch
Cc : Sven Hilbert; perl@lists.mysql.com; rlippan@remotelinux.com
Objet : RE: problem with building a static linked DBI/DBD-mysql



Zitat von Michael Koch :

> etc...) but I didn't have the time yet. Also, Karen had tried from
sources,
> and had the same error...

I allow myself some doubts she did it properly.

Unfortunately I do not have access to a Unix or Linux box nowadays,
but such problems with missing symboles are in almost all cases related
to the use of mixed binaries. Possible candidates are MySQL, Perl, DBI
and DBD. An experienced C developer can exactly tell what library is
requesting the symbol using 'nm' or simiilar tools.

The absence of such symbols can be detected at compile time or at runtime.
At compile time, if you compile everything from scratch. At runtime, if
you import binaries from some other source. It's that simple.


Sorry,

Jochen


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: problem with building a static linked DBI/DBD-mysql

am 17.07.2003 05:01:07 von Rudy Lippan

On Tue, 15 Jul 2003, Jochen Wiedmann wrote:
> Below you find a patch for the documentation describing the necessary
> steps. Ignore all lines with a "-" in front.
>

Applied.

Rudy


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: problem with building a static linked DBI/DBD-mysql

am 17.07.2003 05:01:07 von Rudy Lippan

On Tue, 15 Jul 2003, Jochen Wiedmann wrote:
> Below you find a patch for the documentation describing the necessary
> steps. Ignore all lines with a "-" in front.
>

Applied.

Rudy


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org