perl5-dbi / dbi

DBI - The Perl 5 Database Interface
Other
83 stars 58 forks source link

Error building DBDs on Monterey macOS #107

Open turnstep opened 1 year ago

turnstep commented 1 year ago

Opening here, as this involves failure of the Driver_xst.h compilation step, and the same error occurs on both DBD::Pg and DBD::Sqlite:

DBD::Pg: https://github.com/bucardo/dbdpg/issues/110

DBD::SQLite: https://github.com/DBD-SQLite/DBD-SQLite/issues/106

Summary of error on both when running perl Makefile.PL:

"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- SQLite.bs blib/arch/auto/DBD/SQLite/SQLite.bs 644 make: *** No rule to make target /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/auto/DBI/Driver_xst.h', needed bySQLite.xsi'. Stop.

dveeden commented 1 year ago

This also happened with DBD::mysql. This only happened when using system Perl /usr/bin/perl and not when using Perl installed via brew /usr/local/bin/perl.

The default Perl installation seems to have a weirdly looking DBI installation. Re-installing DBI via cpanm seems to work to solve at least part of this.

However it seems like most people advise against using system Perl in general.

The Xcode commandline SDKs seem to include some of the DBI parts like DBIXS.h. Maybe this is just a case of setting the right path?

See also https://github.com/perl5-dbi/DBD-mysql/issues/403

Tux commented 3 months ago

I have no knowledge of MacOSX or perlbrew, so I/we need help here from peple that do. As I read this, it is the perl installation to blame, but I may be completely wrong.