Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > How do I force a specific compiler in Configure/make

Reply
Thread Tools

How do I force a specific compiler in Configure/make

 
 
Jake
Guest
Posts: n/a
 
      01-18-2005
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 DBDracle. I have found it most stubborn in
whatever options I have chosen for perl and DBI - the make
test for DBDracle 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 DBDracle
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)

 
Reply With Quote
 
 
 
 
Sherm Pendley
Guest
Posts: n/a
 
      01-18-2005
Jake wrote:

> 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--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
 
Reply With Quote
 
 
 
 
Sisyphus
Guest
Posts: n/a
 
      01-18-2005
Jake wrote:

>
> 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



--
To reply by email u have to take out the u in kalinaubears.

 
Reply With Quote
 
Jacob
Guest
Posts: n/a
 
      01-18-2005
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 DBDracle 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 DBDracle against a 64-bit
database?

Thanks.

-- Jacob JSalomon at bn.com

 
Reply With Quote
 
Jacob
Guest
Posts: n/a
 
      01-19-2005
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
----
Sisyphus wrote:
> Jacob wrote:
>
> > before each new Configure, I run "make realclean" and rm -rf
> > the whole blessed directory in which I had untarred the perl
> > tar file , I then untar it afresh. The "make realclean" is
> > pure unnecessary paranoia. But there's no config.sh or
> > policy.sh to force my compiler any which way before I
> > start... I looked into policy.sh before the make. I did
> > not find anything that looks like compiler control, though I
> > may have missed it.
> >
> > There's nothing in /tmp that looks like today's activity.
> > (/tmp/fcgi_49346 says nothing I can decipher.)
> >
> > How much cleaner can a guy get?

>
> That should be clean enough
> Seems to me that there's something that INSTALL and/or README.aix is

not
> telling us.
>
> Is 'cc_r' the default compiler ? Perhaps 'xlc_r' is not being
> recognised, so it defaults to the ...ummm .... default. (Dunno - just

a
> thought.)
>
> Cheers,
> Rob


 
Reply With Quote
 
Sherm Pendley
Guest
Posts: n/a
 
      01-20-2005
Jacob wrote:

> /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--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Nike air force one, air force 1, air force one low cut, air force one abdul_razak@indiatimes.com Digital Photography 2 12-31-2008 04:29 PM
Nike Air Force Ones,Air Force One Air Force One-1 lky52193@gmail.com Computer Support 0 01-17-2008 04:40 PM
Nike Air Force Ones,Air Force One Air Force One-1,25th anniversary lky52112@gmail.com Digital Photography 0 01-15-2008 04:46 PM
Nike Air Force Ones,Air Force One Air Force One-1,25th anniversary lky52112@gmail.com Digital Photography 0 01-15-2008 04:34 PM



Advertisments