Venerable Perl Monks,
I recently upgraded to macOS Big Sur (11.1) and found, as often happens after a major upgrade, that my Perl DBI scripts no longer work. Usually fixing this is just a matter of reinstalling DBD::mysql, but this time I got an error I haven't seen before.
Here's the CPAN output:
cpan[4]> install DBD::mysql
Running install for module 'DBD::mysql'
Checksum for /Users/mrb/.cpan/sources/authors/id/D/DV/DVEEDEN/DBD-mysq
+l-4.050.tar.gz ok
Configuring D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz with Makefile.PL
PLEASE NOTE:
For 'make test' to run properly, you must ensure that the
database user 'root' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.
mysql> grant all privileges on test.* to 'root'@'localhost' identified
+ by 's3kr1t';
You can also optionally set the user to run 'make test' with:
perl Makefile.PL --testuser=username
I will use the following settings for compiling and testing:
cflags (mysql_config) = -I/usr/local/mysql/include
embedded (mysql_config) =
ldflags (guessed ) =
libs (mysql_config) = -L/usr/local/mysql/lib -lmysqlclient
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.028002 on darwin-thread-multi-2level) inst
+alled in /System/Library/Perl/Extras/5.28/darwin-thread-multi-2level/
+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 -- 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/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
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 b
+lib/arch/auto/DBD/mysql/mysql.bs 644
cc -c -I/System/Library/Perl/Extras/5.28/darwin-thread-multi-2level/a
+uto/DBI -I/usr/local/mysql/include -DDBD_MYSQL_WITH_SSL -g -g -pipe
+-fno-strict-aliasing -fstack-protector-strong -DPERL_USE_SAFE_PUTENV
+-Os -DVERSION=\"4.050\" -DXS_VERSION=\"4.050\" -iwithsysroot "/Sys
+tem/Library/Perl/5.28/darwin-thread-multi-2level/CORE" dbdimp.c
In file included from dbdimp.c:15:
./dbdimp.h:20:10: fatal error: 'DBIXS.h' file not found
#include <DBIXS.h> /* installed by the DBI module
+ */
^~~~~~~~~
1 error generated.
make: *** [dbdimp.o] Error 1
DVEEDEN/DBD-mysql-4.050.tar.gz
/usr/bin/make -- NOT OK
Failed during this command:
DVEEDEN/DBD-mysql-4.050.tar.gz : make NO
I find that there are a number of copies of DBIXS.h in various places on my system:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/D
+eveloper/SDKs/MacOSX.sdk/System/Library/Perl/Extras/5.30/darwin-threa
+d-multi-2level/auto/DBI/DBIXS.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/D
+eveloper/SDKs/MacOSX.sdk/System/Library/Perl/Extras/5.28/darwin-threa
+d-multi-2level/auto/DBI/DBIXS.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/D
+eveloper/SDKs/MacOSX.sdk/System/Library/Perl/Extras/5.18/darwin-threa
+d-multi-2level/auto/DBI/DBIXS.h
/Library/Perl/5.18/darwin-thread-multi-2level/auto/DBI/DBIXS.h
/Users/mrb/.cpan/build/DBI-1.643-46wMR_/blib/arch/auto/DBI/DBIXS.h
/Users/mrb/.cpan/build/DBI-1.643-46wMR_/DBIXS.h
How do I help the CPAN module find what it needs?