Compiler - 32bit or 64bit?


 
Thread Tools Search this Thread
Operating Systems Solaris Compiler - 32bit or 64bit?
# 8  
Old 03-02-2010
You are welcome, Hari_Ganesh.

Thanks jlliagre for the update on cc options.
# 9  
Old 03-05-2010
Hi Gurus,

I thought the issue was resolved,but i am stumped again.

My Dev team is still behind me with the following issue:

Code:
 
Hi,
 
Could you please check with sun, if there is 64 bit CC available for both sun solaris x-86 and sparcv9. Both the servers that we checked has 64 bit libraries, but CC and other related bin is only of 32 bit. Please check and let us know as early as possible.
 
Even if we set compiler flags as -m64 or -xarch=sparcv9. As the CC or related binaries are of 32 bit, if we override them to link with a 64 bit libray, they fail to locate them. They internally get mapped with the path of 32 bit libraries and throw wrong ELF class error, while getting linked with our libraries.
 
X-86
cheux321 @ /ist/dndev
[446]dndev: file /opt/sunstudio12.1/bin/CC
/opt/sunstudio12.1/bin/CC:      ELF 32-bit LSB executable 80386 Version 1 [FPU], dynamically linked, stripped
 
Ultra-sparc
cheux402 @ /oasis/dndev
[175]dndev: file /opt/SUNWspro/bin/CC
/opt/SUNWspro/bin/CC:   ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required, dynamically linked, stripped
 
We have 64 bit ld available in both the servers. Likewise, please check if there is any similar patch available with sun for CC and related binaries also.
 
cheux321 @ /ist/dndev
[448]dndev: file /usr/ccs/bin/amd64/ld
/usr/ccs/bin/amd64/ld:  ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, stripped
 
cheux402 @ /oasis/dndev
 [178]dndev: file /usr/ccs/bin/sparcv9/ld
/usr/ccs/bin/sparcv9/ld:        ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, stripped



Their question is that there is no 64 bit CC binary in the said path while as there are 64 bit library files(as the above otput . This is what i understood from the meeting i had.
I was not sure about how to proceed apart from logging a case with Sun.

Any inputs is appreciated.

HG
# 10  
Old 03-05-2010
What case would it be ?

There is absolutely no relationship between the compiler itself being 32 or 64 bit and its ability to create 32 or 64 bit binaries.
# 11  
Old 03-07-2010
Hi Jlliagre,

Thanks jlliagre for clarifying that there is no diparity in "CC" binary for 32bit and 64 bit compilation.

Thanks Again..
# 12  
Old 03-09-2010
Hi jlliagre,

I am back again...(Sorry i don't have anybody else to resort to)...

My problem now is(ofcourse my dev team)....They have illustrated a scenario which is explaining their issue...Would really appreciate if you could find a solution.

HTML Code:
A simple scenario:
 
In C++ it is desirable to inline (feature of C++) as many codes as possible to reduce the run-time overhead of CPU intensive applications. iropt component is the global optimizer in Sun Studio compiler collection suite; and inlining will be taken care by iropt. 
 
Like CC, iropt is also a 32 bit binary in our compiler, so when initiated it throws an error like this:
 
[422]dndev: iropt -help
ld.so.1: iropt: fatal: /usr/lib/amd64/libdemangle.so.1: wrong ELF class: ELFCLASS64
Killed
cheux321 @ /ist/dndev
[427]dndev: file /opt/sunstudio12.1/prod/bin/iropt
/opt/sunstudio12.1/prod/bin/iropt:      ELF 32-bit LSB executable 80386 Version 1 [FPU], dynamically linked, stripped
cheux321 @ /ist/dndev
[431]dndev: file /usr/lib/amd64/libdemangle.so.1
/usr/lib/amd64/libdemangle.so.1:        ELF 64-bit LSB dynamic lib AMD64 Version 1 [SSE CMOV], dynamically linked, not stripped, no debugging information available
I think their problem is that they are not able to override the 32bit libraries even after using the prescribed options. The "CC" binary (compiled in 32bit) is referring to 32bit libraries even if they specify the 64bit libraries.

Thanks
HG
# 13  
Old 03-09-2010
Wow. Talk about taking something really, really simple and going out of their way to make it harder than it has to be.

These guys are supposed to be smart enough to write C/C++ code? But they can't get a simple compiler suite to work for them? Despite the fact that thousands upon thousands of people have that very compiler suite work just fine for them every day of the year? And they all can use that compiler suite to produce 32- and 64-bit binaries without any problems?

How'd they get iropt to barf like that? Mess around with LD_LIBRARY_PATH? If they're going to mess around with linker environment variables, sit them down and have them read and heed the man page for ld.so.1.
# 14  
Old 03-09-2010
Hi,

Thanks for responding.You just wrote what i had in mind. Alas!I can't direct the same to my Dev team. This issue will get resolved only if i find a solution for it.

Thanks
HG
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

maintain 32bit and 64bit C code

Hi, I have a C code which builds and works fine on 32bit linux machine. Now i want to convert that code to build and run on 64 bit linux machine. I dont want to maintain two separate sources for 32 and 64 bit build. Same source should get build on 32 as well as 64 bit machine (when a... (2 Replies)
Discussion started by: bhushan123
2 Replies

2. Red Hat

Pthread problems, 32bit vs 64bit

I have an application which builds and executes without error on a 32bit implementation of Linux. When I transferred the code to a new project on a 64bit implementation, the code will build without error, but the pthread functions, such as pthread_attr_setschedparam() return an 'Invalid Argument'... (3 Replies)
Discussion started by: jpelletier116
3 Replies

3. Solaris

32bit / 64bit issue with x86 solaris

i have solaris 10 x86 64bit installed on my pc (dell 3100). i then decided to move my hard drive to another pc (dell 4600). I noticed that each time i boot up, the OS show as 32 bit (instead of 64bit) and i can't even get past this stage to the login page. when i moved it back to dell 3100 it... (13 Replies)
Discussion started by: seyiisq
13 Replies

4. Programming

How Can a Machine Reads a Compiler Since A Compiler is Written in Text! Not Binaries?

To make a programming language you need a compiler, so what was the first programming language and how was is created if you need the compiler first? The compiler itself is considered as a high language comparing to the machine! since the compiler is not created in 1's and 0's... Eventhough i... (12 Replies)
Discussion started by: f.ben.isaac
12 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 version v.s. 32bit/64bit

Where can I get a list that maps the each Linux version to corresponding 32/64 bits model? e.g. OS -> Model (ILP32, LP64, ...) RHLE3 -> ? RHLE4 -> ? RHLE5 -> ? ... It would be better if there is such a list that contains most of current UNIX OS versions. ... (1 Reply)
Discussion started by: princelinux
1 Replies

7. 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

8. Solaris

CC 5.5 compiler flag to issue 64bit porting warnings on sparc-solaris

Hi, We are porting our application from 32bit to 64bit. We tried -xarch=v9, -xarc=v9a and -xport64=full options so that compiler to issue 64bit porting warnings. But we are not getting any porting warninings WE are using CC 5.5 compiler on sparc-solaris m/c. Please tell us some powerful... (0 Replies)
Discussion started by: shobhah
0 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