How to use 2.96 version of C and C++ compile with RHEL 3 ESr? - Redhat

This is a discussion on How to use 2.96 version of C and C++ compile with RHEL 3 ESr? - Redhat ; I cannot compile for IBM's DB2 dbms when programs contain embedded SQL on my RHEL 3 ES system. This system invokes compiler version 3.2.3 by default, whereas IBM wants 2.96. I notice there is a whole directory near the normal ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: How to use 2.96 version of C and C++ compile with RHEL 3 ESr?

  1. How to use 2.96 version of C and C++ compile with RHEL 3 ESr?

    I cannot compile for IBM's DB2 dbms when programs contain embedded SQL on
    my RHEL 3 ES system. This system invokes compiler version 3.2.3 by
    default, whereas IBM wants 2.96.

    I notice there is a whole directory near the normal one
    (/usr/lib/gcc-lib/i386-redhat-linux/3.2.3) that is called
    /usr/lib/gcc-lib/i386-redhat-linux7/2.96 that contains much of the same
    stuff (but far less). They seem to come with packages:

    compat-gcc-7.3-2.96.123
    compat-gcc-c++-7.3-2.96.123

    Is there a way I can make the gcc and g++ compilers use this? I assume
    there is. Do I invoke a different compiler, or put some different flags on
    the command line? How? I cannot find the documentation for it. I would be
    quite willing to RTFM if I could find it.

    --
    .~. Jean-David Beyer Registered Linux User 85642.
    /V\ Registered Machine 241939.
    /( )\ Shrewsbury, New Jersey http://counter.li.org
    ^^-^^ 22:15:00 up 9 days, 22:57, 7 users, load average: 4.18, 4.13, 4.11


  2. Re: How to use 2.96 version of C and C++ compile with RHEL 3 ESr?

    In article <109bbc6841shg2a@corp.supernews.com>, Jean-David Beyer wrote:
    > I cannot compile for IBM's DB2 dbms when programs contain embedded SQL on
    > my RHEL 3 ES system. This system invokes compiler version 3.2.3 by
    > default, whereas IBM wants 2.96.
    >
    > I notice there is a whole directory near the normal one
    > (/usr/lib/gcc-lib/i386-redhat-linux/3.2.3) that is called
    > /usr/lib/gcc-lib/i386-redhat-linux7/2.96 that contains much of the same
    > stuff (but far less). They seem to come with packages:
    >
    > compat-gcc-7.3-2.96.123
    > compat-gcc-c++-7.3-2.96.123
    >
    > Is there a way I can make the gcc and g++ compilers use this? I assume
    > there is. Do I invoke a different compiler, or put some different flags on
    > the command line? How? I cannot find the documentation for it. I would be
    > quite willing to RTFM if I could find it.


    Try

    locate bin/gcc

    in Fedora Core1 I find:

    /usr/bin/gcc
    /usr/bin/gcc32
    /usr/bin/gcc296

    (gcc is the default, version 3.3.2)

    It is not a good idea to compile things (libraries, kernel,
    etc.) with a (very) different version of the compiler,
    so I tend to use gcc whenever I can.

    However, gcc32 and gcc296 are there if I need them.

    Most often, the easiest thing to do is to sent
    the enviornment variable CC to gcc296, for example,
    before running ./configure to compile.

    I have seen some packages which don't have a configure
    script where one might have to modify the Makefile to
    get it to use a particular version.

    There are also C++ compilers for backwards compatibility
    /usr/bin/g++296
    in Fedora Core1.

    So, check your system and see what you have.

  3. Re: How to use 2.96 version of C and C++ compile with RHEL 3 ESr?

    Spamless wrote:
    > In article <109bbc6841shg2a@corp.supernews.com>, Jean-David Beyer wrote:
    >
    >>I cannot compile for IBM's DB2 dbms when programs contain embedded SQL on
    >>my RHEL 3 ES system. This system invokes compiler version 3.2.3 by
    >>default, whereas IBM wants 2.96.
    >>
    >>I notice there is a whole directory near the normal one
    >>(/usr/lib/gcc-lib/i386-redhat-linux/3.2.3) that is called
    >>/usr/lib/gcc-lib/i386-redhat-linux7/2.96 that contains much of the same
    >>stuff (but far less). They seem to come with packages:
    >>
    >>compat-gcc-7.3-2.96.123
    >>compat-gcc-c++-7.3-2.96.123
    >>
    >>Is there a way I can make the gcc and g++ compilers use this? I assume
    >>there is. Do I invoke a different compiler, or put some different flags on
    >>the command line? How? I cannot find the documentation for it. I would be
    >>quite willing to RTFM if I could find it.

    >
    >
    > Try
    >
    > locate bin/gcc
    >
    > in Fedora Core1 I find:
    >
    > /usr/bin/gcc
    > /usr/bin/gcc32
    > /usr/bin/gcc296
    >
    > (gcc is the default, version 3.3.2)
    >
    > It is not a good idea to compile things (libraries, kernel,
    > etc.) with a (very) different version of the compiler,
    > so I tend to use gcc whenever I can.
    >
    > However, gcc32 and gcc296 are there if I need them.
    >
    > Most often, the easiest thing to do is to sent
    > the enviornment variable CC to gcc296, for example,
    > before running ./configure to compile.
    >
    > I have seen some packages which don't have a configure
    > script where one might have to modify the Makefile to
    > get it to use a particular version.
    >
    > There are also C++ compilers for backwards compatibility
    > /usr/bin/g++296
    > in Fedora Core1.
    >
    > So, check your system and see what you have.


    I finally found /usr/bin/gcc296 and /usr/bin/g++296. I was never able to
    find any documentation about gcc296 and g++296, either at Red Hat's site
    (or IBM's site).

    This fixed all the superficial problems I have compiling stuff for IBM's
    DB2 V8.1.5. Only the fundamental problem remains unsolved: It insists that
    NULL is undefined in various parts of a program (with embedded SQL) that
    compiled perfectly well with RHL 7.3 and ran with IBM DB2 V6.1. Sigh.

    --
    .~. Jean-David Beyer Registered Linux User 85642.
    /V\ Registered Machine 241939.
    /( )\ Shrewsbury, New Jersey http://counter.li.org
    ^^-^^ 05:45:00 up 10 days, 6:27, 7 users, load average: 4.17, 4.19, 4.03


+ Reply to Thread