From: ngotogenome@... Date: 2014-01-21T08:53:50+00:00 Subject: [ruby-dev:47911] [ruby-trunk - Bug #9436] [Open] r44670以降Solaris10でthread_pthread.cがコンパイルエラー Issue #9436 has been reported by Naohisa Goto. ---------------------------------------- Bug #9436: r44670以降Solaris10でthread_pthread.cがコンパイルエラー https://bugs.ruby-lang.org/issues/9436 * Author: Naohisa Goto * Status: Open * Priority: Normal * Assignee: * Category: * Target version: * ruby -v: ruby 2.2.0dev (2014-01-21) [sparc64-solaris2.10] * Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- r44670以降、Solaris10のccでは以下のエラーが出て失敗します。(以下はr44673にて確認) cc -xO1 -xtarget=sparc64viiplus -m64 -DRUBY_EXPORT -I/usr/local/64/lib/libffi-3.0.10/include -I/usr/local/64/include -I. -I.ext/include/sparc64-solaris2.10 -I./include -I. -o thread.o -c thread.c "thread_pthread.c", line 1488: missing operator cc: acomp failed for thread.c make: *** [thread.o] Error 2 thread_pthread.cの1488行め付近は以下のようになっています。 # if TIMER_THREAD_STACK_MIN_SIZE < PTHREAD_STACK_MIN # undef TIMER_THREAD_STACK_MIN_SIZE # define TIMER_THREAD_STACK_MIN_SIZE PTHREAD_STACK_MIN # endif Solaris10では、PTHREAD_STACK_MIN は /usr/include/limits.h にて以下のように定義されています。 #define PTHREAD_STACK_MIN ((size_t)_sysconf(_SC_THREAD_STACK_MIN)) つまり、PTHREAD_STACK_MINの実体は関数であり、定数ではありません。 このため、#if では使うことができずコンパイルエラーになります。 -- http://bugs.ruby-lang.org/