# Building 1.8.6-p36 with Sun Studio 12 compiler

**URL:** <https://www.ruby-forum.com/t/building-1-8-6-p36-with-sun-studio-12-compiler/106861>\
**Category:** Ruby\
**Created:** [June 14, 2007, 7:31pm UTC](https://www.ruby-forum.com/t/building-1-8-6-p36-with-sun-studio-12-compiler/106861 "2007-06-14T19:31:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [June 14, 2007, 7:31pm UTC](https://www.ruby-forum.com/t/building-1-8-6-p36-with-sun-studio-12-compiler/106861/1 "2007-06-14T19:31:11Z")

</div>

All -  
I am trying to build 1.8.6-p36 (from the .tar.bz2 source) on  
Solaris Developer Express using the Sun Studio 12 compiler. If I try  
to configure it with “–enable-pthread” it fails to build with  
errors in eval.c:

merlin:/home/…/ruby-1.8.6-p36 97\> make  
/opt/SUNWspro/bin/cc -g -W0,-xgnuasm -xO3 -xbuiltin=%all  
-xinline=%auto -xprefetch=auto -xdepend -xtarget=pentium4  
-I/usr/sfw/include -I/usr/local/include -DRUBY\_EXPORT -I. -I. -c  
eval.c  
“eval.c”, line 4482: warning: statement not reached  
“eval.c”, line 4517: warning: statement not reached  
“eval.c”, line 4644: warning: statement not reached  
“eval.c”, line 4702: warning: statement not reached  
“eval.c”, line 5151: warning: statement not reached  
“eval.c”, line 5614: warning: statement not reached  
“eval.c”, line 5740: warning: statement not reached  
“eval.c”, line 6251: identifier redeclared: backtrace  
current : static function() returning unsigned long  
previous: function(pointer to pointer to void, int)  
returning int : “/usr/include/execinfo.h”, line 41  
“eval.c”, line 8612: warning: loop not entered at top  
“eval.c”, line 12004: warning: statement not reached  
“eval.c”, line 12446: warning: statement not reached  
“eval.c”, line 12818: warning: statement not reached  
cc: acomp failed for eval.c  
gmake: \*\*\* [eval.o] Error 2

If I configure it without “–enable-pthread”, I get quite a few  
warnings, mostly of this type:

line xxxx: warning: statement not reached

and then some “ld” errors in building dl.c:

/opt/SUNWspro/bin/cc -I. -I…/… -I…/…/. -I…/…/./ext/dl  
-DHAVE\_DLFCN\_H -DHAV  
E\_DLOPEN -DHAVE\_DLCLOSE -DHAVE\_DLSYM -DHAVE\_DLERROR -I. -KPIC -g  
-W0,-xgnuasm -  
xO3 -xbuiltin=%all -xinline=%auto -xprefetch=auto -xdepend  
-xtarget=pentium4 -I/  
usr/sfw/include -I/usr/local/include -c dl.c  
“cbtable.func”, line 1: warning: assignment type mismatch:  
pointer to void “=” pointer to function(long, long, long, long,  
long, long,  
long, long, long, long, long, long, long, long, long) returning void  
“cbtable.func”, line 2: warning: assignment type mismatch:  
pointer to void “=” pointer to function(long, long, long, long,  
long, long,  
long, long, long, long, long, long, long, long, long) returning void  
“cbtable.func”, line 3: warning: assignment type mismatch:  
pointer to void “=” pointer to function(long, long, long, long,  
long, long,  
long, long, long, long, long, long, long, long, long) returning void  
“cbtable.func”, line 4: warning: assignment type mismatch:  
pointer to void “=” pointer to function(long, long, long, long,  
long, long,  
long, long, long, long, long, long, long, long, long) returning void  
“cbtable.func”, line 5: warning: assignment type mismatch:  
pointer to void “=” pointer to function(long, long, long, long,  
long, long,  
long, long, long, long, long, long, long, long, long) returning void

The build completes successfully, and “make check” gives these errors:

Finished in 95.708688 seconds.

1. Error:  
test\_AES(OpenSSL::TestCipher):  
RuntimeError: unsupported cipher algorithm (AES-256-ECB)  
/home/markea/src/ruby-1.8.6/.ext/common/openssl/cipher.rb:38:in  
`initialize' /home/markea/src/ruby-1.8.6/.ext/common/openssl/cipher.rb:38:in`initialize’  
./test/openssl/test\_cipher.rb:81:in `new' ./test/openssl/test_cipher.rb:81:in`test\_AES’  
./test/openssl/test\_cipher.rb:80:in `each' ./test/openssl/test_cipher.rb:80:in`test\_AES’

2. Error:  
test\_eof\_0(OpenSSL::TestEOF1):  
OpenSSL::SSL::SSLError: cipher or hash unavailable  
./test/openssl/test\_pair.rb:32:in `connect' ./test/openssl/test_pair.rb:32:in`client’  
./test/openssl/test\_pair.rb:45:in `ssl_pair' ./test/openssl/test_pair.rb:65:in`open\_file’  
/home/markea/src/ruby-1.8.6/test/ruby/ut\_eof.rb:5:in `test\_eof\_0’

3. Error:  
test\_eof\_1(OpenSSL::TestEOF1):  
OpenSSL::SSL::SSLError: cipher or hash unavailable  
./test/openssl/test\_pair.rb:32:in `connect' ./test/openssl/test_pair.rb:32:in`client’  
./test/openssl/test\_pair.rb:45:in `ssl_pair' ./test/openssl/test_pair.rb:65:in`open\_file’  
/home/markea/src/ruby-1.8.6/test/ruby/ut\_eof.rb:40:in  
`test\_eof\_1’

4. Error:  
test\_eof\_2(OpenSSL::TestEOF1):  
OpenSSL::SSL::SSLError: cipher or hash unavailable  
./test/openssl/test\_pair.rb:32:in `connect' ./test/openssl/test_pair.rb:32:in`client’  
./test/openssl/test\_pair.rb:45:in `ssl_pair' ./test/openssl/test_pair.rb:65:in`open\_file’  
/home/markea/src/ruby-1.8.6/test/ruby/ut\_eof.rb:87:in  
`test\_eof\_2’

5. Error:  
test\_eof\_3(OpenSSL::TestEOF1):  
OpenSSL::SSL::SSLError: cipher or hash unavailable  
./test/openssl/test\_pair.rb:32:in `connect' ./test/openssl/test_pair.rb:32:in`client’  
./test/openssl/test\_pair.rb:45:in `ssl_pair' ./test/openssl/test_pair.rb:65:in`open\_file’  
/home/markea/src/ruby-1.8.6/test/ruby/ut\_eof.rb:94:in  
`test\_eof\_3’

6. Error:  
test\_eof\_0(OpenSSL::TestEOF2):  
OpenSSL::SSL::SSLError: cipher or hash unavailable  
./test/openssl/test\_pair.rb:32:in `connect' ./test/openssl/test_pair.rb:32:in`client’  
./test/openssl/test\_pair.rb:45:in `ssl_pair' ./test/openssl/test_pair.rb:76:in`open\_file’  
/home/markea/src/ruby-1.8.6/test/ruby/ut\_eof.rb:5:in `test\_eof\_0’

7. Error:  
test\_eof\_1(OpenSSL::TestEOF2):  
OpenSSL::SSL::SSLError: cipher or hash unavailable  
./test/openssl/test\_pair.rb:32:in `connect' ./test/openssl/test_pair.rb:32:in`client’  
./test/openssl/test\_pair.rb:45:in `ssl_pair' ./test/openssl/test_pair.rb:76:in`open\_file’  
/home/markea/src/ruby-1.8.6/test/ruby/ut\_eof.rb:40:in  
`test\_eof\_1’

8. Error:  
test\_eof\_2(OpenSSL::TestEOF2):  
OpenSSL::SSL::SSLError: cipher or hash unavailable  
./test/openssl/test\_pair.rb:32:in `connect' ./test/openssl/test_pair.rb:32:in`client’  
./test/openssl/test\_pair.rb:45:in `ssl_pair' ./test/openssl/test_pair.rb:76:in`open\_file’  
/home/markea/src/ruby-1.8.6/test/ruby/ut\_eof.rb:87:in  
`test\_eof\_2’

9. Error:  
test\_eof\_3(OpenSSL::TestEOF2):  
OpenSSL::SSL::SSLError: cipher or hash unavailable  
./test/openssl/test\_pair.rb:32:in `connect' ./test/openssl/test_pair.rb:32:in`client’  
./test/openssl/test\_pair.rb:45:in `ssl_pair' ./test/openssl/test_pair.rb:76:in`open\_file’  
/home/markea/src/ruby-1.8.6/test/ruby/ut\_eof.rb:94:in  
`test\_eof\_3’

10. Error:  
test\_getc(OpenSSL::TestPair):  
OpenSSL::SSL::SSLError: cipher or hash unavailable  
./test/openssl/test\_pair.rb:32:in `connect' ./test/openssl/test_pair.rb:32:in`client’  
./test/openssl/test\_pair.rb:45:in `ssl_pair' ./test/openssl/test_pair.rb:86:in`test\_getc’

11. Error:  
test\_puts\_empty(OpenSSL::TestPair):  
OpenSSL::SSL::SSLError: cipher or hash unavailable  
./test/openssl/test\_pair.rb:32:in `connect' ./test/openssl/test_pair.rb:32:in`client’  
./test/openssl/test\_pair.rb:45:in `ssl_pair' ./test/openssl/test_pair.rb:135:in`test\_puts\_empty’

12. Error:  
test\_puts\_meta(OpenSSL::TestPair):  
OpenSSL::SSL::SSLError: cipher or hash unavailable  
./test/openssl/test\_pair.rb:32:in `connect' ./test/openssl/test_pair.rb:32:in`client’  
./test/openssl/test\_pair.rb:45:in `ssl_pair' ./test/openssl/test_pair.rb:121:in`test\_puts\_meta’

13. Error:  
test\_readall(OpenSSL::TestPair):  
OpenSSL::SSL::SSLError: cipher or hash unavailable  
./test/openssl/test\_pair.rb:32:in `connect' ./test/openssl/test_pair.rb:32:in`client’  
./test/openssl/test\_pair.rb:45:in `ssl_pair' ./test/openssl/test_pair.rb:107:in`test\_readall’

14. Error:  
test\_readline(OpenSSL::TestPair):  
OpenSSL::SSL::SSLError: cipher or hash unavailable  
./test/openssl/test\_pair.rb:32:in `connect' ./test/openssl/test_pair.rb:32:in`client’  
./test/openssl/test\_pair.rb:45:in `ssl_pair' ./test/openssl/test_pair.rb:114:in`test\_readline’

15. Error:  
test\_readpartial(OpenSSL::TestPair):  
OpenSSL::SSL::SSLError: cipher or hash unavailable  
./test/openssl/test\_pair.rb:32:in `connect' ./test/openssl/test_pair.rb:32:in`client’  
./test/openssl/test\_pair.rb:45:in `ssl_pair' ./test/openssl/test_pair.rb:93:in`test\_readpartial’

16. Failure:  
test\_cgi(TestWEBrickCGI)  
[./test/webrick/test\_cgi.rb:27:in `test_cgi' /home/markea/src/ruby-1.8.6/lib/net/http.rb:1050:in`request’  
/home/markea/src/ruby-1.8.6/lib/net/http.rb:2133:in  
`reading_body' /home/markea/src/ruby-1.8.6/lib/net/http.rb:1049:in`request’  
/home/markea/src/ruby-1.8.6/lib/net/http.rb:1034:in `request' /home/markea/src/ruby-1.8.6/lib/net/http.rb:543:in`start’  
/home/markea/src/ruby-1.8.6/lib/net/http.rb:1032:in `request' ./test/webrick/test_cgi.rb:27:in`test\_cgi’  
./test/webrick/utils.rb:26:in `call' ./test/webrick/utils.rb:26:in`start\_server’  
./test/webrick/utils.rb:34:in `start_httpserver' ./test/webrick/test_cgi.rb:24:in`test\_cgi’]:  
\<"/webrick.cgi"\> expected but was  
\<"\n\n

In ternal Server Error\n \n 
# Internal Server Error
\n Premature end of script headers: /home/markea/src/ruby-1.8.6/test/webrick/ webrick.cgi\n 
* * *
\n \n WEBrick/1.3.1 (Ruby/1.8.6/2007-03-13) OpenSSL/0.9.8a at\n 127.0.0.1:63178\n \n \n\n"\> .

1611 tests, 16442 assertions, 1 failures, 15 errors  
gmake: \*\*\* [test-all] Error 1

It does seem to work (I can run both ruby and irb, and existing  
Rails apps seem to work fine) but I’d really like to understand why  
I get so many errors.

Any hints/help would be appreciated.

Mark Almeida

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [June 17, 2007, 10:33am UTC](https://www.ruby-forum.com/t/building-1-8-6-p36-with-sun-studio-12-compiler/106861/2 "2007-06-17T10:33:44Z")

</div>

Hi,

At Fri, 15 Jun 2007 02:30:08 +0900,  
removed\_email\_address@domain.invalid wrote in [ruby-talk:255631]:

> “eval.c”, line 6251: identifier redeclared: backtrace  
> current : static function() returning unsigned long  
> previous: function(pointer to pointer to void, int)  
> returning int : “/usr/include/execinfo.h”, line 41

There are also {get,set,make}\_backtrace functions, they have no  
problem?

> “eval.c”, line 8612: warning: loop not entered at top

> “cbtable.func”, line 1: warning: assignment type mismatch:  
> pointer to void “=” pointer to function(long, long, long, long,  
> long, long,  
> long, long, long, long, long, long, long, long, long) returning void

Can’t you show the head of cbtable.func file?

> The build completes successfully, and “make check” gives these errors:

I know little about OpenSSL.
