You are not logged in.

#1 2021-11-16 15:13:38

Avelar0
Member
Registered: 2021-11-16
Posts: 2

DBD:Mysql installation error

Hello everyone!
I've been trying to install perl DBD:Mysql in my machine. I already have MariaDB and all other needed modules installed. The installation is throwing the following error:


I will use the following settings for compiling and testing:

  cflags        (mysql_config) = -I/usr/include/mysql -I/usr/include/mysql/mysql
  embedded      (guessed     ) =
  ldflags       (guessed     ) =
  libs          (mysql_config) = -L/usr/lib/ -lmariadb
  mysql_config  (guessed     ) = mysql_config
  nocatchstderr (default     ) = 0
  nofoundrows   (default     ) = 0
  nossl         (default     ) = 0
  testdb        (default     ) = test
  testhost      (default     ) =
  testpassword  (default     ) =
  testport      (default     ) =
  testsocket    (default     ) =
  testuser      (guessed     ) = root

To change these settings, see 'perl Makefile.PL --help' and
'perldoc DBD::mysql::INSTALL'.

Checking if libs are available for compiling...
Looks good.

Checking if your kit is complete...
Looks good
Using DBI 1.643 (for perl 5.034000 on x86_64-linux-thread-multi) installed in /usr/lib/perl5/5.34/site_perl/auto/DBI/
Generating a Unix-style Makefile
Writing Makefile for DBD::mysql
Writing MYMETA.yml and MYMETA.json
  DVEEDEN/DBD-mysql-4.050.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
Running Mkbootstrap for mysql ()
chmod 644 "mysql.bs"
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- mysql.bs blib/arch/auto/DBD/mysql/mysql.bs 644
cc -c  -I/usr/lib/perl5/5.34/site_perl/auto/DBI -I/usr/include/mysql -I/usr/include/mysql/mysql -DDBD_MYSQL_WITH_SSL -g  -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt   -DVERSION=\"4.050\" -DXS_VERSION=\"4.050\" -fPIC "-I/usr/lib/perl5/5.34/core_perl/CORE"   dbdimp.c
dbdimp.c: In function ‘mysql_st_prepare’:
dbdimp.c:3207:24: warning: assignment to ‘my_bool *’ {aka ‘char *’} from incompatible pointer type ‘_Bool *’ [-Wincompatible-pointer-types]
 3207 |           bind->is_null=      (_Bool*) &(fbind->is_null);
      |                        ^
"/usr/bin/perl" -p -e "s/~DRIVER~/mysql/g" /usr/lib/perl5/5.34/site_perl/auto/DBI/Driver.xst > mysql.xsi
"/usr/bin/perl" "/usr/share/perl5/core_perl/ExtUtils/xsubpp"  -typemap '/usr/share/perl5/core_perl/ExtUtils/typemap'  mysql.xs > mysql.xsc
Warning: duplicate function definition 'do' detected in mysql.xs, line 247
Warning: duplicate function definition 'rows' detected in mysql.xs, line 683
mv mysql.xsc mysql.c
cc -c  -I/usr/lib/perl5/5.34/site_perl/auto/DBI -I/usr/include/mysql -I/usr/include/mysql/mysql -DDBD_MYSQL_WITH_SSL -g  -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt   -DVERSION=\"4.050\" -DXS_VERSION=\"4.050\" -fPIC "-I/usr/lib/perl5/5.34/core_perl/CORE"   mysql.c
cc -c  -I/usr/lib/perl5/5.34/site_perl/auto/DBI -I/usr/include/mysql -I/usr/include/mysql/mysql -DDBD_MYSQL_WITH_SSL -g  -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt   -DVERSION=\"4.050\" -DXS_VERSION=\"4.050\" -fPIC "-I/usr/lib/perl5/5.34/core_perl/CORE"   socket.c
rm -f blib/arch/auto/DBD/mysql/mysql.so
LD_RUN_PATH="/usr/lib" cc  -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -L/usr/local/lib -fstack-protector-strong  dbdimp.o mysql.o socket.o  -o blib/arch/auto/DBD/mysql/mysql.so  \
   -L/usr/lib/ -lmariadb   \

chmod 755 blib/arch/auto/DBD/mysql/mysql.so
Manifying 3 pod documents
  DVEEDEN/DBD-mysql-4.050.tar.gz
  /usr/bin/make -- OK
