ml.ruby-lang.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

ruby-core

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
ruby-core@ml.ruby-lang.org

October 2026

  • 2 participants
  • 131 discussions
[ruby-core:126905] [Ruby Bug#22401] addr2line.c does not build when crt_externs.h is absent (iOS SDK)
by albertus (Dominik Alberski) 01 Oct '26

01 Oct '26
Issue #22401 has been reported by albertus (Dominik Alberski). ---------------------------------------- Bug #22401: addr2line.c does not build when crt_externs.h is absent (iOS SDK) https://bugs.ruby-lang.org/issues/22401 * Author: albertus (Dominik Alberski) * Status: Open * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- Ruby version: master (4.0.7) addr2line.c includes <crt_externs.h> unconditionally. The build fails on Darwin targets where that header is absent. The public iOS SDK does not ship crt_externs.h. ## Steps to reproduce Configure Ruby for a Darwin target without crt_externs.h, then run make. One example is a cross-compile for armv7-apple-ios6.0 against the iOS 6.1 SDK: ``` SDK=/path/to/iPhoneOS6.1.sdk CC="clang -target armv7-apple-ios6.0 -isysroot $SDK" \ CPP="clang -target armv7-apple-ios6.0 -isysroot $SDK -E" \ ../ruby/configure --host=armv7-apple-darwin10 --build=aarch64-apple-darwin25 make ``` ## Actual result ``` addr2line.c:84:11: fatal error: 'crt_externs.h' file not found 1 error generated. ``` ## Expected result addr2line.c compiles. ## Cause Three other files already handle this case: hash.c, eval_intern.h and missing/setproctitle.c. They check HAVE_CRT_EXTERNS_H. When the header is absent, they include missing/crt_externs.h instead. configure.ac sets that macro for darwin targets. addr2line.c was missed. addr2line.c also calls _NSGetMachExecuteHeader(). Only the macOS crt_externs.h declares that function, so a fallback header alone is not sufficient. The fix must also declare the function locally, with the same __LP64__ distinction that crt_externs.h uses. The symbol itself exists in libSystem/dyld on iOS too. ## Proposed fix Branch: https://github.com/DominikAlberski/ruby/tree/fix/addr2line-crt-externs-fall… macOS behavior does not change. On macOS HAVE_CRT_EXTERNS_H is defined, so the includes and the declarations stay the same. I verified this by preprocessing both versions with HAVE_CRT_EXTERNS_H defined. The output is identical, apart from the __LINE__ numbers that the added lines shift. A test is not possible for this change. The code path is a compile-time header fallback, and macOS builds do not take it. -- https://bugs.ruby-lang.org/
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 11
  • 12
  • 13
  • 14
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.