Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Extra Instructions for v1.20 and Leopard' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Extra Instructions for v1.20 and Leopard
Authored by: paco on Jan 31, '08 11:46:30AM

I tried this on DBD::Oracle v 1.20 and Leopard. I had to use the hint that someone else gave about using the -ppc7400 argument to lipo.

Even after that, I got it to compile correctly, but it wouldn't run. I got this error:


Can't load '/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBD/Oracle/Oracle.bundle'
 for module DBD::Oracle:
dlopen(/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBD/Oracle/Oracle.bundle, 1):
Symbol not found: _environ
  Referenced from: /Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBD/Oracle/Oracle.bundle
  Expected in: dynamic lookup
 at ./foo.pl line 4

It turns out there's a function called dump_env_to_trace() that's not very important. It's only called in a few instances for debugging purposes. Rather than fix it, I just took it out and removed all references to it.

If you know how to use patch, here's a patch file. Save this as dbdimp.diff


--- dbdimp.c.orig	2007-12-21 11:03:55.000000000 -0500
+++ dbdimp.c	2008-01-31 14:19:37.000000000 -0500
@@ -56,7 +56,6 @@
 static sql_fbh_t ora2sql_type _((imp_fbh_t* fbh));
 
 void ora_free_phs_contents _((phs_t *phs));
-static void dump_env_to_trace();
 
 static sb4
 oci_error_get(OCIError *errhp, sword status, char *what, SV *errstr, int debug)
@@ -383,9 +382,6 @@
 
     imp_dbh->get_oci_handle = oci_db_handle;
 
-    if (DBIS->debug >= 6 )
-	dump_env_to_trace();
-
     if ((svp=DBD_ATTRIB_GET_SVP(attr, "ora_envhp", 9)) && SvOK(*svp)) {
 	if (!SvTRUE(*svp)) {
 	    imp_dbh->envhp = NULL; /* force new environment */
@@ -3503,20 +3499,3 @@
     }
     return sql_fbh;
 }
-
-static void
-dump_env_to_trace() {
-	dTHX;
-    PerlIO *fp = DBILOGFP;
-    int i = 0;
-    char *p;
-#ifndef __BORLANDC__
-    extern char **environ;
-#endif
-    PerlIO_printf(fp, "Environment variables:\n");
-    do {
-	p = (char*)environ[i++];
-	PerlIO_printf(fp,"\t%s\n",p);
-    } while ((char*)environ[i] != '\0');
-}
-

If you're not familiar with how patch works, just save that diff file in the same directory as dbdimp.c. Then run patch < dbdimp.dif. It will find the file and patch it.

Now go make as usual.

I'll notify the DBD::Oracle guys about this as well.



[ Reply to This | # ]