How do I force a specific compiler in Configure/make

J

Jake

IBM RISC/6000
AIX 5.1 - 64-bit
Oracle 9i - 9.2.0.4 - 64-bit
Perl 5.8.6
DBI 1.46
DBD:Oracle 1.16

Hi Folks.

Last week I posted on comp.lang.perl.modules with questions
on compiling DBD:eek:racle. I have found it most stubborn in
whatever options I have chosen for perl and DBI - the make
test for DBD:eek:racle fails no matter what I have done in perl
and DBI (which passed all tests and successfully installed.)

One common factor to the failures: The command "perl
Makefile.PL" always starts with a warning:

Warning: You will may need to rebuild perl using the xlc_r compiler.^G
You may also need do: ORACCENV='cc=xlc_r'; export ORACCENV
Also see the README about the -p option

I have tried several options in an attempt to force perl to
get compiled with this xlc_r compiler:

- Configure -Dcc=xlc_r (plus other options)
- export ORACCENV=xlc_r; Configure ...
- export ORACCENV='cc=xlc_r; Configure ...

There are each from different sources, like README.aix for DBD:eek:racle
and the above warning.

After each of these attempts, I looked into the Makefile and
still found:
CC=cc_r

At one point I even edited the Makefile manually and forced
CC=xlc_r .
When the make started, I see it running cc_r again.

What can I do to force Configure to specify the compiler of
my choice inthe Makefile and have it obeyed throutout the
process. And when I'm over that hurdle, will that choice of
compiler automatically propagate to compilation of DBI and
DBD?

If it's in the README or INSTALL file, I messed it. A search
of these file for the word "compile" did not turn up any
useful option.

BTW, the README (for DBD) has scant information about the -p
option and I'm not experiencing core dumps anyway.
Thanks for any help here.

-- Jacob (JSalomon at bn.com)
 
S

Sherm Pendley

Jake said:
I have tried several options in an attempt to force perl to
get compiled with this xlc_r compiler:

- Configure -Dcc=xlc_r (plus other options)
- export ORACCENV=xlc_r; Configure ...
- export ORACCENV='cc=xlc_r; Configure ...
....

At one point I even edited the Makefile manually and forced
CC=xlc_r .
....

What can I do to force Configure to specify the compiler of
my choice inthe Makefile and have it obeyed throutout the
process.

Normally, you'd do that with the CC environment variable. That's not a
unique "Perl thing" at all, it's used pretty much everywhere.

export CC=/where/ever/xlc_r
And when I'm over that hurdle, will that choice of
compiler automatically propagate to compilation of DBI and
DBD?

It should, unless you have a CC environment variable. That might override it
- I haven't checked.

sherm--
 
S

Sisyphus

Jake said:
I have tried several options in an attempt to force perl to
get compiled with this xlc_r compiler:

- Configure -Dcc=xlc_r (plus other options)

Afaik, that should work - unless perhaps there's a config.sh or a
Policy.sh from a previous run of 'Configure' sitting there. But if
you're starting afresh, then that should do it. At least that's what the
INSTALL file says - and I can't find anything in README.aix to
contradict INSTALL.

If you're sure that there is no interference from a previous run of
'Configure', then maybe the porters list can help - if you don't find
the answer here.

Cheers,
Rob
 
J

Jacob

Sherm et al,

I'm sorry to report that neither of the following has gotten
the make to work with the xlc_r compiler:

- export CC=xlc_r
- Configure -DCC=xlc_r

The make is now proceeding with its chosen compiler, cc_r
and there seems to be nothing I can do to stop it. So if
the DBD:eek:racle really depends on the xlc_r compiler, I would
be wiser to pack it in.

I was recently informed by the one person in my company who
has gotten perl working: He realized he's using a 32-bit
compiled perl alfter all. I have been using Configure
options -Dusethreads and -Duse64bitall. The xlc_r compiler
compiles 32-bit by default. I wonder if this problem would
all go away if I gave up on the 64-bit perl.

And if I do go the 32-bit route, what consequence will it
have when I try to compile the DBD:eek:racle against a 64-bit
database?

Thanks.

-- Jacob JSalomon at bn.com
 
J

Jacob

Rob,

let's take all your remarks in turn:

$ whereis xlc_r
xlc_r: /usr/bin/xlc_r

Yes, it's in my path. I can type xlc_r -v and get several
screenfuls of information. (I work with 54-line X-Window
sessions so that's saying something.) If I type cc -v I
also get lots of info, including the fact that I could have
typed xlc_r.

Checking for aliases, I was surprised to find as many as I
did, but xlc_r was not in the list. However, among the
aliases was this tidbit:
cc=/usr/bin/cc

Anything in that? Nah, the make is not invoking cc, it's
invoking cc_r.

For all flavors of the compiler, the -v option told me it
was Version 6.

<sigh!>
Thanks for the efforts. I haven't given up yet..

-- Jacob JSalomon at bn.com
----
 
S

Sherm Pendley

Jacob said:
/usr/bin/cc is a link all right. But not to any exotic compilers
$ ls -l /usr/bin/cc
lrwxrwxrwx 1 root system 15 Dec 02 2003 /usr/bin/cc -> /usr/vac/bin/cc

Hence, relevence still lacking.

Not at all! The aix.sh hints file has some special handling for the case
where the first compiler it finds is a link, and the target of that link
has the string "vac" in its path - I think that might be biting you.

Try this: Create a bin/ subdirectory in your home directory, and prepend
that to your PATH. Then, create a 'cc' symlink in that directory, with the
target being whatever compiler you want to use. Also, get rid of the 'cc=
usr/bin/cc' alias, and any 'CC' or 'cc' environment variables.

sherm--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top