Project

General

Profile

Bug #9436

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

Added by ngoto (Naohisa Goto) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
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

Related to Ruby trunk - Bug #7247: r37079以降Solaris10でthread_pthread.cがコンパイルエラーClosed2012-10-31
Related to Ruby trunk - Bug #8783: ruby 1.9/2.0 crash on exit on FreeBSD/powerpc64Closed2013-08-13

Associated revisions

Revision 6802a3f6
Added by nobu (Nobuyoshi Nakada) over 4 years ago

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. [Bug #9436]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 44675
Added by nobu (Nobuyoshi Nakada) over 4 years ago

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. [Bug #9436]

Revision 44675
Added by nobu (Nobuyoshi Nakada) over 4 years ago

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. [Bug #9436]

Revision 44675
Added by nobu (Nobuyoshi Nakada) over 4 years ago

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. [Bug #9436]

Revision 44675
Added by nobu (Nobuyoshi Nakada) over 4 years ago

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. [Bug #9436]

Revision 44675
Added by nobu (Nobuyoshi Nakada) over 4 years ago

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. [Bug #9436]

Revision 5bcb47db
Added by usa (Usaku NAKAMURA) over 4 years ago

merge revision(s) 44670,44671,44675: [Backport #8783]

thread_pthread.c: timer thread stack size

* thread_pthread.c (rb_thread_create_timer_thread): define the stack

size for timer thread at compile time.
* thread_pthread.c (rb_thread_create_timer_thread): expand timer
thread stack size to get rid of segfault on FreeBSD/powerpc64.
based on the patch by Steve Wills at .
[Bug #8783]

* 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.   [Bug #9436]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@44940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision b8cab3fc
Added by nagachika (Tomoyuki Chikanaga) over 4 years ago

merge revision(s) r44670,r44671,r44673,r44675: [Backport #8783]

thread_pthread.c: timer thread stack size

* thread_pthread.c (rb_thread_create_timer_thread): define the stack

size for timer thread at compile time.
* thread_pthread.c (rb_thread_create_timer_thread): expand timer
thread stack size to get rid of segfault on FreeBSD/powerpc64.
based on the patch by Steve Wills at .
[Bug #8783]

* 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.   [Bug #9436]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 64e6dd62
Added by naruse (Yui NARUSE) about 4 years ago

merge revision(s) 44670,44671,44673,44675: [Backport #8783]

thread_pthread.c: timer thread stack size

* thread_pthread.c (rb_thread_create_timer_thread): define the stack

size for timer thread at compile time.
* thread_pthread.c (rb_thread_create_timer_thread): expand timer
thread stack size to get rid of segfault on FreeBSD/powerpc64.
based on the patch by Steve Wills at .
[Bug #8783]

* 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.   [Bug #9436]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

History

#1 [ruby-dev:47913] Updated by ngoto (Naohisa Goto) over 4 years ago

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

#2 [ruby-dev:47914] Updated by nobu (Nobuyoshi Nakada) over 4 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. [Bug #9436]

#3 [ruby-dev:47957] Updated by usa (Usaku NAKAMURA) over 4 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

#4 [ruby-dev:47967] Updated by usa (Usaku NAKAMURA) over 4 years ago

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

Also available in: Atom PDF