[#46329] [ruby-trunk - Feature #7252][Assigned] version number of 2.0 release — "usa (Usaku NAKAMURA)" <usa@...>

26 messages 2012/11/01

[#46350] RubySpecメンテナ — Yukihiro Matsumoto <matz@...>

まつもと ゆきひろです

15 messages 2012/11/02
[#46352] Re: RubySpecメンテナ — Urabe Shyouhei <shyouhei@...> 2012/11/02

On 11/01/2012 07:43 PM, Yukihiro Matsumoto wrote:

[#46414] [ruby-trunk - Bug #7287][Open] please rename atomic.h which conflicts with /usr/include/atomic.h in Solaris10 — "ngoto (Naohisa Goto)" <ngotogenome@...>

10 messages 2012/11/06

[#46434] トラップハンドラで許されない操作はなにか — KOSAKI Motohiro <kosaki.motohiro@...>

GyRCPi46aiRHJDkbKEIKCltCdWcgIzcxMzRdIBskQiRyRDQkWSRGJCQkRj88SiUkSjtFTU1MZEJq

9 messages 2012/11/06

[#46440] [ruby-trunk - Bug #7300][Open] Hash#[] の挙動が 1.9.3 と異なっている — "hsbt (Hiroshi SHIBATA)" <shibata.hiroshi@...>

12 messages 2012/11/07

[#46477] Fwd: [ruby-changes:25559] shugo:r37616 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo): — SASADA Koichi <ko1@...>

refinement を導入するときの性能に対する excuse が「method cache に殆どあ

20 messages 2012/11/11
[#46480] Re: Fwd: [ruby-changes:25559] shugo:r37616 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo): — Shugo Maeda <shugo@...> 2012/11/11

前田です。

[#46488] Re: Fwd: [ruby-changes:25559] shugo:r37616 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo): — SASADA Koichi <ko1@...> 2012/11/12

 ささだです.

[#46491] Re: Fwd: [ruby-changes:25559] shugo:r37616 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo): — Shugo Maeda <shugo@...> 2012/11/12

前田です。

[#46493] Re: Fwd: [ruby-changes:25559] shugo:r37616 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo): — SASADA Koichi <ko1@...> 2012/11/12

 ささだです.

[#46495] Re: Fwd: [ruby-changes:25559] shugo:r37616 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo): — Shugo Maeda <shugo@...> 2012/11/12

前田です。

[#46497] Re: Fwd: [ruby-changes:25559] shugo:r37616 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo): — SASADA Koichi <ko1@...> 2012/11/12

(2012/11/12 18:20), Shugo Maeda wrote:

[#46501] Re: Fwd: [ruby-changes:25559] shugo:r37616 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo): — Shugo Maeda <shugo@...> 2012/11/12

前田です。

[#46513] Re: Fwd: [ruby-changes:25559] shugo:r37616 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo): — Nobuyoshi Nakada <nobu@...> 2012/11/14

なかだです。

[#46509] [ruby-trunk - Bug #7344][Open] gem pristine bigdecimal が失敗してしまう — "hsbt (Hiroshi SHIBATA)" <shibata.hiroshi@...>

31 messages 2012/11/13

[#46520] [ruby-trunk - Bug #7356][Open] ruby-2.0.0-preview1 で adlint-2.6.10 が性能劣化 — "yanoh (Yutaka Yanoh)" <yutaka@...>

11 messages 2012/11/15

[#46647] [ruby-trunk - Bug #7452][Assigned] Main thread is stopped after running finalizers if the main thread has a finalizer — "mrkn (Kenta Murata)" <muraken@...>

8 messages 2012/11/28

[ruby-dev:46429] [ruby-trunk - Bug #7287][Assigned] please rename atomic.h which conflicts with /usr/include/atomic.h in Solaris10

From: "mame (Yusuke Endoh)" <mame@...>
Date: 2012-11-06 12:41:53 UTC
List: ruby-dev #46429
Issue #7287 has been updated by mame (Yusuke Endoh).

Status changed from Open to Assigned
Assignee set to kosaki (Motohiro KOSAKI)

atomic.h を入れた kosaki さんに振ってしまいます。rb_atomic.h とかにするんですかね。
他は大丈夫ですかねえ。

$ ls *.h
addr2line.h  encdb.h        iseq.h    regint.h          timev.h           vm_core.h
atomic.h     eval_intern.h  method.h  regparse.h        transcode_data.h  vm_exec.h
constant.h   gc.h           node.h    revision.h        transdb.h         vm_insnhelper.h
debug.h      id.h           parse.h   thread_pthread.h  verconf.h         vm_opts.h
dln.h        internal.h     regenc.h  thread_win32.h    version.h

Boehm GC とか #include できなさそうですね。しないけど。

-- 
Yusuke Endoh <mame@tsg.ne.jp>
----------------------------------------
Bug #7287: please rename atomic.h which conflicts with /usr/include/atomic.h in Solaris10
https://bugs.ruby-lang.org/issues/7287#change-32499

Author: ngoto (Naohisa Goto)
Status: Assigned
Priority: Low
Assignee: kosaki (Motohiro KOSAKI)
Category: 
Target version: 
ruby -v: ruby 2.0.0dev (2012-11-05) [sparc64-solaris2.10]


Solaris10にて、ccやfccなどgcc以外を使用してコンパイルする際は、Rubyソース内の atomic.h にて、以下のようにシステムの atomic.h (/usr/include/atomic.h)を#includeしています。

 #elif defined(__sun)
 #include <atomic.h>

#include "atomic.h" とは違って #include <atomic.h> のように<>で囲んでいるので、システムのヘッダファイルが優先されるはず、と思っていたら、実はそうではなく、configureがコンパイル時のオプションとして "-I." を追加しているため、Rubyソース側の atomic.h しか読み込むことができず、どう頑張ってもシステムの /usr/include/atomic.h は読み込まれないことが判明しました。
このため、以下のように"implicit function declaration"の警告が出ます。(行番号はr36984の場合)

 "gc.c", line 1421: warning: implicit function declaration: atomic_swap_uint
 "gc.c", line 1902: warning: implicit function declaration: atomic_or_uint
 "gc.c", line 1952: warning: implicit function declaration: atomic_swap_ulong

幸い、Solaris10およびIllumos(旧OpenSolaris)の現時点の /usr/include/atomic.h は、実質的に 内部で #include <sys/atomic.h> しているだけでしたので、#include <sys/atomic.h> をRubyの atomic.h に追加することで問題を回避できました。ただし、Solaris10のmanページ(man atomic_ops)では atomic.h を使うように指示がされており、sys/atomic.h はカーネル内ドライバ専用らしいので、OSの将来のバージョン・リビジョンでは最悪コンパイルできなくなる可能性は残っています。根本的解決策としては、Ruby側のatomic.hのファイル名を違う名前に変更するしかないと思います。

ファイル名変更するときは、他のOSやライブラリとも被らないことが望ましいので若干調べたところ、
AIX 6.1 では、#include <sys/atomic_op.h> だそうです。
http://pic.dhe.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.kerneltechref%2Fdoc%2Fktechrf1%2Ffetch_and_add.htm

BoehmGC が要求する libatomic_ops には atomic_ops.h が含まれているようです。
https://github.com/ivmai/libatomic_ops/



-- 
http://bugs.ruby-lang.org/

In This Thread