Re: (Fwd) DBD::Oracle - Issues Compiling DBI

2010-02-02 Thread Jonathan Leffler
On Mon, Feb 1, 2010 at 2:43 PM, Prindle, Douglas E <
douglas.e.prin...@citi.com> wrote:

>  Being first time through this process when I did the make it was looking
> for the gcc compiler. My company has made that End Of Life due to it being a
> sunsetted product. So I switched to the Forte 11 compiler from Sun which we
> have had no issues with compiling other existing c code.
>
> As others noted, it is odd to think that GCC is 'EOL'.  Maybe they just
meant the specific antique version?  Anyway...

However, when I try to make the DBI after pointing it to the new Forte
> compiler I am getting a series of errors that seem to point to the DBI.c and
> DBI.xs files as having issues.
>
>
The problem is that you are using a C++ compiler (CC in all caps is the C++
compiler; cc in lower case is the C compiler).  How did you build Perl with
CC?  If you didn't (as I expect you didn't), then don't compile modules with
CC either.  Actually, don't build modules with a C++ compiler; they are C
code and not C++ code.

 --
Jonathan Leffler   #include 
Guardian of DBD::Informix - v2008.0513 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."


Re: (Fwd) DBD::Oracle - Issues Compiling DBI

2010-02-02 Thread Peter J. Holzer
On 2010-02-01 16:43:27 -0600, Prindle, Douglas E  wrote:
> Hello,
> 
> 
> 
> Being first time through this process when I did the make it was
> looking for the gcc compiler. My company has made that End Of Life due
> to it being a sunsetted product. So I switched to the Forte 11
> compiler from Sun which we have had no issues with compiling other
> existing c code.

Martin already commented that.

> However, when I try to make the DBI after pointing it to the new Forte
> compiler I am getting a series of errors that seem to point to the
> DBI.c and DBI.xs files as having issues.
[...]

Content-Description: Forte_Compiler_Errors.TXT
> sun4-cross: make
> /xenv/Forte/sun4/11.0/5.8p8/prod/bin/CC -c  /xenv/OS/sun4/5.8p8/sun4u/include 
>  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO -xO3 
> -xspace -xildoff-DVERSION=\"1.53\"  -DXS_VERSION=\"1.53\" -KPIC 
> "-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE"  -DDBI_NO_THREADS DBI.c

"CC" is a strange name for a C compiler. C compilers are normally called
"cc" (lower case) or "c89" or something similar. Is this maybe a C++
compiler? If so, please note that C++ is not a simple superset of C, it
is a different language.

> "DBI.xs", line 149: Warning: String literal converted to char* in 
> initialization.

One minor difference between C and C++ is the type of string literals
(char[] vs. const char[]). This warning supports the suspicion that you
are trying to compile C code with a C++ compiler. Don't do that.

hp


-- 
   _  | Peter J. Holzer| Auf jedem Computer sollte der Satz Ludwigs II
|_|_) | Sysadmin WSR   | eingeprägt stehen: "Ein ewig Rätsel will ich
| |   | h...@wsr.ac.at  | bleiben, mir und andern."
__/   | http://www.hjp.at/ |-- Wolfram Heinrich in desd


signature.asc
Description: Digital signature


RE: (Fwd) DBD::Oracle - Issues Compiling DBI

2010-02-02 Thread Prindle, Douglas E
Hello,



Being first time through this process when I did the make it was looking for 
the gcc compiler. My company has made that End Of Life due to it being a 
sunsetted product. So I switched to the Forte 11 compiler from Sun which we 
have had no issues with compiling other existing c code.



However, when I try to make the DBI after pointing it to the new Forte compiler 
I am getting a series of errors that seem to point to the DBI.c and DBI.xs 
files as having issues.



Can you please advise as to what I can do? I am thinking maybe some very strict 
compiler options are on? But not sure.



Any and all help greatly appreciated.



Thank You,
Douglas E. Prindle | Apollo Infrastructure | Cards IT - Citi Brands
*(904) 954-2472 | 6(904) 954-6305 | * 
douglas.e.prin...@citi.com



