Since 2.44_01, the behaviour for `check_lib` in their `Makefile.PL` has
been "fixed" to fail when the `assert_lib` function fails to build the
test.
* 2bc1e90c04
Now, this wouldn't be so bad, since it's good to actually test what
stuff is being compiled against.
Except that *something* is wonky with the cross-compilation build-time
Perl.
```
Undefined subroutine &File::Temp::mktemp called at inc/Devel/CheckLib.pm line 236.
```
As far as I know, this is a built-in function from Perl.
* https://perldoc.perl.org/File/Temp.html
Though, something *else* is wrong with `Checklib.pm`. Side-stepping the
issue by (eww) shelling out to `mktemp`, we get these errors:
```
/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-armv7l-unknown-linux-gnueabihf-binutils-2.31.1/bin/armv7l-unknown-linux-gnueabihf-ld: assertlib_src1_0.553056903257133: file not recognized: file truncated
collect2: error: ld returned 1 exit status
-I/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.2.8-armv7l-unknown-linux-gnueabihf-dev/include -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.2.8-armv7l-unknown-linux-gnueabihf/lib -lexpat
/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-armv7l-unknown-linux-gnueabihf-binutils-2.31.1/bin/armv7l-unknown-linux-gnueabihf-ld: assertlib_src2_0.262169388446154: file not recognized: file truncated
collect2: error: ld returned 1 exit status
Can't link/include C library 'expat.h', 'expat', aborting.
```
Meanwhile, the actual build, while building the library, seemingly has
no issues building using those paths. `¯\_(ツ)_/¯`
4d392099 didn't quite do the trick, but this should finally fix
everything -- namely, the -secure.so symlink was broken, and
libmimalloc.so itself was also a symlink that needed to be replaced with
the real shared object file.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
We shouldn’t force the user to have a C compiler in scope, just
because the derivation is forced to build locally. That can’t be
counted as “lightweight” anymore.
Co-Authored-By: Silvan Mosberger<contact@infinisil.com>
A definition I’ve been copy-pasting everywhere so far, so it’s finally
time to add it to nixpkgs.
I’m using a remote builder for my regular nix builds, so trivial
`runCommand`s which first try a substitution and then copy the inputs
to the builder to run for 0.2s are quite noticable.
If we just always build these, we gain some build time, so let’s make
it easy to switch from remote to local.