How do I force a specific compiler in Configure/make

Discussion in 'Perl Misc' started by Jake, Jan 18, 2005.

  1. Jake

    Jake Guest

    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)
    Jake, Jan 18, 2005
    #1
    1. Advertising

  2. 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
    Sherm Pendley, Jan 18, 2005
    #2
    1. Advertising

  3. Jake

    Sisyphus Guest

    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.
    Sisyphus, Jan 18, 2005
    #3
  4. Jake

    Jacob Guest

    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
    Jacob, Jan 18, 2005
    #4
  5. Jake

    Jacob Guest

    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
    Jacob, Jan 19, 2005
    #5
  6. 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
    Sherm Pendley, Jan 20, 2005
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. whizkid
    Replies:
    5
    Views:
    881
    Thomas Stanka
    Nov 9, 2004
  2. Marco Maroni
    Replies:
    2
    Views:
    1,642
    SteveWestbrook
    Apr 17, 2009
  3. HS1
    Replies:
    0
    Views:
    455
  4. Chris Miles
    Replies:
    2
    Views:
    378
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Oct 13, 2006
  5. Chris Miles
    Replies:
    2
    Views:
    294
    Chris Miles
    Oct 15, 2006
Loading...

Share This Page