Forum: Ruby-core [ruby-trunk - Bug #7470][Open] ruby 1.9.3-p327 compile failure in siphash.c on Solaris because of en

76171cf641e60931c86cef8234accea3?d=identicon&s=25 Tim Mooney (enchanter)
on 2012-11-29 23:58
(Received via mailing list)
Issue #7470 has been reported by enchanter (Tim Mooney).

----------------------------------------
Bug #7470: ruby 1.9.3-p327 compile failure in siphash.c on Solaris
because of endian.h
https://bugs.ruby-lang.org/issues/7470

Author: enchanter (Tim Mooney)
Status: Open
Priority: Normal
Assignee:
Category: build
Target version: 1.9.3
ruby -v: ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-solaris2.10]


I had previously built ruby 1.9.3-p194 on x86_64-sun-solaris2.10 with
the no-cost Oracle WorkShop compilers:

$ cc -V
cc: Sun C 5.12 SunOS_i386 2011/11/16

However, when I attempt to build ruby-1.9.3-p327, I get a compilation
failure in siphash.c, because it's including a header file (endian.h)
that appears to be specific to Linux:

cc -m64 -Xa -xc99=all -xO0 -g -xs -xstrconst -mt -xtarget=native
-xarch=native -I/local/include -I/local/gnu/include
-I/local/openssl/include -m64 -DRUBY_EXPORT -I/local/include
-I/local/gnu/include -I/local/openssl/include   -I.
-I.ext/include/x86_64-solaris2.10 -I./include -I. -o random.o -c
random.c
"siphash.c", line 11: cannot find include file: <endian.h>
cc: acomp failed for random.c
gmake: *** [random.o] Error 2


Solaris doesn't include that header, instead it uses sys/byteorder.h.

The attached patch appears to fix the issue for me.
9d2f78236e45a335301ba1195026105d?d=identicon&s=25 shyouhei (Shyouhei Urabe) (Guest)
on 2012-11-30 04:59
(Received via mailing list)
Issue #7470 has been updated by shyouhei (Shyouhei Urabe).

Status changed from Open to Assigned
Assignee set to nobu (Nobuyoshi Nakada)

Nobu?  Can you look at it?
----------------------------------------
Bug #7470: ruby 1.9.3-p327 compile failure in siphash.c on Solaris
because of endian.h
https://bugs.ruby-lang.org/issues/7470#change-34188

Author: enchanter (Tim Mooney)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: build
Target version: 1.9.3
ruby -v: ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-solaris2.10]


I had previously built ruby 1.9.3-p194 on x86_64-sun-solaris2.10 with
the no-cost Oracle WorkShop compilers:

$ cc -V
cc: Sun C 5.12 SunOS_i386 2011/11/16

However, when I attempt to build ruby-1.9.3-p327, I get a compilation
failure in siphash.c, because it's including a header file (endian.h)
that appears to be specific to Linux:

cc -m64 -Xa -xc99=all -xO0 -g -xs -xstrconst -mt -xtarget=native
-xarch=native -I/local/include -I/local/gnu/include
-I/local/openssl/include -m64 -DRUBY_EXPORT -I/local/include
-I/local/gnu/include -I/local/openssl/include   -I.
-I.ext/include/x86_64-solaris2.10 -I./include -I. -o random.o -c
random.c
"siphash.c", line 11: cannot find include file: <endian.h>
cc: acomp failed for random.c
gmake: *** [random.o] Error 2


Solaris doesn't include that header, instead it uses sys/byteorder.h.

The attached patch appears to fix the issue for me.
8cbb39dadafaf2287a83a13ee4981ec9?d=identicon&s=25 usa (Usaku NAKAMURA) (Guest)
on 2012-11-30 09:57
(Received via mailing list)
Issue #7470 has been updated by usa (Usaku NAKAMURA).

Status changed from Assigned to Closed

It's already fixed on the repository, but not released yet.
Check out r37593 or later from ruby_1_9_3 branch, or simply
patch the revision by hand, please.

IMO the simplest way is downloading random.c of the revision
and replace the file in p327 package.

Resource:
http://svn.ruby-lang.org/repos/ruby/branches/ruby_...
----------------------------------------
Backport #7470: ruby 1.9.3-p327 compile failure in siphash.c on Solaris
because of endian.h
https://bugs.ruby-lang.org/issues/7470#change-34203

Author: enchanter (Tim Mooney)
Status: Closed
Priority: Normal
Assignee: usa (Usaku NAKAMURA)
Category:
Target version:


I had previously built ruby 1.9.3-p194 on x86_64-sun-solaris2.10 with
the no-cost Oracle WorkShop compilers:

$ cc -V
cc: Sun C 5.12 SunOS_i386 2011/11/16

However, when I attempt to build ruby-1.9.3-p327, I get a compilation
failure in siphash.c, because it's including a header file (endian.h)
that appears to be specific to Linux:

cc -m64 -Xa -xc99=all -xO0 -g -xs -xstrconst -mt -xtarget=native
-xarch=native -I/local/include -I/local/gnu/include
-I/local/openssl/include -m64 -DRUBY_EXPORT -I/local/include
-I/local/gnu/include -I/local/openssl/include   -I.
-I.ext/include/x86_64-solaris2.10 -I./include -I. -o random.o -c
random.c
"siphash.c", line 11: cannot find include file: <endian.h>
cc: acomp failed for random.c
gmake: *** [random.o] Error 2


Solaris doesn't include that header, instead it uses sys/byteorder.h.

The attached patch appears to fix the issue for me.
This topic is locked and can not be replied to.