Package Details: mold-git 2.31.0.r12.g5ec3d2dc-1

Git Clone URL: (read-only, click to copy)
Package Base: mold-git
Description: A Modern Linker
Upstream URL:
Keywords: ld.mold linker mold
Licenses: MIT
Conflicts: mold
Provides: mold
Submitter: xyproto
Maintainer: bin (ptr1337)
Last Packager: ptr1337
Votes: 6
Popularity: 0.000053
First Submitted: 2021-02-23 11:05 (UTC)
Last Updated: 2024-05-05 07:46 (UTC)

Required by (64)

Sources (1)

Latest Comments

1 2 3 Next › Last »

xiota commented on 2023-10-19 06:01 (UTC) (edited on 2023-10-19 06:11 (UTC) by xiota)

@eclairevoyant What's the benefit of using printf as described in your earlier comment?

@bin @ptr1337 VCS package guidelines also states that prefix v should be removed.

git describe --long --tags | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'

eclairevoyant commented on 2023-03-12 21:20 (UTC) (edited on 2023-03-12 21:23 (UTC) by eclairevoyant)

The pkgver should be corrected to (ver).r(revision_number).(hash) as per standards; see the wiki for more info:

The revision number delimiter ("r" right before REVISION) is important. This delimiter allows to avoid problems in case if upstream decides to make its first release or uses versions with different number of components. E.g. if at revision "455" upstream decides to release version 0.1 then the revision delimiter preserves version monotonicity - 0.1.r456 > r454. Without the delimiter monotonicity fails - 0.1.456 < 454.

see /usr/share/pacman/PKGBUILD-vcs.proto for an example:

 printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"

Also, any custom variable (like reponame) should be prefixed with _

ptr1337 commented on 2022-10-10 13:11 (UTC)


I can't reproduce this on my end. Compiled in a chroot and also with out chroot. No issues. Maybe it was a upstream issue and got fixed.

268/272 Test #268: x86_64-z-nodump .........................   Passed    0.03 sec
        Start 269: x86_64-z-now
269/272 Test #269: x86_64-z-now ............................   Passed    0.02 sec
        Start 270: x86_64-z-origin
270/272 Test #270: x86_64-z-origin .........................   Passed    0.03 sec
        Start 271: x86_64-z-separate-code
271/272 Test #271: x86_64-z-separate-code ..................   Passed    0.04 sec
        Start 272: x86_64-z-unknown
272/272 Test #272: x86_64-z-unknown ........................   Passed    0.01 sec

100% tests passed, 0 tests failed out of 272

Total Test time (real) =  12.61 sec
==> Entering fakeroot environment...
==> Starting package()...

DAC324 commented on 2022-10-03 10:19 (UTC) (edited on 2022-10-03 11:14 (UTC) by DAC324)

New problem:

99% tests passed, 1 tests failed out of 270

Total Test time (real) =  31.80 sec

The following tests did not run:
    161 - x86_64-pack-dyn-relocs-relr (Skipped)

The following tests FAILED:
    226 - x86_64-tlsdesc-static (Failed)
Errors while running CTest

Interesting: When I run the build process step by step as instructed on, and then run ctest --test-dir build --output-on-failure on the build directory created there, the tests all pass.

ptr1337 commented on 2022-06-25 04:58 (UTC)


Actually the "compile options" you posted is a possibility.

To the compiler:

You may need to pass a C++20 compiler command name to make. In the above case, clang++ is passed. If it doesn't work for you, try a specific version of a compiler such as g++-10 or clang++-12.

to system TBB:

Arch did updated tbb with the patch which where requested from rui. So we can easily use the SYSTEM_TBB again.

to "j$nproc :

I dont see any profit in adding these, cause everyone can set himself in his used cpu's.

to tests:

Will fix that.

DAC324 commented on 2022-06-24 11:39 (UTC) (edited on 2022-06-24 11:41 (UTC) by DAC324)

Looks like the check() section in PKGBUILD has become obsolete as the target check was removed from the mold Makefile.

Plus, a lot of warnings can be avoided if the compile options are set as instructed at .

build() {
    make \
        -C "$reponame" \
         -j$(nproc) CXX=clang++ \
        PREFIX=/usr \
        LTO=1 \

DAC324 commented on 2022-06-24 11:01 (UTC)

The package currently does not build:

make: Leaving directory '/opt/.cache/yay/mold-git/src/mold'
==> Starting check()...
make: *** No rule to make target 'check'.  Stop.
==> ERROR: A failure occurred in check().
 -> error making: mold-git

ptr1337 commented on 2022-06-15 11:46 (UTC)

@bin Thanks for giving me co-maintainer, since I use this linker quite often. I did updated it to the latest changes.

bin commented on 2022-06-14 22:22 (UTC)

@ptr1337 Thanks for the patch. I added you as a co-maintainer; sorry about the delay.

ptr1337 commented on 2022-05-07 18:55 (UTC) (edited on 2022-05-07 18:55 (UTC) by ptr1337)

Could you please update it to provide mold/mold-git and remove system XXHASH? Here the patch for:

From 54d79616287838794d9eedfac0ab7dbe660f85a9 Mon Sep 17 00:00:00 2001
From: Peter Jung <>
Date: Sat, 7 May 2022 20:54:26 +0200
Subject: [PATCH] update mold-git

 PKGBUILD | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/PKGBUILD b/PKGBUILD
index 6ef6735..0a7491b 100644
@@ -1,5 +1,5 @@
 pkgdesc="A Modern Linker"
@@ -9,8 +9,10 @@ depends=("gcc-libs" "mimalloc" "openssl" "tbb" "zlib")
 makedepends=("clang" "git" "xxhash")
+provides=('mold' 'mold-git')

 prepare() {
    cd "$reponame"
@@ -23,9 +25,9 @@ pkgver() {

 build() {
-   make -C "${reponame}" PREFIX=/usr LTO=1 SYSTEM_MIMALLOC=1 SYSTEM_TBB=1 SYSTEM_XXHASH=1 -j `nproc`
+   make -C "${reponame}" PREFIX=/usr LTO=1 SYSTEM_MIMALLOC=1 SYSTEM_TBB=1 -j `nproc`

 package() {
-   make -C "${reponame}" PREFIX=/usr LTO=1 SYSTEM_MIMALLOC=1 SYSTEM_TBB=1 SYSTEM_XXHASH=1 DESTDIR="${pkgdir}" install
+   make -C "${reponame}" PREFIX=/usr LTO=1 SYSTEM_MIMALLOC=1 SYSTEM_TBB=1 DESTDIR="${pkgdir}" install