Monday, January 7, 2013

Forcing Solaris C compiler to use GCC

The C compiler that come together with Solaris always cause me an error. When I compiling the open source program, I get this output:

/usr/ucb/cc: language optional software package not installed

I have no way to remove this error even though I have update the makefile to use gcc. One way I could though of is to cheat the make program to use gcc by using a soft-link pointing cc to gcc. How? Here is the steps:

  1. Backup a copy of /usr/ucb/cc to /usr/ucb/cc.bak
  2. Make a soft-link to gcc. ln -s /usr/local/bin/gcc /usr/ucb/cc
I am not sure whether this is a good one or bad one? But the result is it works!

No comments: