[#107008] [Ruby master Bug#18465] Make `IO#write` atomic. — "ioquatix (Samuel Williams)" <noreply@...>
Issue #18465 has been reported by ioquatix (Samuel Williams).
16 messages
2022/01/09
[#107150] [Ruby master Feature#18494] [RFC] ENV["RUBY_GC_..."]= changes GC parameters dynamically — "ko1 (Koichi Sasada)" <noreply@...>
Issue #18494 has been updated by ko1 (Koichi Sasada).
4 messages
2022/01/17
[#107170] Re: [Ruby master Feature#18494] [RFC] ENV["RUBY_GC_..."]= changes GC parameters dynamically
— Eric Wong <normalperson@...>
2022/01/17
> https://bugs.ruby-lang.org/issues/18494
[#107302] [Ruby master Bug#18553] Memory leak on compiling method call with kwargs — "ibylich (Ilya Bylich)" <noreply@...>
Issue #18553 has been reported by ibylich (Ilya Bylich).
4 messages
2022/01/27
[#107346] [Ruby master Misc#18557] DevMeeting-2022-02-17 — "mame (Yusuke Endoh)" <noreply@...>
Issue #18557 has been reported by mame (Yusuke Endoh).
18 messages
2022/01/29
[ruby-core:107335] [Ruby master Feature#18490] MakeMakefile.pkg_config should accept multiple options
From:
"matz (Yukihiro Matsumoto)" <noreply@...>
Date:
2022-01-29 03:01:11 UTC
List:
ruby-core #107335
Issue #18490 has been updated by matz (Yukihiro Matsumoto).
Assignee set to nobu (Nobuyoshi Nakada)
Accepted.
Matz.
----------------------------------------
Feature #18490: MakeMakefile.pkg_config should accept multiple options
https://bugs.ruby-lang.org/issues/18490#change-96233
* Author: mdalessio (Mike Dalessio)
* Status: Open
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
----------------------------------------
## Summary
When building static libraries it is sometimes necessary to pass multiple flags to `pkg-config`. Currently, `MakeMakefile.pkg_config` does not allow this.
A PR has been submitted at https://github.com/ruby/ruby/pull/5436
## Real-world example
One example of this is the `libmagic` library which is wrapped by the `ruby-magic` gem. The `ruby-magic` gem's `extconf.rb` needs to pass two options to pkg-config, so that the command executed should be:
```
pkg-config --libs --static libmagic
```
(Note that passing only `--libs` then only `--static` and merging the results is not sufficient; both must be passed on the same invocation.)
`MakeMakefile.pkg_config` only supports passing **one** option to `pkg-config` today.
## Historical context
Prior to Ruby 3.1.0, it was possible to work around this limitation by crafting an options string like so:
```
pkg_config('libmagic', 'libs --static')
```
The `option` parameter would be interpolated into the command template as variable `opt`:
```
"#{$PKGCONFIG} --#{opt} #{pkg}
```
resulting in the desired command string of `pkg-config --libs --static libmagic`.
However, with commit https://github.com/ruby/ruby/commit/dff8d12 this hack stopped working because the underlying ruby code is now:
```
xpopen([*envs, $PKGCONFIG, "--#{opt}", pkg], err:[:child, :out], &:read)
```
which results in `pkg-config` returning an error:
```
"Unknown option --libs --static\n"
```
--
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>