Installing CC compiler on Sun Solaris

Posted on 2013-10-11
Medium Priority
Last Modified: 2013-10-12
Hi there,

I am installing DBI for perl on SUN Solaris 11, and getting an error "CC not found".

Can I know if the cc installed or not?

Is there is any way that I can install it without downloading all SolarisStudio?
Question by:Meaq99
  • 3
  • 3
LVL 81

Expert Comment

ID: 39567093
Do youhave any compiling tools?

Using environment variable CC=gcc may solve the issue.
pkginfo | grep 'C '

The DVD may include development packages that include a C compiler.

You can download gcc from gnu.org and build it.
Sunfreeware.org has packages.

If you get the source, there are instructions on how to build/compile gcc.

Author Comment

ID: 39567604
Thanks  arnold for your comment, however as I know the DBI should be build with the same compiler which has been used for the Perl itself, and since the make test error says "CC not found" that means it has to be build with CC only.

Correct me if I am wrong.
LVL 81

Expert Comment

ID: 39567661
I do not believe the Modules have to be compiled using the same compiler, they just need to be compiled on the platform where they will be used.

run perl --version

It should tell you all you need to know about the compiler.

Sunfreeware.org is a resource where you can get compiled packages.
Your solaris 11 DVD may include additional development packages which would include a compiler.

CC is often referenced as the compiler (environment variable).

See if you have gcc on the system already(but it doe not seem like it CC,gcc, and g++ are part of the GNU C compiler package), and if you do, prior to running perl Makefile.pl
Do CC=gcc
And that should eliminate the issue.
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.


Author Comment

ID: 39567782
I have downloaded the SolarisStudio and included its path, the compiler works, but still I got this error when I make test:

ld: fatal: file /orabin/app/oracle/product/11.2.0/db_1/lib//libclntsh.so: wrong ELF class: ELFCLASS64
ld: fatal: file processing errors. No output written to blib/arch/auto/DBD/Oracle/Oracle.so
*** Error code 2
make: Fatal error: Command failed for target `blib/arch/auto/DBD/Oracle/Oracle.so'
LVL 81

Accepted Solution

arnold earned 2000 total points
ID: 39567982
It seems your compilation of DBD::Oracle starts as 32bit while the oracle lib you have is 64.
An option is to get/install/add the 32bit libs or make sure your parameters only point to 64bit.

See if the below help resolve your issue, the first points to oracle 10 DB, just see if the suggested solutions help resolve your issue.


This is a cpan reference that point to a 32 bit lib,

Author Closing Comment

ID: 39568919
Thanks arnold, I have downloaded the 32bit oracle client and it went ok.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question