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.
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.
(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.
(In reply to Kyle Evans from comment #2) Cool, that exactly what I was thinking, thanks!
(In reply to Sergey A. Osokin from comment #3) Excellent, thank you!
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
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