gcc-2.96/RH7,3 .vs gcc-3.2/RH8.0 portability issues

gcc-2.96/RH7,3 .vs gcc-3.2/RH8.0 portability issues

Post by Rich Coc » Mon, 04 Nov 2002 04:46:45



I have a fairly large application that was developed and built under gcc
2.96 (RH7.x). I have recently upgraded a Linux workstation to RH 8.0,
which installed gcc 3.2. The app no longer compiles.

the biggest problem had to do with STL header file issues (names,
location of templates, etc...). Poking around /usr/include/c++/3.2, I
noticed a 'backwards' directory.

Simply adding a "-I /usr/include/c++/3.2/backwards" seemed to take care
of STL issues.

However, I also have other header file problems (that were lost in the
volumes of STL errors/warnings I had previously got). For example,
'struct timeval' no longer was getting defined (even tho time.h and
bit/time.h were getting included).

Rather than try to deal with individual issues of this type as they
appeared, it seems like there must be a more reasonable approach that I
am unaware of...for example some king of "compatibility" switch on the
compile-line. I looked thru gcc documentation but nothing jumped out at me.

So my question is this:

Is there a "canonical" way to deal with this issue; in particular, a
compile-time compatibility flag that will permit gcc 2.96 apps to build
w/o having to modify source code?

Tx

- rich coco

 
 
 

gcc-2.96/RH7,3 .vs gcc-3.2/RH8.0 portability issues

Post by Juergen Heinz » Mon, 04 Nov 2002 10:31:37



> I have a fairly large application that was developed and built under gcc
> 2.96 (RH7.x). I have recently upgraded a Linux workstation to RH 8.0,
> which installed gcc 3.2. The app no longer compiles.
[-]
> However, I also have other header file problems (that were lost in the
> volumes of STL errors/warnings I had previously got). For example,
> 'struct timeval' no longer was getting defined (even tho time.h and
> bit/time.h were getting included).

[-]
#include <sys/time.h>
[-]
Quote:> So my question is this:

> Is there a "canonical" way to deal with this issue; in particular, a
> compile-time compatibility flag that will permit gcc 2.96 apps to build
> w/o having to modify source code?

[-]
Fix your code as aside from gcc-2.96 being a RH thing gcc-3.2 is
much more ISO C++ compliant than previous releases. In short your
code isn't C++ anyway.

Cheers,
Juergen

--
\ Real name     : Juergen Heinzl       \       no flames      /


 
 
 

gcc-2.96/RH7,3 .vs gcc-3.2/RH8.0 portability issues

Post by xavie » Tue, 05 Nov 2002 07:42:50


Quote:> Is there a "canonical" way to deal with this issue; in particular, a
> compile-time compatibility flag that will permit gcc 2.96 apps to build
> w/o having to modify source code?

try   -Wno-deprecated

xavier

 
 
 

gcc-2.96/RH7,3 .vs gcc-3.2/RH8.0 portability issues

Post by AndrĂ© P?nit » Tue, 05 Nov 2002 17:56:28



> So my question is this:

> Is there a "canonical" way to deal with this issue; in particular, a
> compile-time compatibility flag that will permit gcc 2.96 apps to build
> w/o having to modify source code?

I think the canonical way _is_ to fix the sources - especially if it is
your own code. If you intent to keep the code around for a few more years
this certainly will pay off...

Andre'

--
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)

 
 
 

1. gcc-2.96 to gcc-2.95

I'm having difficulty with gcc-2.96.  Some of which I've been able to
sort out but other out of my league.  For instance, I keep getting these
warning messages when compiling fortran programs:

/usr/bin/ld: Warning: size of symbol `ctime_' changed from 12 to 14 in
Lctime.o
/usr/bin/ld: Warning: type of symbol `ctime_' changed from 1 to 2 in
Lctime.o
/usr/lib/gcc-lib/i386-redhat-linux/2.96/libg2c.a(open.o): In function
`f_open':
open.o(.text+0x4e6): the use of `tempnam' is dangerous, better use
`mkstemp'

The most basic compilation command I use is (g77 -o executable file.f
....).  The problem is that all these algorithms ran perfectly fine with
gcc-2.95 but now some run normally and others don't (i.e. seem to
develop segmentation problems).

I'm not skilled enough to mess with the compiler code.  So what issues
am I facing if I try to reinstall the older gcc-2.95 rpm?

Doug

2. Stats comp.os.linux.networking (last 7 days)

3. RH7, QT-2.2.1, and GCC-2.96 = 1 broken KDE 2.0

4. comp.os.linux.misc, comp.os.linux.x

5. gcc-2.95.3 vs gcc-3.0.4

6. RH 8 and Conextant PCI ADSL

7. gcc-2.5.8 vs gcc-2.7.0

8. Sun Sparc 5

9. RedHat 7 includes gcc-2.96?

10. gcc-2.96-85 rpm for i386

11. segfault and gcc-2.96

12. upgrading to gcc-2.96 on Redhat 6.*

13. Problem with gcc-2.96 and uncaught exceptions