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?


In reply to Error installing DBD::mysql: file DBIXS.h not found by mboudreau

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.