void-packages icon indicating copy to clipboard operation
void-packages copied to clipboard

New packages: mimalloc-2.0.6, mold-1.5.1

Open wangp opened this issue 3 years ago • 4 comments

Testing the changes

  • I tested the changes in this PR: YES

New package

Local build testing

  • I built this PR locally for my native architecture, x86_64-glibc
  • I built this PR locally for these architectures (crossbuilds):
    • x86_64-musl
    • i686-glibc
    • aarch64-glibc
    • aarch64-musl
    • armv7l-glibc
    • armv7l-musl
    • armv6l-glibc
    • armv6l-musl

Note:

  • I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is LD_PRELOAD=/usr/lib/libmimalloc.so myprogram

wangp avatar Jun 26 '22 04:06 wangp

I included mold in this PR because it depends on mimalloc.

Regarding the CI failures for mold on i686:

  • we might need to set MACHINE=i686 in the environment, otherwise the test scripts use the value of uname -m which is x86_64 in the cross-compilation environment.
  • the i686 mold binary doesn't run in the cross-compilation environment because /lib/ld-linux.so.2 is missing

As a test, if I move the binary out of the way and replace it with the following script then most of the tests will pass. What is the proper way to fix it?

#!/bin/sh
export LD_LIBRARY_PATH=/usr/i686-pc-linux-gnu/usr/lib
exec /usr/i686-pc-linux-gnu/usr/lib/ld-linux.so.2 ./mold-i686 "$@"

wangp avatar Sep 11 '22 05:09 wangp

Does including make_check_pre="env MACHINE=${XBPS_TARGET_MACHINE#-musl}" help?

icp1994 avatar Sep 16 '22 15:09 icp1994

Thanks for the suggestion. I've set MACHINE in pre_check ~along with some other variables.~

Well, everything is passing now. It's still mysterious to me why the i686 build failed before.

wangp avatar Sep 17 '22 04:09 wangp

Interesting suggestion. I will add the build option, but I would like other people's opinions if it should be the default.

I'm mainly packaging mimalloc to use with mold. Here is a benchmark of mold on my machine. Benchmark # 1 uses mold with mimalloc in non-secure mode. Benchmark # 2 uses mold with mimalloc in secure mode.

Benchmark #1: ../../link-test.sh
  Time (mean ± σ):     255.3 ms ±   1.5 ms    [User: 22.2 ms, System: 7.4 ms]
  Range (min … max):   252.9 ms … 257.7 ms    20 runs
 
Benchmark #2: LD_LIBRARY_PATH=/tmp/mimalloc-secure/usr/lib ../../link-test.sh
  Time (mean ± σ):     265.1 ms ±   1.7 ms    [User: 26.8 ms, System: 8.1 ms]
  Range (min … max):   261.7 ms … 267.6 ms    20 runs
 
Summary
  '../../link-test.sh' ran
    1.04 ± 0.01 times faster than 'LD_LIBRARY_PATH=/tmp/mimalloc-secure/usr/lib ../../link-test.sh', -3.7%

In relative terms, a 3-4% slowdown is significant, but in absolute terms, 10 ms is not something that I would notice. So I think I would be okay with making secure mode the default, even if I don't see the need for it in a linker.

(For interest, the same link command using GNU ld takes 1.9 s.)

wangp avatar Sep 22 '22 00:09 wangp

tested this in my local system. it's working as expected, so, lgtm!

sug0 avatar Oct 24 '22 14:10 sug0

FWIW, Alpine disables the failing tests. It should be okay for us to disable them on musl too.

icp1994 avatar Jan 08 '23 05:01 icp1994

FWIW, Alpine disables the failing tests. It should be okay for us to disable them on musl too.

the segfaulting ones are real failures, though not much uses emit-relocs in practice afaik. reported as an issue regardless

nekopsykose avatar Jan 09 '23 00:01 nekopsykose

https://github.com/rui314/mold/commit/e17d7daee8fc9ccdf54bf52c156d9cae448fdd0f
https://github.com/rui314/mold/commit/915cd23b2fd142f6618d6a31506016b1f9280b8e

test fixes

nekopsykose avatar Jan 09 '23 04:01 nekopsykose

mold 1.10.1 has been released

subnut avatar Mar 02 '23 22:03 subnut

mold 1.11.0 has been released.

cinerea0 avatar Mar 27 '23 18:03 cinerea0

hey, 2.0.0 is out! :tada:

sug0 avatar Jul 27 '23 16:07 sug0

Please squash and rebase, then :+1:

leahneukirchen avatar Jul 29 '23 14:07 leahneukirchen