Bug 250726 - lang/luajit: switch to LLVM10 from ports for 12.1/amd64
Summary: lang/luajit: switch to LLVM10 from ports for 12.1/amd64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kyle Evans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-29 18:33 UTC by Kyle Evans
Modified: 2020-10-29 23:54 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (osa)
kevans: merge-quarterly?


Attachments
svn(1) diff against the ports tree (3.15 KB, patch)
2020-10-29 18:33 UTC, Kyle Evans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Evans freebsd_committer 2020-10-29 18:33:01 UTC
Created attachment 219206 [details]
svn(1) diff against the ports tree

There's a little more detail in the patch comments, but 12.1 shipped with LLVM 8.0.1 which links libluajit with a bogus (improperly aligned) TLS segment offset. Notably, this breaks under 12.2 rtld and causes a SIGBUS when an error is raised (see, e.g., bug #250707, comment #1).

Since the issue is technically a broken binary, the attached patch pins 12.1/amd64 builds of luajit to devel/llvm10 so that they can be rebuilt with a linker that will handle this properly and stop breaking luajit-dependant applications on 12.2 while the packages are still built on 12.1. This will naturally fall away when portmgr goes to axe conditionals solely for FreeBSD 12.1 after it goes EOL.

The src/Makefile patch has been dropped in this version in favor of just supplying the variables it was unsetting via Make arguments, but I'm not attached to this approach... at least the DEFAULT_CC hunk was redundant since we were setting CC via make(1) argument already.
Comment 1 Sergey A. Osokin freebsd_committer 2020-10-29 19:57:17 UTC
Hi Kyle,

approved, please go ahead.

Also, quick question for you.  The 12.1-R EOL date is Jan 31, 2021. Follow that, am I right that we're going to keep the workaround for three months?

Thanks.
Comment 2 Kyle Evans freebsd_committer 2020-10-29 19:58:49 UTC
(In reply to Sergey A. Osokin from comment #1)

Hi,

If 12.1 goes EOL on January 31st, 2021 (this sounds right, 3 months from now) then the workaround will be removed shortly (within a couple weeks, probably) after that as part of the natural process of the ports tree no longer supporting EOL releases.
Comment 3 Sergey A. Osokin freebsd_committer 2020-10-29 20:00:23 UTC
(In reply to Kyle Evans from comment #2)

Cool, that exactly what I was thinking, thanks!
Comment 4 Kyle Evans freebsd_committer 2020-10-29 23:43:31 UTC
(In reply to Sergey A. Osokin from comment #3)

Excellent, thank you!
Comment 5 commit-hook freebsd_committer 2020-10-29 23:53:52 UTC
A commit references this bug:

Author: kevans
Date: Thu Oct 29 23:53:02 UTC 2020
New revision: 553656
URL: https://svnweb.freebsd.org/changeset/ports/553656

Log:
  lang/luajit: switch to LLVM10 from ports for 12.1/amd64

  12.1 shipped with LLVM 8.0.1 which links libluajit with a bogus (improperly
  aligned) TLS segment offset. Notably, this breaks under 12.2 rtld and causes
  a SIGBUS when an error is raised.

  Since the issue is technically a broken binary, the attached patch pins
  12.1/amd64 builds of luajit to devel/llvm10 so that they can be rebuilt with
  a linker that will handle this properly and stop breaking luajit-dependant
  applications on 12.2 while the packages are still built on 12.1. This will
  naturally fall away when portmgr goes to axe conditionals solely for FreeBSD
  12.1 after it goes EOL.

  The src/Makefile patch has been dropped in this version in favor of just
  supplying the variables it was unsetting via Make arguments as a minor
  cleanup.

  PR:		250707, 250726
  Reported by:	many
  Investigation by:	Andrew Gierth <andrew tao11 riddles org uk>
  Confirmation from:	kib
  Approved by:	osa (maintainer)
  MFH:		2020Q4 (blanket: runtime fix)

Changes:
  head/lang/luajit/Makefile
  head/lang/luajit/files/patch-src_Makefile
Comment 6 commit-hook freebsd_committer 2020-10-29 23:53:55 UTC
A commit references this bug:

Author: kevans
Date: Thu Oct 29 23:53:36 UTC 2020
New revision: 553657
URL: https://svnweb.freebsd.org/changeset/ports/553657

Log:
  MFH: r553656

  lang/luajit: switch to LLVM10 from ports for 12.1/amd64

  12.1 shipped with LLVM 8.0.1 which links libluajit with a bogus (improperly
  aligned) TLS segment offset. Notably, this breaks under 12.2 rtld and causes
  a SIGBUS when an error is raised.

  Since the issue is technically a broken binary, the attached patch pins
  12.1/amd64 builds of luajit to devel/llvm10 so that they can be rebuilt with
  a linker that will handle this properly and stop breaking luajit-dependant
  applications on 12.2 while the packages are still built on 12.1. This will
  naturally fall away when portmgr goes to axe conditionals solely for FreeBSD
  12.1 after it goes EOL.

  The src/Makefile patch has been dropped in this version in favor of just
  supplying the variables it was unsetting via Make arguments as a minor
  cleanup.

  PR:		250707, 250726
  Reported by:	many
  Investigation by:	Andrew Gierth <andrew tao11 riddles org uk>
  Confirmation from:	kib
  Approved by:	osa (maintainer)

  Approved by:	ports-secteam (implicit, runtime fix)

Changes:
_U  branches/2020Q4/
  branches/2020Q4/lang/luajit/Makefile
  branches/2020Q4/lang/luajit/files/patch-src_Makefile