gcc compatibility

cdinesh dinesh.chuhan@gmail.com
Thu May 22 03:38:00 GMT 2008


Properly
Strike
Protest

 Hi 

    I have two  Linux systems  have different gcc  version 
          system A  -> gcc  (3.4.4)
          system B  -> gcc  (4.1.2)


  I would like to build test program that can be run on both systems 
  ---------------------------
  #include <stdio.h>
  main(){
   printf("hello world \n");
  }
  ---------------------------
   gcc test.c -o test

  ldd on system A 
         linux-gate.so.1 =>  (0x00d42000)
        libc.so.6 => /lib/tls/libc.so.6 (0x00b0c000)
        /lib/ld-linux.so.2 (0x00af2000)

  ldd on system B 
         linux-gate.so.1 =>  (0x00814000)
        libc.so.6 => /lib/libc.so.6 (0x0054a000)
        /lib/ld-linux.so.2 (0x0052d000)

   Test case 1 
     Build test.c on system A and run on both systems A and B. 
           on sytem A     ok
            on system B    ok.

   Test case 2 
     Build test.c on system B and run on both systems A and B. 
             on system B   ok
             on system A   error
           error log 
             # ./test
              Floating point exception

             # ldd 
             /usr/bin/ldd: line 124:  3911 Floating pointexception
LD_TRACE_LOADED_OBJECTS=1 LD_WARN= 
             LD_BIND_NOW= LD_LIBRARY_VERSION
 =$verify_out LD_VERBOSE= "$@"
 
    for other information 

      System A 
            kernel  2.6.12
            gliibc version  2.3.6
            binutils  2.15.92.0.2
            selinux disable

      System B 
            kernel  2.6.18
            gliibc version  2.5
            binutils  2.17.50.0.6
            selinux disable


I have a feeling the problem is in the libraries. Please give any advice ?

Thank you 

-- 
View this message in context: http://www.nabble.com/gcc--compatibility-tp17396275p17396275.html
Sent from the gcc - Help mailing list archive at Nabble.com.



More information about the Gcc-help mailing list