Re: compiling DBD::ODBC

2002-06-26 Thread Cornel Diaconu

Jeff Urlwin wrote:
 
 unixODBC isn't usually installed in /usr/bin.  It's usually in /usr/local.

Well, finally the above statement gave my the real clue.
Of course, if I use the .tar.gz file to install the UnixODBC package,
the install is /usr/local.
Since I've installed it using the RPMs which I was linked to by the
unixodbc site, they installed the (somehow stupid) RedHat way :
/usr/bin, /usr/lib, /usr/include (not a bad idea per se, but sometimes
confuzing for apps !)
I was successful in the following: after unpacking the sources, I've
compiled with the --prefix= option redirected to somewhere in my home
directory: ~/tests/unixodbc (well, the test machine was a server in my
firm, on which of course I had no special rights ;)). After make; make
install with UnixODBC (remember: into ~/tests/unixodbc), compiling and
make; make test-ing the DBD::ODBC package worked just fine !!!
Obviously, now the perl Makefile.PL returned correctly that it was a
unixodbc system there (when I posted my problem to you, it just stated
that it where a udbc one ...)

 I'm guessing that the output of Makefile.PL will help, but it could be that
 you have remnants of udbc in there which could be causing the problem.

Remnants it seems there are, since the script stopped at this kind of
ODBC stuff, though at that moment I just couldn't figure out where did
the script guessed that it had to deal with a udbc, due to my poor
skills in Perl programming for now ;(( 
Frankly I don't know when and where did they came on to my computer ;(

Now, after some read of the Makefile.PL script, I guess that it may work
even if I let the $odbchome (either by means of environment variable, or
by -o option at run-time) to by simply /usr ;) After all, the $myodbc
variable in the script looks firstly if it runs on Win32, and secondly
if it has to deal with UnixODBC (and much further away if it has
udbc-related stuff). Since $odbchome/lib (that is /usr/lib) contains
those libodbc.* files needed, it should work even this way (using /usr ,
but NOT /usr/bin as I've  used so far).

Anyway, if I'm right in my guess, simply testing that there are some
$odbchome/lib/libodbc.* files I wonder if it's enough to guess there is
a UnixODBC package installed in the system ! It's just your experience
with all those ODBC manager packages in the wild that made you say that,
or something else ?

Thanx a lot for your time,
Cornel.


P.S. As a metter of convenience to whoever will need this stuff again in
the future at dbi-users list, I'll put here those outputs of Makefile.PL
script, and furthermore, of make utility (the errors I got in my tries):

makefile.pl output: 

Configuring DBD::ODBC ...
 Remember to actually *READ* the README file!Note (probably harmless): No 
library found for -ludbc
BI 1.21 installed in /usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/DBI

Checking if your kit is complete...
Looks good
Using DBI 1.21 installed in
/usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/DBI
Writing Makefile for DBD::ODBC

The DBD::ODBC tests will use these values for the database connection:
DBI_DSN=dbi:ODBC:pg_teste.g. dbi:ODBC:demo
DBI_USER=cornel
DBI_PASS=a32gh77
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

make output: 
In file included from ODBC.h:9,
 from ODBC.xs:1:
dbdodbc.h:6:21: libudbc.h: No such file or directory
make: *** [ODBC.o] Error 1
i
/usr/bin/perl -I/usr/lib/perl5/5.6.1/i386-linux -I/usr/lib/perl5/5.6.1
/usr/lib/perl5/5.6.1/ExtUtils/xsubpp  -typemap
/usr/lib/perl5/5.6.1/ExtUtils/typemap ODBC.xs  ODBC.xsc  mv ODBC.xsc
ODBC.c
gcc -c -I. -I/usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/DBI
-I/usr/bin/include -fno-strict-aliasing -O2 -march=i386 -mcpu=i686  
-DVERSION=\0.41\ -DXS_VERSION=\0.41\ -fPIC
-I/usr/lib/perl5/5.6.1/i386-linux/CORE  ODBC.c




RE: compiling DBD::ODBC

2002-06-26 Thread Jeff Urlwin

Jeff Urlwin wrote:
 
  unixODBC isn't usually installed in /usr/bin.  It's usually in
 /usr/local.

 Well, finally the above statement gave my the real clue.
 Of course, if I use the .tar.gz file to install the UnixODBC package,
 the install is /usr/local.
 Since I've installed it using the RPMs which I was linked to by the
 unixodbc site, they installed the (somehow stupid) RedHat way :
 /usr/bin, /usr/lib, /usr/include (not a bad idea per se, but sometimes
 confuzing for apps !)
 I was successful in the following: after unpacking the sources, I've
 compiled with the --prefix= option redirected to somewhere in my home
 directory: ~/tests/unixodbc (well, the test machine was a server in my
 firm, on which of course I had no special rights ;)). After make; make
 install with UnixODBC (remember: into ~/tests/unixodbc), compiling and
 make; make test-ing the DBD::ODBC package worked just fine !!!
 Obviously, now the perl Makefile.PL returned correctly that it was a
 unixodbc system there (when I posted my problem to you, it just stated
 that it where a udbc one ...)

Good.


  I'm guessing that the output of Makefile.PL will help, but it
 could be that
  you have remnants of udbc in there which could be causing the problem.

 Remnants it seems there are, since the script stopped at this kind of
 ODBC stuff, though at that moment I just couldn't figure out where did
 the script guessed that it had to deal with a udbc, due to my poor
 skills in Perl programming for now ;((
 Frankly I don't know when and where did they came on to my computer ;(

Probably part of Red Hat's install or we're being faked out :)


 Now, after some read of the Makefile.PL script, I guess that it may work
 even if I let the $odbchome (either by means of environment variable, or
 by -o option at run-time) to by simply /usr ;) After all, the $myodbc
 variable in the script looks firstly if it runs on Win32, and secondly
 if it has to deal with UnixODBC (and much further away if it has
 udbc-related stuff). Since $odbchome/lib (that is /usr/lib) contains
 those libodbc.* files needed, it should work even this way (using /usr ,
 but NOT /usr/bin as I've  used so far).

I believe, the newest version of the Makefile.PL had/has a patch which let's
unixODBC override udbc, if both are found.  Try setting your ODBCHOME to
/usr and let me know.


 Anyway, if I'm right in my guess, simply testing that there are some
 $odbchome/lib/libodbc.* files I wonder if it's enough to guess there is
 a UnixODBC package installed in the system ! It's just your experience
 with all those ODBC manager packages in the wild that made you say that,
 or something else ?

I've also taken patches from people, too, as I don't always build under all
the different versions.  I used OpenLink in the past (with iODBC), but I've
switched to unixODBC in the last year or so, because I like it and the
unixODBC and Easysoft folks are more involved with the DBI mailing list.
They have been wonderful to work with, especially solving strange problems.

Regards,

Jeff





RE: compiling DBD::ODBC

2002-06-24 Thread Jeff Urlwin

unixODBC isn't usually installed in /usr/bin.  It's usually in /usr/local.
I'm guessing that the output of Makefile.PL will help, but it could be that
you have remnants of udbc in there which could be causing the problem.
Save the output of Makefile.PL and forward it to me (and please copy
[EMAIL PROTECTED])

Thanks,

Jeff

 -Original Message-
 From: Cornel Diaconu [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 24, 2002 9:37 AM
 To: [EMAIL PROTECTED]
 Subject: compiling...


 Sorry for this approach (I'm sure I'm not the first to ask you this, but
 for now I don't know where to find an answer to it, so...)
 I'm trying to compile your DBD::ODBC package on my RedHat 7.2, with perl
 5.6.1 and unixODBC (I think some 2.xx) installed.

 When I instruct perl Makefile.PL where is my ODBC manager (namely in
 /usr/bin) (either by the parameter -o, or by means of ODBCHOME
 variable), it creates the dbdodbc.h file which tries to #include some
 libudbc.h file. Well, this last file is my problem, since I can't manage
 to find it anywhere, neither on my system, or in this whole world too
 !!! I've looked for it with any search engine I could imagine (Google,
 Excite, Lycos, Astavista, Askjeeves); my work was in vain; the only
 reasonable link to where I could find such a file was at OpenLink's SDK,
 but since this monstrozity is commercial, it's out of the question for
 me (and the odbc drivers for PostgreSQL or MySQL are at my side already
 from other sources, so their drivers are useless for me, anyhow...).
 So: where did you have in mind to take this file from, when you coded
 this package ?
 I've even tried to comment that include (in dbdodbc.h), but a lot of
 other errors popped-up afterwards (since there are some define's and
 function definitions in that file ...)

 Can you give me some clue (at least where to look from this point
 further) ?

 Thanx.

 Best regards,
 Cornel.

 P.S. Unfortunatelly, I'm just a beginner in Perl codding, thus I can't
 handle 100% the Makefile.PL script ;((
 P.S. 2 : I can be reached at [EMAIL PROTECTED] too.