CPAN: CPAN::DistnameInfo loaded ok (v0.12)
Running make test for DVEEDEN/DBD-mysql-4.050.tar.gz
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- mysql.bs blib/arch/auto/DBD/mysql/mysql.bs 644
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00base.t .............................. 1/6 # Driver version is 4.050
t/00base.t .............................. ok
t/05dbcreate.t .......................... 1/2 # Database 'test' accessible
t/05dbcreate.t .......................... ok
t/10connect.t ........................... 1/? # mysql_clientinfo is: 3.2.4
# mysql_clientversion is: 30204
# mysql_serverversion is: 100604
# mysql_hostinfo is: Localhost via UNIX socket
# mysql_serverinfo is: 10.6.4-MariaDB
# mysql_stat is: Uptime: 4356284  Threads: 2  Questions: 12289  Slow queries: 0  Opens: 1046  Open tables: 143  Queries per second avg: 0.002
# mysql_protoinfo is: 10
# SQL_DBMS_VER is 10.6.4-MariaDB
# Default storage engine is: InnoDB
t/10connect.t ........................... ok
t/15reconnect.t ......................... ok
t/16dbi-get_info.t ...................... ok
t/20createdrop.t ........................ ok
t/25lockunlock.t ........................ ok
t/29warnings.t .......................... ok
t/30insertfetch.t ....................... ok
t/31insertid.t .......................... ok
t/32insert_error.t ...................... ok
t/35limit.t ............................. ok
t/35prepare.t ........................... ok
t/40bindparam.t ......................... ok
t/40bindparam2.t ........................ ok
t/40bit.t ............................... ok
t/40blobs.t ............................. ok
t/40catalog.t ........................... ok
t/40keyinfo.t ........................... ok
t/40listfields.t ........................ ok
t/40nulls.t ............................. ok
t/40nulls_prepare.t ..................... ok
t/40numrows.t ........................... ok
t/40server_prepare.t .................... skipped: You must have MySQL version 4.1.3 and greater for this test to run
t/40server_prepare_crash.t .............. skipped: You must have MySQL version 4.1.3 and greater for this test to run
t/40server_prepare_error.t .............. skipped: SKIP TEST: You must have MySQL version 4.1.3 and greater for this test to run
t/40types.t ............................. ok
t/41bindparam.t ......................... ok
t/41blobs_prepare.t ..................... ok
t/41int_min_max.t ....................... ok
t/42bindparam.t ......................... ok
t/43count_params.t ...................... ok
t/50chopblanks.t ........................ ok
t/50commit.t ............................ ok
t/51bind_type_guessing.t ................ ok
t/52comment.t ........................... ok
t/53comment.t ........................... ok
t/55utf8.t .............................. ok
t/55utf8mb4.t ........................... ok
t/56connattr.t .......................... skipped: performance schema not enabled
t/60leaks.t ............................. skipped: Skip $ENV{EXTENDED_TESTING} is not set
t/65segfault.t .......................... ok
t/65types.t ............................. ok
t/70takeimp.t ........................... ok
t/71impdata.t ........................... ok
t/75supported_sql.t ..................... ok
t/76multi_statement.t ................... ok
t/80procs.t ............................. ok
t/81procs.t ............................. ok
t/85init_command.t ...................... ok
t/86_bug_36972.t ........................ ok
t/87async.t ............................. ok
t/88async-multi-stmts.t ................. ok
t/89async-method-check.t ................ ok
t/91errcheck.t .......................... ok
t/92ssl_backronym_vulnerability.t ....... ok
t/92ssl_optional.t ...................... ok
t/92ssl_riddle_vulnerability.t .......... ok
t/99_bug_server_prepare_blob_null.t ..... ok
t/manifest.t ............................ skipped: these tests are for release testing
t/pod.t ................................. skipped: Test::Pod 1.00 required for testing POD
t/rt110983-valid-mysqlfd.t .............. ok
t/rt118977-zerofill.t ................... 1/8
#   Failed test at t/rt118977-zerofill.t line 22.
#          got: '1'
#     expected: '00001'
# Looks like you failed 1 test of 8.
t/rt118977-zerofill.t ................... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/8 subtests
t/rt25389-bin-case.t .................... ok
t/rt50304-column_info_parentheses.t ..... ok
t/rt61849-bind-param-buffer-overflow.t .. ok
t/rt75353-innodb-lock-timeout.t ......... ok
t/rt83494-quotes-comments.t ............. ok
t/rt85919-fetch-lost-connection.t ....... ok
t/rt86153-reconnect-fail-memory.t ....... skipped: $ENV{EXTENDED_TESTING} is not set
t/rt88006-bit-prepare.t ................. ok
t/rt91715.t ............................. ok
t/version.t ............................. ok

Test Summary Report
-------------------
t/rt118977-zerofill.t                 (Wstat: 256 Tests: 8 Failed: 1)
  Failed test:  8
  Non-zero exit status: 1
Files=73, Tests=2240, 31 wallclock secs ( 0.63 usr  0.16 sys +  5.01 cusr  0.74 csys =  6.54 CPU)
Result: FAIL
Failed 1/73 test programs. 1/2240 subtests failed.
make: *** [Makefile:1222: test_dynamic] Error 255
  DVEEDEN/DBD-mysql-4.050.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports DVEEDEN/DBD-mysql-4.050.tar.gz

I have tried searching for a solution but cant find anything sad

Offline

#2 2021-11-16 15:35:27

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,327

Re: DBD:Mysql installation error

The Arch package contains a patch to fix this: https://github.com/archlinux/svntogit-p … ysql/trunk

On that note, is there a certain reason you try to compile this yourself and aren't just using the Arch package in the first place?

Offline

#3 2021-11-17 03:28:21

Avelar0
Member
Registered: 2021-11-16
Posts: 2

Re: DBD:Mysql installation error

Well, I have no idea why I thought that I should install perl packages inside of perl with CPAN.
It worked after installing with pacman

Thank you!

Offline

#4 2021-11-17 08:05:38

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,327

Re: DBD:Mysql installation error

great, please mark as [SOLVED] by editing the title in your first post: https://wiki.archlinux.org/title/Genera … ow_to_post

Offline

Board footer

Powered by FluxBB