Comments
-
Greg Hurrell
My best guess here is that you're using a fairly old Ruby (pre-1.9); is that right?
I think it was around 1.9 that Ruby started incorporating pthreads by default (in the move from green threads to real threads, albeit with an enormous GIL that prevents any real concurrency).
-
Greg Hurrell
Likely related:
-
Greg Hurrell
Merged bug #2153 into this one.
-
Greg Hurrell
I think I was doing it wrong with the
have_header
call.have_library
probably does what we want:diff --git a/ruby/command-t/extconf.rb b/ruby/command-t/extconf.rb index eedeae0..433deeb 100644 --- a/ruby/command-t/extconf.rb +++ b/ruby/command-t/extconf.rb @@ -36,8 +36,10 @@ def header(item) header('stdlib.h') header('string.h') -# optional headers -have_header('pthread.h') # sets HAVE_PTHREAD_H if found +# optional +if RbConfig::CONFIG['THREAD_MODEL'] == 'pthread' + have_library('pthread', 'pthread_create') # sets HAVE_PTHREAD_H if found +end RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
See: http://ruby-doc.org/stdlib-2.1.0/libdoc/mkmf/rdoc/MakeMakefile.html#method-i-have_library
-
Greg Hurrell
I believe this has been fixed for a while now (since commit 069be54d), so marking as closed.
-
Greg Hurrell
Status changed:
- From: new
- To: closed
Add a comment
Comments are now closed for this issue.