{"id":71,"date":"2008-06-14T12:03:20","date_gmt":"2008-06-14T19:03:20","guid":{"rendered":"http:\/\/codefork.com\/blog\/?p=71"},"modified":"2008-06-16T00:25:06","modified_gmt":"2008-06-16T07:25:06","slug":"installing-dbi-on-leopards-perl-588","status":"publish","type":"post","link":"https:\/\/codefork.com\/blog\/index.php\/2008\/06\/14\/installing-dbi-on-leopards-perl-588\/","title":{"rendered":"Installing DBI on Leopard&#8217;s perl 5.8.8"},"content":{"rendered":"<p>I needed to get my perl installation updated to do some development locally. As usual, perl was a pain in the ass. Long story short: Install Xcode 3.0, copy the &#8220;reentr.inc&#8221; file from the 5.8.8 source distribution, and DBI should install.<\/p>\n<p>Below is the long-winded log of my woes, offered in the hopes it might help someone.<\/p>\n<p>First, DBI 1.604 wouldn&#8217;t install via cpan, so I tried installing it by hand. But I just got the same error when running &#8220;make&#8221;:<\/p>\n<p><code>No rule to make target `\/System\/Library\/Perl\/5.8.8\/darwin-thread-multi-2level\/CORE\/config.h', needed by `Makefile'.<\/code><\/p>\n<p>I found this blog post, <a href=\"http:\/\/90kts.com\/blog\/2007\/leopard-perl-588-installation-throws-errors-when-compiling-makefile\/\">&#8220;Leopard Perl 5.8.8 installation throws errors when compiling (makefile)&#8221;<\/a> mentioning the exact message, which recommended copying the CORE directory from 5.8.6 instead the above location. I tried that, but then I got this error instead:<\/p>\n<p><code>DBI.xs: In function \u2018dbi_profile\u2019:<br \/>\nDBI.xs:2398: warning: implicit declaration of function \u2018GvSVn\u2019<br \/>\nDBI.xs:2398: error: invalid lvalue in assignment<br \/>\nDBI.xs: In function \u2018dbi_profile\u2019:<br \/>\nDBI.xs:2398: warning: implicit declaration of function \u2018GvSVn\u2019<br \/>\nDBI.xs:2398: error: invalid lvalue in assignment<br \/>\nDBI.xs: In function \u2018XS_DBI_dispatch\u2019:<br \/>\nDBI.xs:2970: warning: assignment makes pointer from integer without a cast<br \/>\nDBI.xs:2972: error: invalid lvalue in assignment<br \/>\nDBI.xs:2985: error: invalid type argument of \u2018->\u2019<br \/>\nDBI.xs:2989: error: invalid lvalue in assignment<br \/>\nDBI.xs:3293: warning: unused variable \u2018Perl___notused\u2019<br \/>\nDBI.xs: In function \u2018XS_DBI_dispatch\u2019:<br \/>\nDBI.xs:2970: warning: assignment makes pointer from integer without a cast<br \/>\nDBI.xs:2972: error: invalid lvalue in assignment<br \/>\nDBI.xs:2985: error: invalid type argument of \u2018->\u2019<br \/>\nDBI.xs:2989: error: invalid lvalue in assignment<\/code><\/p>\n<p>Googling these error messages turned up surprisingly little. On another blog with a post titled, <a href=\"http:\/\/microseeds.com\/blog\/?p=99\">&#8220;Mac OS 10.5: Leopard&#8221;<\/a> that mentioned difficulties with DBI, commenters suggested various solutions, but none of them worked for me. The blog author got an older version of DBI to install but I couldn&#8217;t get that to work either.<\/p>\n<p>I discovered that Xcode 3.0 (developer tools for Leopard) contains the 5.8.8 files that belong in that CORE directory. This seemed like a better option than copying the probably outdated 5.8.6 files. You can get the gigantic Xcode disk image, a whopping 1.1 gigabytes, from the <a href=\"http:\/\/developer.apple.com\/\">Apple Developer Connection<\/a> site. Registration is required through the &#8220;Member&#8221; link, and once you&#8217;re in, go to Downloads and search for Xcode.<\/p>\n<p>Before installing Xcode, I cleared out the hosed CORE directory I&#8217;d been mucking with. &#8220;DeveloperTools.pkg&#8221; is what contains the perl headers, so you can probably get away with just installing that (double-click it), instead of the entire XcodeTools.pkg. It did the trick: the compiler was now finding the &#8220;GvSVn&#8221; symbol it couldn&#8217;t before. But now I got this message during make:<\/p>\n<p><code>In file included from DBIXS.h:19,<br \/>\n                 from Perl.xs:6:<br \/>\n\/System\/Library\/Perl\/5.8.8\/darwin-thread-multi-2level\/CORE\/perl.h:3993:22: error: reentr.inc: No such file or directory<br \/>\nIn file included from DBIXS.h:19,<br \/>\n                 from Perl.xs:6:<br \/>\n\/System\/Library\/Perl\/5.8.8\/darwin-thread-multi-2level\/CORE\/perl.h:3993:22: error: reentr.inc: No such file or directory<br \/>\nlipo: can't open input file: \/var\/tmp\/\/ccQ8vbDU.out (No such file or directory)<br \/>\nmake: *** [Perl.o] Error 1<\/code><\/p>\n<p>In desperation, I downloaded the perl 5.8.8 <a href=\"http:\/\/www.cpan.org\/src\/README.html\">source distribution tarball<\/a>, and simply copied reentr.inc into the CORE directory. Voila! Make went to completion and I could install the module. From there, I went back into cpan to install DBD::mysql without any problems (you need mysql installed in the default location, \/usr\/local\/mysql, of course).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I needed to get my perl installation updated to do some development locally. As usual, perl was a pain in the ass. Long story short: Install Xcode 3.0, copy the &#8220;reentr.inc&#8221; file from the 5.8.8 source distribution, and DBI should install. Below is the long-winded log of my woes, offered in the hopes it might &hellip; <a href=\"https:\/\/codefork.com\/blog\/index.php\/2008\/06\/14\/installing-dbi-on-leopards-perl-588\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Installing DBI on Leopard&#8217;s perl 5.8.8&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,15,8],"tags":[],"class_list":["post-71","post","type-post","status-publish","format-standard","hentry","category-admin","category-macos","category-perl"],"_links":{"self":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/71","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=71"}],"version-history":[{"count":0,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/71\/revisions"}],"wp:attachment":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=71"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=71"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=71"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}