GCC version problem


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat GCC version problem
# 1  
Old 08-01-2008
GCC version problem

I have a host PC and a target system .
Host System -> gcc (3.2) Redhat linux kernel 2.4.20-8 , glibc 2.3
Target System -> gcc (4.1) Fedora linux kernel 2.6.18-1.2798.fc6, glibc 2.5

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

g++ -c test.c -o test

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

ldd on Target System
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 Host system and run on both systems Host and Target.
on Host system ok
on Target System ok.

Test case 2
Build test.c on Target system and run on both systems Host and Target.
on Target System ok
on Host system error
error log
# ./test
Floating point exception



I have a feeling the problem is in the libraries.?
please guide me to resolve this problem.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Downloading and installing a very old version of gcc

I would like to acquire a very old version of gcc: 4.4.3 and set it up in such a way that I can use the update-alternatives command to switch between my current version and the older version. I believe I may have found a website where I can download 4.4.3 from. However, I am not sure what all I... (6 Replies)
Discussion started by: Circuits
6 Replies

2. Programming

gcc problem

Hi, I just try to solve the problem why one app failing on box1 and runs ok on box2, they have diff gcc version as I see from /proc/version: box1:: 3.4.1 box2:: 4.1.2 It's RedHat 64b boxes, so I can not run some <make all> command on box1, do you think I need to upgrade (if I'm using... (1 Reply)
Discussion started by: mario17
1 Replies

3. Programming

Getting the random failure after upgraded the gcc version 3.1 to 3.4.6

I am getting the a random failure after upgrading the gcc version 3.1 to 3.4.6. My code where it is failing contains some STL and shared memory concepts.It is perfectly working on old version of gcc.I want to know what are possible causes that made this random error after upgrading gcc 3.4.6. (2 Replies)
Discussion started by: kapilkumawat
2 Replies

4. HP-UX

GCC version findout

Hi, In unix box GCC installed under the /usr/local/bin/gcc, i want to know the version of GCC. Could you please let me know the process for that. Thanks & Regards, Suji (1 Reply)
Discussion started by: srujana
1 Replies

5. UNIX for Dummies Questions & Answers

how to know the gcc version

Please someone can say me how to know the gcc version installed on my sunsolaris? Thanks (2 Replies)
Discussion started by: Minguccio75
2 Replies

6. Solaris

gcc output size differs on same version of solaris

Hello everybody, I am having two machines. I am using g++v2.95 When I do the build,the size of output file on both machines differ. I am not able to find what can be the problem. Both the machines are solaris 5.6 The command is : g++ -c -g -I./ -I../../../include -I/usr/local/include/g++-3... (1 Reply)
Discussion started by: manishs13
1 Replies

7. Programming

A problem of GCC

Hi mates, I am a new comer of this forums. I have a problem while using function "fread(buffer, size, number, file-pointer)" to read a binary file. While I used the "fread()" to read the binary file under Solaris UNIX System, it worked very well. But it gets a incorrect result... (6 Replies)
Discussion started by: cquedugdylp
6 Replies

8. UNIX for Dummies Questions & Answers

gcc compiler version?

How do you determine which version of the GNU gcc compiler is on your system? (1 Reply)
Discussion started by: Ben070371
1 Replies

9. Programming

gcc Link problem

I have some crypting functions in object-file - for example,func.o Main file,from where crypting functions called, named as main.cpp . "gcc main.cpp -o main func.o" print "undefined reference to ... " But if I rename main.cpp to main.c and execute "gcc main.c -o main func.o" - ok. If anybody,... (3 Replies)
Discussion started by: Gigachel
3 Replies

10. Shell Programming and Scripting

gcc version filtering !!

Folks, I am using gcc 2.7.2.1 for NeXT PDO on my Solaris box. I want to get gcc version in a script. I do gcc -v and try to filter the output through awk. It won't come. Strange. Assigning it to the variable is also not possible. Any ideas ? Cheers, Amol. (4 Replies)
Discussion started by: amol
4 Replies
Login or Register to Ask a Question
premake(1)							    Development 							premake(1)

Name
       premake - a build script generator

Copyright
       Copyright (C) 2002-2008 Jason Perkins and the Premake Project Lua 5.1 Copyright (C) 1994-2008 Lua.org, PUC-Rio

Usage
	--file name	  Process the specified premake script file

	--clean 	  Remove all binaries and build scripts
	--verbose	Generate verbose makefiles (where applicable)

	--cc name	  Choose a C/C++ compiler, if supported by target; one of:
	     gcc       GNU gcc compiler
	     dmc       Digital Mars C/C+ compiler (experimental)

	--dotnet name	  Choose a .NET compiler set, if supported by target; one of:
	     ms        Microsoft (csc)
	     mono      Mono (mcs)
	     mono2     Mono .NET 2.0 (gmcs)
	     pnet      Portable.NET (cscc)

	--os name	  Generate files for different operating system; one of:
	     bsd       OpenBSD, NetBSD, or FreeBSD
	     linux     Linux
	     macosx    MacOS X
	     windows   Microsoft Windows

	--target name	  Generate input files for the specified toolset; one of:
	     cb-gcc    Code::Blocks Studio with GCC
	     cb-ow     Code::Blocks Studio with Open Watcom C/C++
	     cl-gcc    CodeLite with GCC
	     gnu       GNU Makefile for POSIX, MinGW, and Cygwin
	     monodev   MonoDevelop
	     sharpdev  ICSharpCode SharpDevelop
	     vs6       Microsoft Visual Studio 6
	     vs2002    Microsoft Visual Studio 2002
	     vs2003    Microsoft Visual Studio 2003
	     vs2005    Microsoft Visual Studio 2005 (includes Express editions)
	     vs2008    Microsoft Visual Studio 2008 (experimental)

	--help		  Display this information
	--version	  Display version information

Jason Perkins and the Premake Project					3.7								premake(1)