ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:118845] [Ruby master Bug#20677] error: mach-o section specifier requires a segment whose length is between 1 and 16 characters
@ 2024-08-14  4:32 ryandesign (Ryan Carsten Schmidt) via ruby-core
  2024-08-14  5:48 ` [ruby-core:118847] " mame (Yusuke Endoh) via ruby-core
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ryandesign (Ryan Carsten Schmidt) via ruby-core @ 2024-08-14  4:32 UTC (permalink / raw)
  To: ruby-core; +Cc: ryandesign (Ryan Carsten Schmidt)

Issue #20677 has been reported by ryandesign (Ryan Carsten Schmidt).

----------------------------------------
Bug #20677: error: mach-o section specifier requires a segment whose length is between 1 and 16 characters
https://bugs.ruby-lang.org/issues/20677

* Author: ryandesign (Ryan Carsten Schmidt)
* Status: Open
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
ruby (the development version as of 2024-08-11) does not build on macOS 11 or earlier with Apple Clang 1300 or earlier:


```
coroutine/amd64/Context.S:74:14: error: mach-o section specifier requires a segment whose length is between 1 and 16 characters
.pushsection .note.gnu.property, "a"
             ^
coroutine/amd64/Context.S:86:12: error: .popsection without corresponding .pushsection
.popsection
           ^
make: *** [coroutine/amd64/Context.o] Error 1

```

Here is the bug I filed with MacPorts about this: https://trac.macports.org/ticket/70537

It does build on newer systems with Apple Clang 1316 or later and on older systems when using a newer llvm.org clang compiler but it would be better if a newer compiler were not required.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:118847] [Ruby master Bug#20677] error: mach-o section specifier requires a segment whose length is between 1 and 16 characters
  2024-08-14  4:32 [ruby-core:118845] [Ruby master Bug#20677] error: mach-o section specifier requires a segment whose length is between 1 and 16 characters ryandesign (Ryan Carsten Schmidt) via ruby-core
@ 2024-08-14  5:48 ` mame (Yusuke Endoh) via ruby-core
  2024-08-15  1:14 ` [ruby-core:118857] " kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: mame (Yusuke Endoh) via ruby-core @ 2024-08-14  5:48 UTC (permalink / raw)
  To: ruby-core; +Cc: mame (Yusuke Endoh)

Issue #20677 has been updated by mame (Yusuke Endoh).

Assignee set to kjtsanaktsidis (KJ Tsanaktsidis)

@kjtsanaktsidis Could you take a look?

----------------------------------------
Bug #20677: error: mach-o section specifier requires a segment whose length is between 1 and 16 characters
https://bugs.ruby-lang.org/issues/20677#change-109413

* Author: ryandesign (Ryan Carsten Schmidt)
* Status: Open
* Assignee: kjtsanaktsidis (KJ Tsanaktsidis)
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
ruby (the development version as of 2024-08-11) does not build on macOS 11 or earlier with Apple Clang 1300 or earlier:


```
coroutine/amd64/Context.S:74:14: error: mach-o section specifier requires a segment whose length is between 1 and 16 characters
.pushsection .note.gnu.property, "a"
             ^
coroutine/amd64/Context.S:86:12: error: .popsection without corresponding .pushsection
.popsection
           ^
make: *** [coroutine/amd64/Context.o] Error 1

```

Here is the bug I filed with MacPorts about this: https://trac.macports.org/ticket/70537

It does build on newer systems with Apple Clang 1316 or later and on older systems when using a newer llvm.org clang compiler but it would be better if a newer compiler were not required.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:118857] [Ruby master Bug#20677] error: mach-o section specifier requires a segment whose length is between 1 and 16 characters
  2024-08-14  4:32 [ruby-core:118845] [Ruby master Bug#20677] error: mach-o section specifier requires a segment whose length is between 1 and 16 characters ryandesign (Ryan Carsten Schmidt) via ruby-core
  2024-08-14  5:48 ` [ruby-core:118847] " mame (Yusuke Endoh) via ruby-core
@ 2024-08-15  1:14 ` kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core
  2024-08-19  5:44 ` [ruby-core:118888] " kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core
  2024-08-19  6:35 ` [ruby-core:118889] " kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core
  3 siblings, 0 replies; 5+ messages in thread
From: kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core @ 2024-08-15  1:14 UTC (permalink / raw)
  To: ruby-core; +Cc: kjtsanaktsidis (KJ Tsanaktsidis)

Issue #20677 has been updated by kjtsanaktsidis (KJ Tsanaktsidis).


Ah. I might have to add some feature detection to the configure script for this when deciding if BTI/PAC is available.

Can you tell me, does it work if you compile with `ASFLAGS=-fno-integrated-as`?

----------------------------------------
Bug #20677: error: mach-o section specifier requires a segment whose length is between 1 and 16 characters
https://bugs.ruby-lang.org/issues/20677#change-109425

* Author: ryandesign (Ryan Carsten Schmidt)
* Status: Open
* Assignee: kjtsanaktsidis (KJ Tsanaktsidis)
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
ruby (the development version as of 2024-08-11) does not build on macOS 11 or earlier with Apple Clang 1300 or earlier:


```
coroutine/amd64/Context.S:74:14: error: mach-o section specifier requires a segment whose length is between 1 and 16 characters
.pushsection .note.gnu.property, "a"
             ^
coroutine/amd64/Context.S:86:12: error: .popsection without corresponding .pushsection
.popsection
           ^
make: *** [coroutine/amd64/Context.o] Error 1

```

Here is the bug I filed with MacPorts about this: https://trac.macports.org/ticket/70537

It does build on newer systems with Apple Clang 1316 or later and on older systems when using a newer llvm.org clang compiler but it would be better if a newer compiler were not required.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:118888] [Ruby master Bug#20677] error: mach-o section specifier requires a segment whose length is between 1 and 16 characters
  2024-08-14  4:32 [ruby-core:118845] [Ruby master Bug#20677] error: mach-o section specifier requires a segment whose length is between 1 and 16 characters ryandesign (Ryan Carsten Schmidt) via ruby-core
  2024-08-14  5:48 ` [ruby-core:118847] " mame (Yusuke Endoh) via ruby-core
  2024-08-15  1:14 ` [ruby-core:118857] " kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core
@ 2024-08-19  5:44 ` kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core
  2024-08-19  6:35 ` [ruby-core:118889] " kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core
  3 siblings, 0 replies; 5+ messages in thread
From: kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core @ 2024-08-19  5:44 UTC (permalink / raw)
  To: ruby-core; +Cc: kjtsanaktsidis (KJ Tsanaktsidis)

Issue #20677 has been updated by kjtsanaktsidis (KJ Tsanaktsidis).


> deciding if BTI/PAC is available.

Silly me, this is about amd64.

So what you're running into is that I added a `.note.gnu.property` to the amd64 one in https://github.com/ruby/ruby/commit/8ec67052e67dff62b828820e381a94a3acc73459 and it's unconditional in whether the __CET__ macro is defined or not. The arm64 property only gets emitted if BTI/PAC-RET is enabled.

I actually don't understand how this works at all even on modern macOS; AFAICT the max section size is still 16 chars (https://github.com/llvm/llvm-project/blob/82fdfd4aa7f60b1f8e715211b925a7f2bfe57ea9/llvm/lib/MC/MCSectionMachO.cpp#L208-L211). Looking into it some more...

----------------------------------------
Bug #20677: error: mach-o section specifier requires a segment whose length is between 1 and 16 characters
https://bugs.ruby-lang.org/issues/20677#change-109459

* Author: ryandesign (Ryan Carsten Schmidt)
* Status: Open
* Assignee: kjtsanaktsidis (KJ Tsanaktsidis)
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
ruby (the development version as of 2024-08-11) does not build on macOS 11 or earlier with Apple Clang 1300 or earlier:


```
coroutine/amd64/Context.S:74:14: error: mach-o section specifier requires a segment whose length is between 1 and 16 characters
.pushsection .note.gnu.property, "a"
             ^
coroutine/amd64/Context.S:86:12: error: .popsection without corresponding .pushsection
.popsection
           ^
make: *** [coroutine/amd64/Context.o] Error 1

```

Here is the bug I filed with MacPorts about this: https://trac.macports.org/ticket/70537

It does build on newer systems with Apple Clang 1316 or later and on older systems when using a newer llvm.org clang compiler but it would be better if a newer compiler were not required.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:118889] [Ruby master Bug#20677] error: mach-o section specifier requires a segment whose length is between 1 and 16 characters
  2024-08-14  4:32 [ruby-core:118845] [Ruby master Bug#20677] error: mach-o section specifier requires a segment whose length is between 1 and 16 characters ryandesign (Ryan Carsten Schmidt) via ruby-core
                   ` (2 preceding siblings ...)
  2024-08-19  5:44 ` [ruby-core:118888] " kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core
@ 2024-08-19  6:35 ` kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core
  3 siblings, 0 replies; 5+ messages in thread
From: kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core @ 2024-08-19  6:35 UTC (permalink / raw)
  To: ruby-core; +Cc: kjtsanaktsidis (KJ Tsanaktsidis)

Issue #20677 has been updated by kjtsanaktsidis (KJ Tsanaktsidis).


https://github.com/ruby/ruby/pull/11405 - I think this should fix it. It seems new toolchains truncate the section name, rather than throwing that error about "length is between 1 and 16 characters", but in any case the section is meaningless on MacOS so it's best to just not emit it.

----------------------------------------
Bug #20677: error: mach-o section specifier requires a segment whose length is between 1 and 16 characters
https://bugs.ruby-lang.org/issues/20677#change-109460

* Author: ryandesign (Ryan Carsten Schmidt)
* Status: Open
* Assignee: kjtsanaktsidis (KJ Tsanaktsidis)
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
ruby (the development version as of 2024-08-11) does not build on macOS 11 or earlier with Apple Clang 1300 or earlier:


```
coroutine/amd64/Context.S:74:14: error: mach-o section specifier requires a segment whose length is between 1 and 16 characters
.pushsection .note.gnu.property, "a"
             ^
coroutine/amd64/Context.S:86:12: error: .popsection without corresponding .pushsection
.popsection
           ^
make: *** [coroutine/amd64/Context.o] Error 1

```

Here is the bug I filed with MacPorts about this: https://trac.macports.org/ticket/70537

It does build on newer systems with Apple Clang 1316 or later and on older systems when using a newer llvm.org clang compiler but it would be better if a newer compiler were not required.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-19  6:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-14  4:32 [ruby-core:118845] [Ruby master Bug#20677] error: mach-o section specifier requires a segment whose length is between 1 and 16 characters ryandesign (Ryan Carsten Schmidt) via ruby-core
2024-08-14  5:48 ` [ruby-core:118847] " mame (Yusuke Endoh) via ruby-core
2024-08-15  1:14 ` [ruby-core:118857] " kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core
2024-08-19  5:44 ` [ruby-core:118888] " kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core
2024-08-19  6:35 ` [ruby-core:118889] " kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).