Prashant Srinivasan's Weblog
Compiling Ruby 1.8.6 on Solaris Nevada (or OpenSolaris, or Solaris Express ) using Sun Studio 12
One doesn't need to compile their Ruby from source on Solaris Nevada / OpenSolaris / Solaris Express (SX). It can be downloaded from Blastwave, Sunfreeware, or Cooltools.
sunfreeware.com happens to have the latest stable version(1.8.6) available.
bash-3.00# pwd
/export/ruby/ruby-1.8.6
bash-3.00# echo $PATH
/usr/ccs/bin:/opt/SUNWspro/bin:/usr/sbin:/usr/bin
bash-3.00# ./configure --without-gcc
checking build system type... i386-pc-solaris2.11
checking host system type... i386-pc-solaris2.11
checking target system type... i386-pc-solaris2.11
[ . . . lots more output snipped . . .]
configure: creating ./config.status
config.status: creating Makefile
bash-3.00# make
make: Warning: Illegal dependency list for target `.DEFAULT'
cc -g -DRUBY_EXPORT -I. -I. -c array.c
[ . . . lots more output snipped . . .]
cc -g -DRUBY_EXPORT -I. -I. -c ./missing/isinf.c
"./missing/isinf.c", line 32: syntax error before or at: __builtin_isinf
"./missing/isinf.c", line 33: warning: old-style declaration or incorrect type for: n
"./missing/isinf.c", line 33: syntax error before or at: double
"./missing/isinf.c", line 33: identifier redeclared: n
current : double
previous: int : "./missing/isinf.c", line 32
"./missing/isinf.c", line 35: syntax error before or at: return
cc: acomp failed for ./missing/isinf.c
*** Error code 2
make: Fatal error: Command failed for target `isinf.o'
bash-3.00#
The Makefile trys to compile ./missing/isinf.c and fails, thus aborting with a fatal build error. The good news is that this file is not needed, on Solaris, since isinf already exists as a part of libm - isinf(3M).
solaris*2.11) if test -z "$GCC"; then
ac_cv_func_isinf=yes
fi
LIBS="-lm $LIBS"
;;
(2) set your PATH,
make
config.status: creating Makefile
Makefile updated, restart.
*** Error code 1
The following command caused the error:
{ \
echo "all:; -@rm -f conftest.mk"; \
echo "conftest.mk: .force; @echo AUTO_REMAKE"; \
echo ".force:"; \
} > conftest.mk || exit 1; \
make -f conftest.mk | grep '^AUTO_REMAKE$' >/dev/null 2>&1 || \
{ echo "Makefile updated, restart."; exit 1; }
make: Fatal error: Command failed for target `Makefile'
(5) Run make again.
Posted at 03:55AM Aug 04, 2007 by prashant in Ruby | Comments[3]
Today's Page Hits: 62
| « December 2009 | ||||||
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | ||
| Today | ||||||
Posted by Dick Davies on August 04, 2007 at 07:50 AM PDT #
Posted by Dick Davies on August 04, 2007 at 08:44 AM PDT #
Posted by Prashant Srinivasan on August 06, 2007 at 10:10 AM PDT #