Project

General

Profile

Actions

Bug #9436

closed

r44670以降Solaris10でthread_pthread.cがコンパイルエラー

Added by ngoto (Naohisa Goto) almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.0dev (2014-01-21) [sparc64-solaris2.10]
[ruby-dev:47911]

Description

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 では使うことができずコンパイルエラーになります。


Related issues 2 (0 open2 closed)

Related to Ruby master - Bug #7247: r37079以降Solaris10でthread_pthread.cがコンパイルエラーClosed10/31/2012Actions
Related to Ruby master - Bug #8783: ruby 1.9/2.0 crash on exit on FreeBSD/powerpc64Closedbsd08/13/2013Actions

Updated by ngoto (Naohisa Goto) almost 11 years ago

  • Related to Bug #7247: r37079以降Solaris10でthread_pthread.cがコンパイルエラー added

Updated by nobu (Nobuyoshi Nakada) almost 11 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r44675.


thread_pthread.c: fix for dynamic PTHREAD_STACK_MIN

  • thread_pthread.c (rb_thread_create_timer_thread): fix for platforms
    where PTHREAD_STACK_MIN is a dynamic value and not a compile-time
    constant. [ruby-dev:47911] [Bug #9436]

Updated by usa (Usaku NAKAMURA) almost 11 years ago

  • Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN to 1.9.3: DONTNEED, 2.0.0: DONTNEED, 2.1: DONTNEED

Updated by usa (Usaku NAKAMURA) almost 11 years ago

  • Related to Bug #8783: ruby 1.9/2.0 crash on exit on FreeBSD/powerpc64 added
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0