Unable to Install DBI::mysql on solaris 10

Hello All...

I have been trying to install DBI::mysql on a Solaris 10 box.

Using MCPAN :-

bash-3.00# perl -MCPAN -e shell

CPAN: File::HomeDir loaded ok (v0.65)

cpan shell -- CPAN exploration and modules installation (v1.9102)

ReadLine support enabled

cpan[1]> install DBD::mysql

Running install for module 'DBD::mysql'

Running make for C/CA/CAPTTOFU/DBD-mysql-4.004.tar.gz

Has already been unwrapped into directory /.cpan/build/DBD-mysql-4.004-kMsgI8

Could not make: Unknown error

Running make test

Can't test without successful make

Running make install

Make had returned bad status, install seems impossible

Manualy : -

bash-3.00# pwd

/.cpan/build/DBD-mysql-4.004-kMsgI8

bash-3.00# make

cc -c -I/usr/perl5/site_perl/5.8.4/i86pc-solaris-64int/auto/DBI -I/usr/sfw/include/mysql -xstrconst -mt -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO-DVERSION=\"4.004\" -DXS_VERSION=\"4.004\" "-I/usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE"dbdimp.c

"dbdimp.c", line 498: warning: implicit function declaration: parse_number

"dbdimp.c", line 3215: warning: implicit function declaration: mysql_warning_count

"dbdimp.c", line 3429: prototype mismatch: 3 args passed, 4 expected

"dbdimp.c", line 3593: prototype mismatch: 3 args passed, 4 expected

"dbdimp.c", line 3931: prototype mismatch: 3 args passed, 4 expected

"dbdimp.c", line 3945: prototype mismatch: 3 args passed, 4 expected

"dbdimp.c", line 4264: prototype mismatch: 3 args passed, 4 expected

"dbdimp.c", line 4291: prototype mismatch: 3 args passed, 4 expected

"dbdimp.c", line 4303: prototype mismatch: 3 args passed, 4 expected

"dbdimp.c", line 4465: prototype mismatch: 3 args passed, 4 expected

cc: acomp failed for dbdimp.c

*** Error code 2

