[#108176] [Ruby master Bug#18679] Encoding::UndefinedConversionError: "\xE2" from ASCII-8BIT to UTF-8 — "taf2 (Todd Fisher)" <noreply@...>

Issue #18679 has been reported by taf2 (Todd Fisher).

8 messages 2022/04/05

[#108185] [Ruby master Feature#18683] Allow to create hashes with a specific capacity. — "byroot (Jean Boussier)" <noreply@...>

Issue #18683 has been reported by byroot (Jean Boussier).

13 messages 2022/04/06

[#108198] [Ruby master Feature#18685] Enumerator.product: Cartesian product of enumerators — "knu (Akinori MUSHA)" <noreply@...>

Issue #18685 has been reported by knu (Akinori MUSHA).

8 messages 2022/04/08

[#108201] [Ruby master Misc#18687] [ANN] Upgraded bugs.ruby-lang.org to Redmine 5.0 — "hsbt (Hiroshi SHIBATA)" <noreply@...>

Issue #18687 has been reported by hsbt (Hiroshi SHIBATA).

10 messages 2022/04/09

[#108216] [Ruby master Misc#18691] An option to run `make rbconfig.rb` in a different directory — "jaruga (Jun Aruga)" <noreply@...>

Issue #18691 has been reported by jaruga (Jun Aruga).

14 messages 2022/04/12

[#108225] [Ruby master Misc#18726] CI Error on c99 and c2x — "znz (Kazuhiro NISHIYAMA)" <noreply@...>

Issue #18726 has been reported by znz (Kazuhiro NISHIYAMA).

11 messages 2022/04/14

[#108235] [Ruby master Bug#18729] Method#owner and UnboundMethod#owner are incorrect after using Module#public/protected/private — "Eregon (Benoit Daloze)" <noreply@...>

Issue #18729 has been reported by Eregon (Benoit Daloze).

28 messages 2022/04/14

[#108237] [Ruby master Bug#18730] Double `return` event handling with different tracepoints — "hurricup (Alexandr Evstigneev)" <noreply@...>

Issue #18730 has been reported by hurricup (Alexandr Evstigneev).

8 messages 2022/04/14

[#108294] [Ruby master Bug#18743] Enumerator#next / peek re-use each others stacktraces — sos4nt <noreply@...>

Issue #18743 has been reported by sos4nt (Stefan Schテシテ殕er).

20 messages 2022/04/19

[#108301] [Ruby master Bug#18744] I used Jazzy to generate the doc for my iOS library, but it showed me a bug — "zhaoxinqiang (marc steven)" <noreply@...>

Issue #18744 has been reported by zhaoxinqiang (marc steven).

8 messages 2022/04/20

[ruby-core:108429] [Ruby master Bug#18758] Ruby fails to build on M1 Mac when x86 Homebrew is installed

From: "hsbt (Hiroshi SHIBATA)" <noreply@...>
Date: 2022-04-28 06:27:23 UTC
List: ruby-core #108429
Issue #18758 has been updated by hsbt (Hiroshi SHIBATA).


@tenderlovemaking I fixed the upload feature now. see https://bugs.ruby-lang.org/issues/18687#note-10

----------------------------------------
Bug #18758: Ruby fails to build on M1 Mac when x86 Homebrew is installed
https://bugs.ruby-lang.org/issues/18758#change-97465

* Author: tenderlovemaking (Aaron Patterson)
* Status: Open
* Priority: Normal
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
If you install x86 homebrew on an M1 mac, then install libyaml in the x86 version of homebrew, Ruby will fail to build on ARM.

Steps to reproduce:

1. Install x86 homebrew: `$ arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"`
2. Install x86 libyaml: `$ arch -x86_64 /usr/local/bin/brew install libyaml`
3. Configure and compile Ruby with ARM architecture

I expected Ruby to compile, but Psych fails with the following output:

```
/Users/aaron/git/ruby/tool/extlibs.rb:6:in `require': cannot load such file -- digest (LoadError)
	from /Users/aaron/git/ruby/tool/extlibs.rb:6:in `<top (required)>'
	from /Users/aaron/git/ruby/ext/psych/extconf.rb:24:in `require_relative'
	from /Users/aaron/git/ruby/ext/psych/extconf.rb:24:in `<top (required)>'
	from ./ext/extmk.rb:217:in `load'
	from ./ext/extmk.rb:217:in `block in extmake'
	from /Users/aaron/git/ruby/lib/mkmf.rb:324:in `open'
	from ./ext/extmk.rb:213:in `extmake'
	from ./ext/extmk.rb:577:in `block in <main>'
	from ./ext/extmk.rb:573:in `each'
	from ./ext/extmk.rb:573:in `<main>'
```

`mkmf.log` from Psych says:

```
ld: warning: ignoring file /usr/local/lib/libyaml.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
```

I believe the problem is the default LDFLAGS set by configure.  The output of configure is:

```
   * LDFLAGS:             -L. -fstack-protector-strong -L/usr/local/lib
```

I don't think `/usr/local/lib` should be in `LDFLAGS` by default.

I've attached a patch that fixes the problem for me, and I sent the same patch as a PR on GitHub: https://github.com/ruby/ruby/pull/5855

Thanks!



-- 
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>

In This Thread