compiling on 64bit systems


 
Thread Tools Search this Thread
Top Forums Programming compiling on 64bit systems
# 1  
Old 10-01-2007
compiling on 64bit systems

Is it possible to compile the same source code on 32bit and 64bit systems?

I'm trying to compile OpenLDAP on AIX 5.3 64 bit with gcc but I get a memory fault when sarting it and I think it is caused by a 32bit vs 64bit problem.
# 2  
Old 10-01-2007
Quote:
Originally Posted by rein
Is it possible to compile the same source code on 32bit and 64bit systems?
Yes *if*

1. the code supports a 64bit environment and
2. the code detects the appropriate defines, for example "_LP64".
3. doesn't make silly assumptions about length of "long", see 1 and 2.
4. all libraries that it needs are available in 64 bit mode.

I've used gcc on DEC-Alpha, 64 bit UltraSparc-II and 64 bit PA-Risc-2 without problem, also gcc is used by Apple for 64 bit G5 Macintoshes.

64 bit AIX uses dual shared libraries which contain both 32 bit code(shr.o) and 64 bit code(shr64.o), so the link should fail if the correct type is not available.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. What is on Your Mind?

From Systems Admin to Systems Eng.

I have been wondering how do Systems Administrators do the jump into Systems Engineering? Is it only a matter of time and experience or could I actually help myself get there? Opinions? Books I could read? Thanks a lot for your help! (0 Replies)
Discussion started by: svalenciatech
0 Replies

2. UNIX for Dummies Questions & Answers

Using cvsup on a 64bit-OpenBSD

After doing some searching I noticed there doesnt seem to be a 64bit version of cvsup & it seems that the other utility thats used "csup" doesnt have as many options. So what would be the best option for installing & upgrading pkgs or ports. Can you still install "cvsup" & does it matter if its... (0 Replies)
Discussion started by: Browser
0 Replies

3. Solaris

Where to download solaris 10 for sparc 64bit?

hi all I just got a sun blade 2000 server for free. I need to load a solaris 10 for sparc OS to it. the memory inside the box is 5gb. the cup is SUNW,UltraSPARC-III+ (1200 MHz @ 8:1, 8 MB). so my questions is 1. do I need to install a 64bit os or a 32bit os? 2. where can I download the... (3 Replies)
Discussion started by: rs6000er
3 Replies

4. Solaris

Compiler - 32bit or 64bit?

Hi Gurus, I need to check whether the compiler installed in my system supports 64bit compilation. Server - Sun fire v490 OS - Solaris 5.9 Processor - Sparcv9 (64bit) Install Directory - /opt/SUNWSpro Compiler Model - Sun Forte C Compiler. My development team is claiming that there... (20 Replies)
Discussion started by: Hari_Ganesh
20 Replies

5. Programming

32bit to 64bit conversion.

Is there an 'easy' way to convert 32Bit code to 64Bit code. I have this benchmark i need to run on different machines and it would be nice if i could run it on the 64 bit machines ass wel. The output when compiling(1) and running(2) are the following: (1) linux:/home/user1/subbench/heapsort #... (7 Replies)
Discussion started by: demuynckr
7 Replies

6. Linux

Linux 32bit or 64bit

Hi, I want to know what is command to know which will tell wheather linux is 32 or 64 bit (5 Replies)
Discussion started by: manoj.solaris
5 Replies

7. Programming

dlclose crashing in 64bit

Hi I have a 64bit C++ dynamic component built using Sun Forte compiler(CC) on one server. I am opening this shared component using dlopen and checking if a particular function is defined or not. After that, when I am closing the component using dlclose, the program is crashing. The... (3 Replies)
Discussion started by: ajphaj
3 Replies

8. Linux

Oracle and 64bit Linux

Hello All, Does anybody installed the subj? How it works? Any troubles/problems? M (1 Reply)
Discussion started by: mg`
1 Replies

9. UNIX for Dummies Questions & Answers

64bit- or 32bit- processor

when using the command : cat /proc/cpuinfo I get some basic info back on the cpu.. but it doesn't tell me if I am using a 64 or 32 bit processor .. a) is this the right command to find this ? b) if it is not what is ? and how do I get that information.. thanx moxxx68 (2 Replies)
Discussion started by: moxxx68
2 Replies

10. UNIX for Dummies Questions & Answers

32bit vs 64bit

Whats the difference between 32bit and 64bit OS's or applications. I understand it a little but its just not clicking the way the teacher explained to me thanks, any info would be much appreciated (1 Reply)
Discussion started by: eloquent99
1 Replies
Login or Register to Ask a Question