make: Fatal error: Command failed for target `dbdimp.o'

Anyone have any ideas as I am pulling my hair out ;-)

[2096 byte] By [Paragon37a] at [2007-11-27 6:27:20]
# 1
> cc -cSun Studio? Gcc? something else?alan
alan.paea at 2007-7-12 17:49:11 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 2

Thanks for your replies ....

I am still having trouble with this. Here is what I have done....

Downloaded and installed perl / mysql / gcc / make and associated support packages from sunfreeware.com.

These all install into /usr/local

I have set up ${PATH} as follows :-

/usr/local/bin:/usr/local/mysql/bin/:/usr/sbin:/usr/bin:/usr/ccs/bin

And ${LD_LIBRARY_PATH} as :-

/usr/local/mysql/lib/mysql/:/usr/local/lib

I can make the DBD:mysql with no errors but all tests fail!

When using force directive to instal DBD:mysql and executing a test script I get a Segmentation Fault (core) when it atempts to connect to the database.

Bellow is some output from make test with a debug of 12 set :-

export DBI_TRACE=12

# make test

PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t

t/00base............. DBI 1.56-nothread default trace level set to 0x0/12 (pid 561) at DBI.pm line 271 via 00base.t line 28

install_method DBI::db::get_info , flags 0x2a00,

usage: min 2, max 2, '$info_type'

install_method DBI::db::take_imp_data, flags 0x10000,

usage: min 1, max 1, ''

install_method DBI::db::disconnect , flags 0x10c00,

usage: min 1, max 1, ''

install_method DBI::db::selectrow_array, flags 0x2000,

usage: min 2, max 0, '$statement [, \%attr [, @bind_params ] ]'

install_method DBI::db::tables , flags 0x2200,

usage: min 1, max 6, '$catalog, $schema, $table, $type [, \%attr ]'

install_method DBI::db::quote_identifier, flags 0x0430,

usage: min 2, max 6, '$name [, ...] [, \%attr ]'

install_method DBI::db::clone ,

usage: min 1, max 2, '[\%attr]'

install_method DBI::db::quote , flags 0x0430,

usage: min 2, max 3, '$string [, $data_type ]'

install_method DBI::db::type_info , flags 0x2200,

usage: min 1, max 2, '$data_type'

install_method DBI::db::statistics_info, flags 0xaa00,

usage: min 6, max 7, '$catalog, $schema, $table, $unique_only, $quick, [, \%attr ]'

install_method DBI::db::selectrow_arrayref, flags 0x2000,

usage: min 2, max 0, '$statement [, \%attr [, @bind_params ] ]'

install_method DBI::db::begin_work , flags 0x0400,

usage: min 1, max 2, '[ \%attr ]'

install_method DBI::db::last_insert_id, flags 0x2800,

usage: min 5, max 6, '$catalog, $schema, $table_name, $field_name [, \%attr ]'

install_method DBI::db::foreign_key_info, flags 0xaa00,

usage: min 7, max 8, '$pk_catalog, $pk_schema, $pk_table, $fk_catalog, $fk_schema, $fk_table [, \%attr ]'

install_method DBI::db::primary_key , flags 0x2200,

usage: min 4, max 5, '$catalog, $schema, $table [, \%attr ]'

install_method DBI::db::commit , flags 0x0c80,

usage: min 1, max 1, ''

install_method DBI::db::ping , flags 0x0404,

usage: min 1, max 1, ''

install_method DBI::db::selectall_arrayref, flags 0x2000,

usage: min 2, max 0, '$statement [, \%attr [, @bind_params ] ]'

install_method DBI::db::type_info_all, flags 0x2a00,

usage: min 1, max 1, ''

install_method DBI::db::do , flags 0x3200,

usage: min 2, max 0, '$statement [, \%attr [, @bind_params ] ]'

install_method DBI::db::selectcol_arrayref, flags 0x2000,

usage: min 2, max 0, '$statement [, \%attr [, @bind_params ] ]'

install_method DBI::db::prepare_cached, flags 0xa200,

usage: min 2, max 4, '$statement [, \%attr [, $if_active ] ]'

install_method DBI::db::rows , flags 0x0004

install_method DBI::db::rollback , flags 0x0c80,

usage: min 1, max 1, ''

install_method DBI::db::column_info , flags 0xaa00,

usage: min 5, max 6, '$catalog, $schema, $table, $column [, \%attr ]'

install_method DBI::db::table_info , flags 0xaa00,

usage: min 1, max 6, '$catalog, $schema, $table, $type [, \%attr ]'

install_method DBI::db::primary_key_info, flags 0xaa00,

usage: min 4, max 5, '$catalog, $schema, $table [, \%attr ]'

install_method DBI::db::prepare , flags 0xa200,

usage: min 2, max 3, '$statement [, \%attr]'

install_method DBI::db::preparse

install_method DBI::db::connected , flags 0x0004,

usage: min 1, max 0, ''

install_method DBI::db::data_sources, flags 0x0200,

usage: min 1, max 2, '[\%attr]'

install_method DBI::db::selectall_hashref, flags 0x2000,

usage: min 3, max 0, '$statement, $keyfield [, \%attr [, @bind_params ] ]'

install_method DBI::db::selectrow_hashref, flags 0x2000,

usage: min 2, max 0, '$statement [, \%attr [, @bind_params ] ]'

install_method DBI::dr::default_user,

usage: min 3, max 4, '$user, $pass [, \%attr]'

install_method DBI::dr::data_sources, flags 0x0800,

usage: min 1, max 2, '[\%attr]'

install_method DBI::dr::disconnect_all, flags 0x0800,

usage: min 1, max 1, ''

install_method DBI::dr::connect_cached, flags 0x8000, H 3,

usage: min 1, max 5, '[$db [,$user [,$passwd [,\%attr]]]]'

install_method DBI::dr::connect , flags 0x8000, H 3,

usage: min 1, max 5, '[$db [,$user [,$passwd [,\%attr]]]]'

install_method DBI::st::more_results,

usage: min 1, max 1, ''

install_method DBI::st::blob_read ,

usage: min 4, max 5, '$field, $offset, $len [, \$buf [, $bufoffset]]'

install_method DBI::st::fetchall_hashref,

usage: min 2, max 2, '$key_field'

install_method DBI::st::bind_param_inout_array,

usage: min 4, max 5, '$parameter, \@var, $maxlen, [, \%attr]'

install_method DBI::st::finish ,

usage: min 1, max 1, ''

install_method DBI::st::rows , flags 0x0004

install_method DBI::st::execute_for_fetch, flags 0x5040,

usage: min 2, max 3, '$fetch_sub [, $tuple_status]'

install_method DBI::st::fetchrow_hashref

install_method DBI::st::_get_fbav

install_method DBI::st::_set_fbav , T 6

install_method DBI::st::fetchrow

install_method DBI::st::fetch

install_method DBI::st::execute_array, flags 0x5040,

usage: min 2, max 0, '\%attribs [, @args]'

install_method DBI::st::dump_results,

usage: min 1, max 5, '$maxfieldlen, $linesep, $fieldsep, $filehandle'

install_method DBI::st::bind_param_array,

usage: min 3, max 4, '$parameter, $var [, \%attr]'

install_method DBI::st::fetchrow_array

install_method DBI::st::execute , flags 0x1040,

usage: min 1, max 0, '[@args]'

install_method DBI::st::bind_col ,

usage: min 3, max 4, '$column, \$var [, \%attr]'

install_method DBI::st::fetchall_arrayref,

usage: min 1, max 3, '[ $slice [, $max_rows]]'

install_method DBI::st::fetchrow_arrayref

install_method DBI::st::bind_param_inout,

usage: min 4, max 5, '$parameter, \$var, $maxlen, [, \%attr]'

install_method DBI::st::bind_columns,

usage: min 2, max 0, '\$var1 [, \$var2, ...]'

install_method DBI::st::cancel , flags 0x0800,

usage: min 1, max 1, ''

install_method DBI::st::blob_copy_to_file,

usage: min 3, max 3, '$field, $filename_or_handleref'

install_method DBI::st::bind_param ,

usage: min 3, max 4, '$parameter, $var [, \%attr]'

install_method DBI::common::parse_trace_flag, flags 0x0404, T 8,

usage: min 2, max 2, '$name'

install_method DBI::common::errstr , flags 0x0004

install_method DBI::common::trace_msg, flags 0x0004, T 8,

usage: min 2, max 3, '$message_text [, $min_level ]'

install_method DBI::common::err , flags 0x0004

install_method DBI::common::CLEAR , flags 0x0004

install_method DBI::common::state , flags 0x0004

install_method DBI::common::_not_impl

install_method DBI::common::NEXTKEY , flags 0x0004

install_method DBI::common::trace , flags 0x0004,

usage: min 1, max 3, '[$trace_level, [$filename]]'

install_method DBI::common::debug , flags 0x0004,

usage: min 1, max 2, '[$debug_level]'

install_method DBI::common::parse_trace_flags, flags 0x0404, T 8,

usage: min 2, max 2, '$flags'

install_method DBI::common::private_attribute_info

install_method DBI::common::swap_inner_handle,

usage: min 2, max 3, '$h [, $allow_reparent ]'

install_method DBI::common::EXISTS , flags 0x0004

install_method DBI::common::FETCH , flags 0x0404

install_method DBI::common::FIRSTKEY, flags 0x0004

install_method DBI::common::set_err , flags 0x0010,

usage: min 3, max 6, '$err, $errmsg [, $state, $method, $rv]'

install_method DBI::common::DESTROY , flags 0x10004

install_method DBI::common::dump_handle, flags 0x0004,

usage: min 1, max 3, '[$message [, $level]]'

install_method DBI::common::FETCH_many, flags 0x0404

install_method DBI::common::can , flags 0x0100

install_method DBI::common::STORE , flags 0x041c

install_method DBI::common::private_data, flags 0x0004,

usage: min 1, max 1, ''

install_method DBI::common::func , flags 0x0006

New 'DBI::dr' (for DBD::Switch::dr, parent='', id=undef)

dbih_setup_handle(DBI::dr=HASH(0x81e8530)=>DBI::dr=HASH(0x81e83e0), DBD::Switch::dr, 0, Null!)

t/00base.............ok 1/5 dbih_make_com(Null!, 0, DBD::Switch::dr, 112, 0) thr#0

dbih_setup_attrib(DBI::dr=HASH(0x81e83e0), Err, Null!) SCALAR(0x8221668) (already defined)

dbih_setup_attrib(DBI::dr=HASH(0x81e83e0), State, Null!) SCALAR(0x8221650) (already defined)

dbih_setup_attrib(DBI::dr=HASH(0x81e83e0), Errstr, Null!) SCALAR(0x8221680) (already defined)

dbih_setup_attrib(DBI::dr=HASH(0x81e83e0), TraceLevel, Null!) 0 (already defined)

dbih_setup_attrib(DBI::dr=HASH(0x81e83e0), FetchHashKeyName, Null!) 'NAME' (already defined)

-> DBI->install_driver(mysql) for solaris perl=5.008008 pid=561 ruid=0 euid=0

t/00base.............dubious

Test returned status 0 (wstat 139, 0x8b)

DIED. FAILED tests 4-5

Failed 2/5 tests, 60.00% okay

If anyone has any ideas at all I would greatly apreciate it!

Regards

SRG

Paragon37a at 2007-7-12 17:49:11 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 3

Update :--

I thought I'd try to statically link the DBD::mysql module.

Not sure if this is the correct way to do this but heres what happened :-

# perl Makefile.pl

Edited Makefile and changed LINKTYPE from dynamic to static

#make

# make test_static

rm -f blib/arch/auto/DBD/mysql/mysql.so

LD_RUN_PATH="/usr/local/lib:/usr/lib:/usr/ local/ssl/lib" /usr/local/bin/perl myld gcc -G -L/usr/local/lib dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so \

-L/usr/local/lib -R/usr/local/lib -R/usr/lib -L/usr/lib -R/usr/openwin/lib -L/usr/openwin/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/X11R6/lib -R/usr/X11R6/lib -L/usr/local/mysql/lib/mysql -lmysqlclient -lz -lposix4 -lresolv -lgen -lsocket -lnsl -lm -L/usr/local/ssl/lib -lssl -lcrypto \

chmod 755 blib/arch/auto/DBD/mysql/mysql.so

make -f Makefile.aperl perl

make[1]: Entering directory `/.cpan/build/DBD-mysql-4.004-GwLB5D'

make[1]: `perl' is up to date.

make[1]: Leaving directory `/.cpan/build/DBD-mysql-4.004-GwLB5D'

PERL_DL_NONLAZY=1 ./perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t

t/00base.............ok

t/10connect..........ok

t/20createdrop.. .....ok

t/30insertfetch......ok

t/35limit............ok

t/35prepare.... ......ok

t/40bindparam........ok

t/40bindparam2.......ok

t/40blobs..... .......ok

t/40catalog..........ok

16/77 skipped: various reasons

t/40listfields.......ok

t/40nulls............ok

t/40numrows... .......ok

t/41bindparam........ok

t/41blobs_prepare....ok

t/42bindparam ........ok

t/50chopblanks.......ok

t/50commit...........ok

14/30 skipped: various reasons

t/60leaks............skipped

all skipped: $ENV{SLOW_TESTS} is not set

t/70takeimp..........skipped

all skipped: test feature not implemented

t/75supported_sql....ok

t/80procs............ok

t/insertid ...........ok

t/multi_statement....ok

t/param_values.......ok

t/prepare _noerror....ok

t/texecute...........ok

t/utf8...............ok

All tests successful, 2 tests and 30 subtests skipped.

Files=28, Tests=578, 4 wallclock secs ( 2.19 cusr + 0.40 csys = 2.59 CPU)

So what the hell is going wrong?

I guess it points to dynamic libraries being the issue so if so is this a Solaris 10 issue?

Any help appreciated !!

SRG

Paragon37a at 2007-7-12 17:49:11 > top of Java-index,Solaris Operating System,Solaris 10 Features...