FS#77894 - [onetbb] mold coredumps during compilation

Attached to Project: Arch Linux
Opened by Benoit Pierre (bpierre) - Saturday, 18 March 2023, 08:46 GMT
Last edited by Felix Yan (felixonmars) - Thursday, 23 March 2023, 05:00 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

I'm getting coredumps during compilation:

```
terminate called after throwing an instance of 'std::runtime_error'
terminate called recursively
collect2: fatal error: ld terminated with signal 6 [Aborted], core dumped
compilation terminated.
```

It's a known issue: https://github.com/rui314/mold/issues/600, with a patch merged on tbb's upstream: https://github.com/oneapi-src/oneTBB/pull/824/files.

The issue is fixed by either compiling mold with its vendored-in version of tbb:
```diff
trunk/PKGBUILD | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git i/trunk/PKGBUILD w/trunk/PKGBUILD
index bec1b40a..3ce65a60 100644
--- i/trunk/PKGBUILD
+++ w/trunk/PKGBUILD
@@ -30,7 +30,7 @@ build() {
-D CMAKE_INSTALL_PREFIX='/usr' \
-D CMAKE_INSTALL_LIBEXECDIR='lib' \
-D MOLD_USE_SYSTEM_MIMALLOC=ON \
- -D MOLD_USE_SYSTEM_TBB=ON \
+ -D MOLD_USE_SYSTEM_TBB=OFF \
-D MOLD_LTO=ON \
-D MOLD_USE_MOLD=ON

```

or patching tbb:
```
PKGBUILD | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git i/PKGBUILD w/PKGBUILD
index eb9e4fa8..473e89e4 100644
--- i/PKGBUILD
+++ w/PKGBUILD
@@ -17,8 +17,15 @@ makedepends=('cmake' 'inetutils' 'ninja' 'python' 'swig')
conflicts=('intel-tbb' 'tbb')
provides=("intel-tbb=$pkgver" "tbb=$pkgver")
replaces=('intel-tbb' 'tbb')
-source=(https://github.com/oneapi-src/oneTBB/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
-sha512sums=('72f68730dfd89409796f9548d3c302111787712089688a7c77092ed1b3a7bf4e7444fe4b58015d2c78b7b71259852526789b2483bf1e71bea8146c4b4676e7b4')
+source=(https://github.com/oneapi-src/oneTBB/archive/v$pkgver/$pkgname-$pkgver.tar.gz
+ retry-on-pthread_create-EAGAIN-failure.patch::https://patch-diff.githubusercontent.com/raw/oneapi-src/oneTBB/pull/824.patch)
+sha512sums=('72f68730dfd89409796f9548d3c302111787712089688a7c77092ed1b3a7bf4e7444fe4b58015d2c78b7b71259852526789b2483bf1e71bea8146c4b4676e7b4'
+ '717d3f78b29ce9e2104cbf962b4ced8a4414dcb8af7259ba12dd62adbacfd59e064ae1771c217cbac46d691ab6bfd52aee90113a5aeb9a1f91379295d16e639a')
+
+prepare() {
+ cd oneTBB-$pkgver
+ patch -p1 -i "$srcdir/retry-on-pthread_create-EAGAIN-failure.patch"
+}

build() {
cd oneTBB-$pkgver
```

Additional info:
* package version(s): mold 1.10.1-1, onetbb 2021.8.0-1
This task depends upon

Closed by  Felix Yan (felixonmars)
Thursday, 23 March 2023, 05:00 GMT
Reason for closing:  Fixed
Additional comments about closing:  2021.8.0-2

Loading...