LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-08-2008, 12:47 PM   #1
rpomerleau
LQ Newbie
 
Registered: Feb 2006
Posts: 1

Rep: Reputation: 0
Things to consider when compiling C using 32 bits instead of 64 bits processors


Hi, we have a lot of oracle pro*c and c programs that ran on a 64 bits. We decided to run them on a 32 bits processor and of course, we have to recompiled all of them with gcc. All compiled correctly but some created core dump on execution. We checked the core dump files and tried to find out what the problem was but we didn't have any clues. So my question is, what should we consider when compiling and executing c program that was build to run on a 64 bits processor. We try to compile with -m32 switch (gcc) without success. I mean, the problem is still there, not with compilation but on execution. Thanks for your help.
 
Old 07-08-2008, 01:01 PM   #2
dmail
Member
 
Registered: Oct 2005
Posts: 970

Rep: Reputation: Disabled
This article points out the problems when porting the code. Whilst the article is about C++ much of it is still valid(if not all), you can see future articles about the subject from their website

Last edited by dmail; 07-08-2008 at 01:21 PM.
 
Old 07-08-2008, 01:22 PM   #3
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Quote:
Originally Posted by rpomerleau View Post
Hi, we have a lot of oracle pro*c and c programs that ran on a 64 bits. We decided to run them on a 32 bits processor and of course, we have to recompiled all of them with gcc. All compiled correctly but some created core dump on execution. We checked the core dump files and tried to find out what the problem was but we didn't have any clues. So my question is, what should we consider when compiling and executing c program that was build to run on a 64 bits processor. We try to compile with -m32 switch (gcc) without success. I mean, the problem is still there, not with compilation but on execution. Thanks for your help.
Other then providing general pitfalls such as the list posted by dmail we can't do much else here. I really suggest you analyze the coredump with gdb and figure it out from that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Install Mandriva Spring 2008 64 bits over mandriva 2007 free 32 bits nightrider Linux - Newbie 2 06-27-2008 11:22 AM
How to change MAC address from 48 bits to 32 bits? cywong.digi Linux - Networking 1 09-05-2007 09:28 AM
cluster with 64 bits processors on Linux - available choices julot Linux - Software 1 02-16-2007 10:04 AM
32 bits version distros running 64 bits CPU javb Linux - General 4 04-02-2006 07:21 AM
Java 64 bits and applications of 32 bits RGB_mdk Linux - Software 3 06-13-2005 09:05 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration