1

I am trying to compile node.js on openindiana, below is my Environment, Even I set gcc path in .profile It keeps saying No acceptable C compiler found!

export PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/gcc/4.4.4/bin:/usr/gnu/bin:$PATH
export PAGER="/usr/bin/less -ins"
export CC=/opt/gcc/4.4.4/bin/gcc
export cc=/opt/gcc/4.4.4/bin/gcc

run

$ CC=gcc ./configure --with-dtrace --dest-cpu=x64 --prefix=~/local

or

$ ./configure --with-dtrace --dest-cpu=x64 --prefix=~/local

both of them gives following error Node.js configure error: No acceptable C compiler found!

    Please make sure you have a C compiler installed on your system and/or
    consider adjusting the CC environment variable if you installed
    it in a non-standard prefix.

nick@www:~/node-latest-install$ echo $PATH

/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/gcc/4.4.4/bin/gcc

nick@www:~/node-latest-install$ which gcc

/usr/bin/gcc

nick@www:~/node-latest-install$ which cc

which: no cc in (/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/gcc/4.4.4/bin/gcc)

nick@www:~/node-latest-install$ gcc -v

Using built-in specs. Target: i386-pc-solaris2.11 Configured with: /home/jt/OI-151A-STABLE/151A-PRESTABLE6/newbuilds/oi-build/components/illumos-gcc/richlowe-gcc-f268959/configure --prefix=/opt/gcc/4.4.4 --with-gnu-as --with-as=/usr/sfw/bin/gas --with-ld=/usr/bin/ld --without-gnu-ld --enable-languages=c,c++,objc --enable-shared --with-mpfr-include=/usr/include/mpfr --with-gmp-include=/usr/include/gmp Thread model: posix gcc version 4.4.4 (GCC)

nickleefly
  • 3,733
  • 1
  • 29
  • 31
  • Did you check `config.log` for the detailed error messages that show the commands it tried to run and what errors it got from them? – alanc Aug 09 '13 at 18:32
  • @alanc I didnt find a `config.log`, my current `.profile` is in [THIS GIST](https://gist.github.com/nickleefly/65f78c41772f23894a31) could you take a look what is wrong there? – nickleefly Aug 12 '13 at 05:07

2 Answers2

1

if you specify CC variable, make it absolute path to gcc: CC=/opt/gcc/4.4.4/bin/gcc. But if compiler is already in PATH, specifying CC shouldn't be necessary.

dmilith
  • 13
  • 2
0

This may sound like a stupid answer but have you tried removing it and re-installing it from package manager. GCC that is

Also when did the problem start occurring? You could use beadm to roll back the OS to the last update or to when you created a 'Restore Point' so to speak. Check it out, very useful thing to use before running installs.