[#80974] [Ruby trunk Feature#13517] [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit — ko1@...
Issue #13517 has been updated by ko1 (Koichi Sasada).
4 messages
2017/05/02
[#81024] Re: [Ruby trunk Feature#13517] [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit
— SASADA Koichi <ko1@...>
2017/05/07
sorry for late response.
[#80996] [Ruby trunk Feature#13544] Allow loading an ISeqs sequence directly from a C extension without requiring buffer is in an RVALUE — sam.saffron@...
Issue #13544 has been reported by sam.saffron (Sam Saffron).
3 messages
2017/05/04
[#81016] [Ruby trunk Bug#13526] Segmentation fault at 0x0055c2e58e8920 ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux] — s.wanabe@...
Issue #13526 has been updated by wanabe (_ wanabe).
3 messages
2017/05/07
[#81048] Re: [ruby-cvs:65788] normal:r58614 (trunk): rb_execution_context_t: move stack, stack_size and cfp from rb_thread_t — SASADA Koichi <ko1@...>
It causes compile error on raspi 3.
3 messages
2017/05/09
[#81201] Re: [ruby-cvs:65935] normal:r58761 (trunk): test/test_extilibs.rb: do not check the existence of fiddle — "U.NAKAMURA" <usa@...>
Hi, Eric
4 messages
2017/05/16
[#81202] Re: [ruby-cvs:65935] normal:r58761 (trunk): test/test_extilibs.rb: do not check the existence of fiddle
— Eric Wong <normalperson@...>
2017/05/16
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[#81427] Fwd: [ruby-changes:46809] normal:r58924 (trunk): test for IO.copy_stream CPU usage (r58534) — SASADA Koichi <ko1@...>
Hi,
6 messages
2017/05/28
[#81428] Re: Fwd: [ruby-changes:46809] normal:r58924 (trunk): test for IO.copy_stream CPU usage (r58534)
— Eric Wong <normalperson@...>
2017/05/28
SASADA Koichi <ko1@atdot.net> wrote:
[ruby-core:81458] [Ruby trunk Feature#13570] Using mkmf for ruby/spec C API specs
From:
Greg.mpls@...
Date:
2017-05-29 16:39:03 UTC
List:
ruby-core #81458
Issue #13570 has been updated by MSP-Greg (Greg L).
Benoit,
Sorry, never set this to 'watch'. I'll try a build with MinGW.
FWIW, I just got one of the spec c files to compile with only the following --
```ruby
require 'mkmf'
Dir.chdir('src/build-x86_64/spec/rubyspec/optional/capi/temp') { |d|
append_ldflags('-L /e/GitHub/ruby-loco/src/build-x86_64')
create_makefile("bignum_spec")
puts `make`
require_relative 'src/build-x86_64/spec/rubyspec/optional/capi/temp/bignum_spec.so'
puts CApiBignumSpecs.instance_methods(false)
}
```
Output:
```
E:\GitHub\ruby-loco>ruby make_test.rb
checking for whether -L /e/GitHub/ruby-loco/src/build-x86_64 is accepted as LDFLAGS... yes
creating Makefile
generating bignum_spec-x64-mingw32.def
compiling bignum_spec.c
linking shared-object bignum_spec.so
rb_big_pack_array
rb_big_pack_length
rb_big2dbl
rb_dbl2big
rb_big2ll
rb_big2long
rb_big2str
rb_big2ulong
rb_big_cmp
rb_big_pack
```
For the test, I only copied `bignum_spec.c` to the temp folder, along with `rubyspec.h`. I'm sure there's a setting to pick that up in `mkmf.rb`, along with several more that I'm probably missing. Again, I'm not a c type...
----------------------------------------
Feature #13570: Using mkmf for ruby/spec C API specs
https://bugs.ruby-lang.org/issues/13570#change-65161
* Author: Eregon (Benoit Daloze)
* Status: Assigned
* Priority: Normal
* Assignee: cruby-windows
* Target version:
----------------------------------------
Hello all,
I am thinking to use mkmf to compile the C API specs.
https://github.com/ruby/ruby/blob/trunk/spec/rubyspec/optional/capi/spec_helper.rb
is getting pretty complex and hard to maintain.
I have a few questions:
* Does mkmf works well on Windows?
* What is a good way to compile a single .c file with mkmf to a given library file in another directory?
I tried this but I am not sure it's correct:
~~~ ruby
def compile_extension(name)
objdir = object_path
ext = "#{name}_spec"
lib = "#{objdir}/#{ext}.#{RbConfig::CONFIG['DLEXT']}"
require 'mkmf' # TODO: probably best to use a subprocess to avoid polluting the namespace
Dir.chdir(objdir) do
$srcs = ["#{extension_path}/#{ext}.c"]
$objs = ["#{extension_path}/#{ext}.o"] # should probably be in objdir but that does not seem to work
create_makefile(ext)
system "make"
end
lib
end
~~~
Alternatively, we can copy the needed files to a temporary directory, build there and copy the shared library back.
It's a bit more work but not a big deal either.
---Files--------------------------------
spec_helper.rb (2.22 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>