sun4-cross: make
/xenv/Forte/sun4/11.0/5.8p8/prod/bin/CC -c  /xenv/OS/sun4/5.8p8/sun4u/include  
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO -xO3 -xspace 
-xildoff-DVERSION=\"1.53\"  -DXS_VERSION=\"1.53\" -KPIC 
"-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE"  -DDBI_NO_THREADS DBI.c
_CC: Invalid input file name /xenv/OS/sun4/5.8p8/sun4u/include, no output 
generated for this file.
"DBI.xs", line 149: Warning: String literal converted to char* in 
initialization.
"DBI.xs", line 205: Error: Cannot use void* to initialize char*.
"DBI.xs", line 306: Warning: String literal converted to char* in 
initialization.
"DBI.xs", line 307: Warning: String literal converted to char* in 
initialization.
"DBI.xs", line 308: Warning: String literal converted to char* in 
initialization.
"DBI.xs", line 309: Warning: String literal converted to char* in 
initialization.
"DBI.xs", line 310: Warning: String literal converted to char* in 
initialization.
"DBI.xs", line 330: Warning: String literal converted to char* in 
initialization.
"DBI.xs", line 353: Warning: String literal converted to char* in 
initialization.
"DBI.xs", line 354: Warning: String literal converted to char* in formal 
argument little in call to Perl_sv_insert(sv*, unsigned, unsigned, char*, 
unsigned).
"DBI.xs", line 362: Warning: String literal converted to char* in assignment.
"DBI.xs", line 408: Warning: String literal converted to char* in assignment.
"DBI.xs", line 1014: Warning: String literal converted to char* in 
initialization.
"DBI.xs", line 1066: Warning: String literal converted to char* in formal 
argument attrib in call to dbih_setup_attrib(sv*, imp_xxh_st*, char*, sv*, int, 
int).
"DBI.xs", line 1067: Warning: String literal converted to char* in formal 
argument attrib in call to dbih_setup_attrib(sv*, imp_xxh_st*, char*, sv*, int, 
int).
"DBI.xs", line 1068: Warning: String literal converted to char* in formal 
argument attrib in call to dbih_setup_attrib(sv*, imp_xxh_st*, char*, sv*, int, 
int).
"DBI.xs", line 1069: Warning: String literal converted to char* in formal 
argument attrib in call to dbih_setup_attrib(sv*, imp_xxh_st*, char*, sv*, int, 
int).
"DBI.xs", line 1070: Warning: String literal converted to char* in formal 
argument attrib in call to dbih_setup_attrib(sv*, imp_xxh_st*, char*, sv*, int, 
int).
"DBI.xs", line 1073: Warning: String literal converted to char* in formal 
argument attrib in call to dbih_setup_attrib(sv*, imp_xxh_st*, char*, sv*, int, 
int).
"DBI.xs", line 1074: Warning: String literal converted to char* in formal 
argument attrib in call to dbih_setup_attrib(sv*, imp_xxh_st*, char*, sv*, int, 
int).
"DBI.xs", line 1076: Warning: String literal converted to char* in formal 
argument attrib in call to dbih_setup_attrib(sv*, imp_xxh_st*, char*, sv*, int, 
int).
"DBI.xs", line 1694: Warning: String literal converted to char* in 
initialization.
"DBI.xs", line 1695: Warning: String literal converted to char* in 
initialization.
"DBI.xs", line 1697: Warning: String literal converted to char* in assignment.
"DBI.xs", line 2380: Warning: String literal converted to char* in formal 
argument prefix in call to log_where(sv*, int, char*, char*, int, int, int).
"DBI.xs", line 2380: Warning: String literal converted to char* in formal 
argument suffix in call to log_where(sv*, int, char*, char*, int, int, int).
"DBI.xs", line 2383: Warning: String literal converted to char* in formal 
argument prefix in call to log_where(sv*, int, char*, char*, int, int, int).
"DBI.xs", line 2383: Warning: String literal converted to char* in formal 
argument suffix in call to log_where(sv*, int, char*, char*, int, int, int).
"DBI.xs", line 2386: Warning: String literal converted to char* in formal 
argument prefix in call to log_where(sv*, int, char*, char*, int, int, int).
"DBI.xs", line 2386: Warning: String literal converted to char* in formal 
argument suffix in call to log_where(sv*, int, char*, char*, int, int, int).
"DBI.xs", line 2389: Warning: String literal converted to char* in formal 
argument prefix in call to log_where(sv*, int, char*, char*, int, int, int).
"DBI.xs", line 2389: Wa

Re: (Fwd) DBD::Oracle - Issues Compiling DBI

2010-02-02 Thread Martin Evans
Prindle, Douglas E wrote:
> Hello,
> 
>  
> 
> Being first time through this process when I did the make it was looking
> for the gcc compiler. My company has made that End Of Life due to it
> being a sunsetted product.

really?

> So I switched to the Forte 11 compiler from
> Sun which we have had no issues with compiling other existing c code.

But of course you realise you need to ensure the perl you are using was
compiled with this compiler too.

> 
> However, when I try to make the DBI after pointing it to the new Forte
> compiler I am getting a series of errors that seem to point to the DBI.c
> and DBI.xs files as having issues.
> 
>  
> 
> Can you please advise as to what I can do? I am thinking maybe some very
> strict compiler options are on? But not sure.

I think so but I cannot see them in the output you provided so I imagine
forte C has some central defaults - I cannot guess what they are or what
they do.

>  
> 
> Any and all help greatly appreciated.
> 
>  
> 
> *Thank You, *
> 
> *Douglas E. Prindle* | Apollo Infrastructure | Cards IT - Citi Brands
> 
> ((904) 954-2472 | 6(904) 954-6305 | * douglas.e.prin...@citi.com
> 

Please don't cc all these people - they are all on the dbi-users list
which you are also worth subscribing to if you are going to use DBI.

Firstly, the version of DBI you are using (1.53) is quite old now (02
Nov 2006) and you would be better getting 1.609 (08 Jun 2009).

Secondly, most of those warnings can be safely ignored - although
"String literal converted to char* in initialization" is a new one to me.

The problem lines appear to be:

"DBI.xs", line 205: Error: Cannot use void* to initialize char*.
which is:
static char *dbi_build_opt = "-nothread";

What is wrong with that?

"DBI.c", line 3923: Error: Unexpected type name "SV" encountered.
This is a generated file so we'd need to see what you generated.

Try and find what default options your compiler is using and work out
what they do. I'd look into this but I've not got Forte C 11 so I think
you'll have to do some digging around yourself.

Martin
-- 
Martin J. Evans
Easysoft Limited
http://www.easysoft.com