New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

musl-cross, native-musl, cross fixes, oh my! #34645

Merged
merged 173 commits into from Feb 13, 2018

Conversation

@dtzWill
Contributor

dtzWill commented Feb 6, 2018

Motivation for this change

Support cross-compiling for musl, support musl-native, generalize a bit beyond glibc, many cross fixes.

A few fixes are "borrowed" from @bgamari's big PR (#30882).

PR History

To help folks track changes made across updates to this PR, I'm tagging each revision to help diff and whatnot:

  • v1 - 2018-02-05
    • Initial submission.
  • v2 - 2018-02-06
    • Drop musl.nix, musl-cross.nix (commits introducting and modifying)
    • Drop 305a63407ed352bda7b13f432be2c79df2bde4be (gcc6 yesFuncs/noFuncs):
      • doesn't seem needed, and as a bonus wasn't used for stdenv.cc anyway so no mass rebuild
    • busybox: don't force gcc
    • libcap: don't force gcc, also cleanup to use depsBuildBuild and existing env vars
    • musl: don't redundantly add cross prefix
    • Drop stdenv.is{Glibc,Musl}, grab from hostPlatform
    • Drop openjdk commit/revert, will revisit later
    • pam: depsBuildBuild
  • v3 - 2018-02-08
    • rebase onto latest master
    • resolve squid4 conflict by dropping commit: fix no longer needed, can enable parallel building in separate PR
    • re-enable LLVM manpage building on musl, only disable on cross (for now).
  • v4 - 2018-02-08
    • drop 'libc = "glibc"' from system examples
    • rebase onto staging, since that's what we're targeting. Whoops.
  • v5 - 2018-02-09
    • specify commit hash in gcc5 musl patch URL
    • resolve conflict with nixUnstable, rebase onto latest staging
    • fix typo in "examples" for aarch64-musl introduced in v4
    • tweak llvm-{4,5} use of python to (hopefully) fix darwin eval, allow either python2 or python3
    • fix go eval problems by replacing attempts to use stdenv.glibc
  • v6 - 2018-02-11
    • resolve conflicts, rebase onto latest staging
    • groundwork for musl32, although no bootstrap here and cross doesn't work yet
    • restore "stdenv.glibc", too messy to remove as part of this and can be done later.
  • v7 - 2018-02-11
    • refactor lib changes into #34861, rebase onto that and latest staging
    • drop nearly all LLVM/clang fixes from this, will tackle in follow-up
    • lots of cleanup, esp. re:isGlibc/isMusl and breaking apart / merging commits (~50 fewer commits!)
  • v8 - 2018-02-11
    • fetch patches instead of local copies: net-snmp, apparmor, audit
    • don't use IFD for systemd patch list and instead generate postPatch command
  • v9 - 2018-02-12
    • drop unused python patch
    • support musl-native bootstrapping on aarch64, armv6l (in addition to x86_64). Not tested yet 😇.
  • v10 - 2018-02-13
    • rebase onto latest staging, resolve systemd 237 conflicts by dropping patches used to get it building. Will revisit later due to effort involved and amount of patches required.
    • use 64bit busybox for bootstrap on x86_64 to avoid problems like those reported in WSL.
    • actually restore "stdenv.glibc" (for now), previous commit did not do this for final stdenv
    • tested bootstrap on aarch64 (hooray and thank you @grahamc and https://github.com/nix-community/aarch64-build-box), it's at least not completely broken.
    • includes XZ fix (#34916) since without it stdenv contains invalid referencces

TODO

  • use fetchpatch instead of introducing local files, make a pass checking for this

Minor / Misc / Maybe

  • cc-wrapper: When building gcc6 (wrapped) in cross stdenv, somehow binutils from host get onto PATH (?) causing the wrong mkdir to be used. This doesn't occur when building the cross stdenv.cc, FWIW. Example error:
    /nix/store/k1r93q2cq3r7x8kx663w8lf0qaid7iiv-stdenv/setup: line 1224: /nix/store/ldsqyff47p1v0yqjp4a3kzxcqvv5fmwr-coreutils-8.29-armv6l-unknown-linux-musleabihf/bin/mkdir: cannot execute binary file: Exec format error
    
  • refactor duplicated code compute path to getent utility

Quickstart with Binary Cache

To enjoy musl goodness right away, consider taking advantage of the ALLVM project's binary cache!

To do so, add the following to your configuration.nix:

{
    nix.binaryCaches = [
      "https://cache.nixos.org/"
      "https://cache.allvm.org/"
    ];

    nix.binaryCachePublicKeys = [
      "gravity.cs.illinois.edu-1:yymmNS/WMf0iTj2NnD0nrVV8cBOXM9ivAkEdO1Lro3U="
    ];
}

(Please add it after the nixos one O:))

Equivalent of "small" jobset is evaluated and cached for a few build configurations,
but certainly not everything works yet. This is just a (hopefully solid) start!


Credits and Teasers: ALLVM

This PR (and many of the related fixes submitted recently) are based on work done as part of the ALLVM project, many thanks to our funding 👍.

We look forward to sharing more with everyone soon! Stay tuned :).

@dtzWill dtzWill requested review from Ericson2314, FRidh, nbp, orivej and zimbatm as code owners Feb 6, 2018

@Ericson2314

Yayaayyyayayayayyayayayayyayayaayayayy!

Here's a few comments from a quick (relative to the size of this at least!) first pass. Very excited to merge this!

}.${localSystem.system}
or (abort "unsupported platform for the pure Linux stdenv")
, bootstrapFiles ?
let table = {

This comment has been minimized.

@Ericson2314

Ericson2314 Feb 6, 2018

Member

Maybe we should just use config?

@Ericson2314

Ericson2314 Feb 6, 2018

Member

Maybe we should just use config?

This comment has been minimized.

@dtzWill

dtzWill Feb 6, 2018

Contributor

I don't think "config" is canonical for a a given system/libc pair. I'm not sure how important that is, but that's why I did things this way.

@dtzWill

dtzWill Feb 6, 2018

Contributor

I don't think "config" is canonical for a a given system/libc pair. I'm not sure how important that is, but that's why I did things this way.

This comment has been minimized.

@Ericson2314

Ericson2314 Feb 6, 2018

Member

Yeah makes sense.

@Ericson2314

Ericson2314 Feb 6, 2018

Member

Yeah makes sense.

Show outdated Hide outdated lib/systems/default.nix
@@ -26,7 +26,9 @@ rec {
libc =
/**/ if final.isDarwin then "libSystem"
else if final.isMinGW then "msvcrt"
else if final.isLinux then "glibc"
else if final.isLinux && final.isGlibc then "glibc"

This comment has been minimized.

@Ericson2314

Ericson2314 Feb 6, 2018

Member

I'm not wild about how libc and the new is* predicates are somewhat disconnected. But I see its the best choice given how things are today. Maybe the solution is to move libc into parsed?

@Ericson2314

Ericson2314 Feb 6, 2018

Member

I'm not wild about how libc and the new is* predicates are somewhat disconnected. But I see its the best choice given how things are today. Maybe the solution is to move libc into parsed?

This comment has been minimized.

@dtzWill

dtzWill Feb 6, 2018

Contributor

I'm not sure. Related: It seems "abi" dictates the libc to be used, at least if it's not "unknown"...

Hmm, I trust you on this but happy to give feedback on your thoughts.

@dtzWill

dtzWill Feb 6, 2018

Contributor

I'm not sure. Related: It seems "abi" dictates the libc to be used, at least if it's not "unknown"...

Hmm, I trust you on this but happy to give feedback on your thoughts.

Show outdated Hide outdated lib/systems/examples.nix
@@ -63,6 +63,20 @@ rec {
platform = platforms.fuloong2f_n32;
};
muslpi = raspberryPi // {
config = "armv6l-unknown-linux-musleabihf";
libc = "musl";

This comment has been minimized.

@Ericson2314

Ericson2314 Feb 6, 2018

Member

Are the libc = ...s needed? I'd love to remove them everywhere and have inference take care of it; the more minimal these attribute sets are the better!

@Ericson2314

Ericson2314 Feb 6, 2018

Member

Are the libc = ...s needed? I'd love to remove them everywhere and have inference take care of it; the more minimal these attribute sets are the better!

This comment has been minimized.

@dtzWill

dtzWill Feb 6, 2018

Contributor

I don't think so! This one is "needed" only because I base it off of "raspberryPi" which explicitly sets libc to glibc; if it didn't I wouldn't need to override it.

AFAIK they're inferred properly by default in all examples in this file.

Which, by the way, is magical :D.

@dtzWill

dtzWill Feb 6, 2018

Contributor

I don't think so! This one is "needed" only because I base it off of "raspberryPi" which explicitly sets libc to glibc; if it didn't I wouldn't need to override it.

AFAIK they're inferred properly by default in all examples in this file.

Which, by the way, is magical :D.

Show outdated Hide outdated musl-cross.nix
@@ -0,0 +1,5 @@
{ src ? ./default.nix }:

This comment has been minimized.

@Ericson2314

Ericson2314 Feb 6, 2018

Member

Errr should we have new top level files? I do want an easier way to get people going, but not sure what should be it.

@Ericson2314

Ericson2314 Feb 6, 2018

Member

Errr should we have new top level files? I do want an easier way to get people going, but not sure what should be it.

This comment has been minimized.

@dtzWill

dtzWill Feb 6, 2018

Contributor

Oh no! This was just for my testing--especially early on before recent improvements -- to avoid error-prone and/or long nix incantations. This should 0% be merged anywhere, I'll drop it sorry.

@dtzWill

dtzWill Feb 6, 2018

Contributor

Oh no! This was just for my testing--especially early on before recent improvements -- to avoid error-prone and/or long nix incantations. This should 0% be merged anywhere, I'll drop it sorry.

Show outdated Hide outdated pkgs/development/compilers/gcc/6/default.nix
@@ -314,7 +324,44 @@ stdenv.mkDerivation ({
+ stdenv.lib.optionalString (langJava || langGo) ''
export lib=$out;
''
;
+ stdenv.lib.optionalString (buildPlatform != hostPlatform)

This comment has been minimized.

@Ericson2314

Ericson2314 Feb 6, 2018

Member

Do we need these? I haven't needed them so far.

@Ericson2314

Ericson2314 Feb 6, 2018

Member

Do we need these? I haven't needed them so far.

This comment has been minimized.

@dtzWill

dtzWill Feb 6, 2018

Contributor

I'll check, the commits re:gcc6 (and in a few other places in this PR) are still a bit "exploratory" and showing something that works vs "ready to merge" and clean-- and likely are not minimal.

Not at all being defensive :) just FYI, and good question I'll check. I hope you're right!

@dtzWill

dtzWill Feb 6, 2018

Contributor

I'll check, the commits re:gcc6 (and in a few other places in this PR) are still a bit "exploratory" and showing something that works vs "ready to merge" and clean-- and likely are not minimal.

Not at all being defensive :) just FYI, and good question I'll check. I hope you're right!

Show outdated Hide outdated pkgs/os-specific/linux/musl/default.nix
cross = if buildPlatform != hostPlatform then hostPlatform else null;

This comment has been minimized.

@Ericson2314

Ericson2314 Feb 6, 2018

Member

Not a fan of these sorts of cross args. glibc is a bad derivation style!

@Ericson2314

Ericson2314 Feb 6, 2018

Member

Not a fan of these sorts of cross args. glibc is a bad derivation style!

This comment has been minimized.

@dtzWill

dtzWill Feb 6, 2018

Contributor

xD. Turns out it's only needed for adding the cross suffix... O:).

@dtzWill

dtzWill Feb 6, 2018

Contributor

xD. Turns out it's only needed for adding the cross suffix... O:).

Show outdated Hide outdated pkgs/os-specific/linux/musl/default.nix
stdenv.mkDerivation rec {
name = "musl-${version}";
name = "musl-${version}" +
lib.optionalString (cross != null) "-${cross.config}";

This comment has been minimized.

@Ericson2314

Ericson2314 Feb 6, 2018

Member

Adapter should already do this, right? (I recently removed redundency from glibc.)

@Ericson2314

Ericson2314 Feb 6, 2018

Member

Adapter should already do this, right? (I recently removed redundency from glibc.)

This comment has been minimized.

@dtzWill

dtzWill Feb 6, 2018

Contributor

Oh! Yes adapter of course does do this, I assumed/guessed this was for libcCross which is a bit "special".

That said, it does result in a lot of redundancy as-is because "build != host" is not how you check "am I being built as libcCross"! Also it might not be needed even then...yep it sure doesn't appear to be needed then either.

Ah yes, I probably was following along glibc, from before that change.

I'll remove this, although immediately reverting it to avoid mass-rebuild while working on other issues.

@dtzWill

dtzWill Feb 6, 2018

Contributor

Oh! Yes adapter of course does do this, I assumed/guessed this was for libcCross which is a bit "special".

That said, it does result in a lot of redundancy as-is because "build != host" is not how you check "am I being built as libcCross"! Also it might not be needed even then...yep it sure doesn't appear to be needed then either.

Ah yes, I probably was following along glibc, from before that change.

I'll remove this, although immediately reverting it to avoid mass-rebuild while working on other issues.

Show outdated Hide outdated pkgs/servers/monitoring/net-snmp/CVE-2015-5621.patch
@@ -0,0 +1,132 @@
From 3714c5be3212d2af61545439eeb432e5d84a8d39 Mon Sep 17 00:00:00 2001

This comment has been minimized.

@Ericson2314

Ericson2314 Feb 6, 2018

Member

Can we not fetchPatch this?

@Ericson2314

Ericson2314 Feb 6, 2018

Member

Can we not fetchPatch this?

This comment has been minimized.

@dtzWill

dtzWill Feb 6, 2018

Contributor

I'll check. In general I preferred, mostly for convenience, to make local copies of patches.

This isn't the "Nixpkgs Way", I'll see what can be fetchpatch'd here and elsewhere.

@dtzWill

dtzWill Feb 6, 2018

Contributor

I'll check. In general I preferred, mostly for convenience, to make local copies of patches.

This isn't the "Nixpkgs Way", I'll see what can be fetchpatch'd here and elsewhere.

Show outdated Hide outdated pkgs/stdenv/linux/default.nix
@@ -95,7 +107,7 @@ let
# stdenv.glibc is used by GCC build to figure out the system-level
# /usr/include directory.
inherit (prevStage) glibc;
# inherit (prevStage) glibc;

This comment has been minimized.

@Ericson2314

Ericson2314 Feb 6, 2018

Member

Yay! stdenv.glibc is an awful attribute.

@Ericson2314

Ericson2314 Feb 6, 2018

Member

Yay! stdenv.glibc is an awful attribute.

This comment has been minimized.

@dtzWill

dtzWill Feb 6, 2018

Contributor

Yes! Very glad you agree. So far doesn't seem to be used for anything worthwhile.

@dtzWill

dtzWill Feb 6, 2018

Contributor

Yes! Very glad you agree. So far doesn't seem to be used for anything worthwhile.

Show outdated Hide outdated pkgs/stdenv/generic/default.nix
@@ -117,7 +117,8 @@ let
# Utility flags to test the type of platform.
inherit (hostPlatform)
isDarwin isLinux isSunOS isHurd isCygwin isFreeBSD isOpenBSD
isi686 isx86_64 is64bit isArm isAarch64 isMips isBigEndian;
isi686 isx86_64 is64bit isArm isAarch64 isMips isBigEndian
isMusl isGlibc;

This comment has been minimized.

@Ericson2314

Ericson2314 Feb 6, 2018

Member

I want to deprecate these in 18.03 to force people to think about cross. What do you think? If so, maybe we shouldn't add anymore here.

@Ericson2314

Ericson2314 Feb 6, 2018

Member

I want to deprecate these in 18.03 to force people to think about cross. What do you think? If so, maybe we shouldn't add anymore here.

This comment has been minimized.

@dtzWill

dtzWill Feb 6, 2018

Contributor

Works for me! I'll make a pass removing these. I do like having "isMusl" and "isGlibc"-- they're less error-prone than libc == "stringvalue". But accessing them from the appropriate platform (hostPlatform) sounds good to me.

@dtzWill

dtzWill Feb 6, 2018

Contributor

Works for me! I'll make a pass removing these. I do like having "isMusl" and "isGlibc"-- they're less error-prone than libc == "stringvalue". But accessing them from the appropriate platform (hostPlatform) sounds good to me.

Show outdated Hide outdated lib/systems/examples.nix
@@ -63,6 +63,18 @@ rec {
platform = platforms.fuloong2f_n32;
};
muslpi = (removeAttrs raspberryPi [ "libc" ]) // {

This comment has been minimized.

@Ericson2314

Ericson2314 Feb 8, 2018

Member

Err I meant literally remove libc from raspberryPi above. It should be inferred just fine!

@Ericson2314

Ericson2314 Feb 8, 2018

Member

Err I meant literally remove libc from raspberryPi above. It should be inferred just fine!

This comment has been minimized.

@dtzWill

dtzWill Feb 8, 2018

Contributor

Haha, sure thing. I agree that's nicer/cleaner, I just already feel I touch "unrelated" things in this PR and leaving existing examples as-is seemed easiest way to make it easy for reviewers to see I don't break them :).

Anyway, removed!

@dtzWill

dtzWill Feb 8, 2018

Contributor

Haha, sure thing. I agree that's nicer/cleaner, I just already feel I touch "unrelated" things in this PR and leaving existing examples as-is seemed easiest way to make it easy for reviewers to see I don't break them :).

Anyway, removed!

@dtzWill

This comment has been minimized.

Show comment
Hide comment
@dtzWill

dtzWill Feb 8, 2018

Contributor

Whoops rebasing onto master while targetting staging was a dumb idea. Will fix shortly.

Contributor

dtzWill commented Feb 8, 2018

Whoops rebasing onto master while targetting staging was a dumb idea. Will fix shortly.

Show outdated Hide outdated pkgs/development/compilers/gcc/5/default.nix
++ optional stdenv.cc.isClang ./libcxx38-and-above.patch;
++ optional stdenv.cc.isClang ./libcxx38-and-above.patch
++ optional stdenv.hostPlatform.isMusl (fetchpatch {
url = "https://raw.githubusercontent.com/richfelker/musl-cross-make/master/patches/gcc-5.3.0/0001-musl.diff";

This comment has been minimized.

@Mic92

Mic92 Feb 9, 2018

Contributor

Better to use a commit hash here, just to be sure.

@Mic92

Mic92 Feb 9, 2018

Contributor

Better to use a commit hash here, just to be sure.

This comment has been minimized.

@dtzWill

dtzWill Feb 9, 2018

Contributor

Good catch, agreed. Done!

@dtzWill

dtzWill Feb 9, 2018

Contributor

Good catch, agreed. Done!

@dtzWill dtzWill referenced this pull request Feb 11, 2018

Merged

lib/systems: musl "ABI"s, examples #34861

2 of 8 tasks complete
Show outdated Hide outdated pkgs/development/interpreters/python/cpython/2.7/default.nix
] ++ [
# Don't use pass host PYTHONPATH to build python
#./cross-compile.patch

This comment has been minimized.

@danbst

danbst Feb 12, 2018

Contributor

probably remove the patch then?

@danbst

danbst Feb 12, 2018

Contributor

probably remove the patch then?

This comment has been minimized.

@dtzWill

dtzWill Feb 12, 2018

Contributor

Good catch, thanks! Done!

@dtzWill

dtzWill Feb 12, 2018

Contributor

Good catch, thanks! Done!

@dtzWill

This comment has been minimized.

Show comment
Hide comment
@dtzWill

dtzWill Feb 13, 2018

Contributor
  • systemd update changed expression significantly, will resolve soon
  • am seeing stdenv retaining references it shouldn't, investigating now/first

EEP more investigation required but it appears "xz" currently contains reference to bootstrap tools on master (for glibc), at least when built with Nix 2.0 (although not sure if it's limited to that)!

Will create issue for this...

Contributor

dtzWill commented Feb 13, 2018

  • systemd update changed expression significantly, will resolve soon
  • am seeing stdenv retaining references it shouldn't, investigating now/first

EEP more investigation required but it appears "xz" currently contains reference to bootstrap tools on master (for glibc), at least when built with Nix 2.0 (although not sure if it's limited to that)!

Will create issue for this...

@dtzWill

This comment has been minimized.

Show comment
Hide comment
@dtzWill

dtzWill Feb 13, 2018

Contributor

Systemd 237 w/musl: WIP, may fix in followup instead

Bah systemd 237 is a pain, currently sorting what to do about its new use of glibc-only FTW_ACTIONRETVAL (and FTW_STOP): systemd/systemd@ed457f1#diff-3560f8a726af91387da20cfc878fea11 . We'll see...

Another gem, this time locally declaring functions specific to glibc internal implementation (not even exported by glbc's headers, not safe to rely on even with glibc):
systemd/systemd@5c30a6d#diff-4455c5d492b8b6c422f8c86c2929f861R942 . Maybe we can just call pthread_atfork on musl ?

Looks like might need to punt on systemd for this PR and revisit later :(.

Contributor

dtzWill commented Feb 13, 2018

Systemd 237 w/musl: WIP, may fix in followup instead

Bah systemd 237 is a pain, currently sorting what to do about its new use of glibc-only FTW_ACTIONRETVAL (and FTW_STOP): systemd/systemd@ed457f1#diff-3560f8a726af91387da20cfc878fea11 . We'll see...

Another gem, this time locally declaring functions specific to glibc internal implementation (not even exported by glbc's headers, not safe to rely on even with glibc):
systemd/systemd@5c30a6d#diff-4455c5d492b8b6c422f8c86c2929f861R942 . Maybe we can just call pthread_atfork on musl ?

Looks like might need to punt on systemd for this PR and revisit later :(.

@Mic92

This comment has been minimized.

Show comment
Hide comment
@Mic92

Mic92 Feb 13, 2018

Contributor

@dtzWill I am pretty sure systemd was never compatible with musl libc.

Contributor

Mic92 commented Feb 13, 2018

@dtzWill I am pretty sure systemd was never compatible with musl libc.

dtzWill added some commits Feb 13, 2018

nettle: cleanup cross changes
reviewer feedback + minor other things I noticed
while revisiting.
Show outdated Hide outdated pkgs/development/libraries/libbfd/default.nix
cd bfd
'';
nativeBuildInputs = [ autoreconfHook264 bison ];
buildInputs = [ libiberty zlib ];
configurePlatforms = [ "build" "host" ];

This comment has been minimized.

@Ericson2314

Ericson2314 Feb 13, 2018

Member

Err its still good to have these in all cases, I think. I'd do that for all autoconf-based packages if I could easily tell them apart.

@Ericson2314

Ericson2314 Feb 13, 2018

Member

Err its still good to have these in all cases, I think. I'd do that for all autoconf-based packages if I could easily tell them apart.

This comment has been minimized.

@dtzWill

dtzWill Feb 13, 2018

Contributor

Oh? Hmm sorry. I thought configurePlatforms was .. .oh, it's not set on cross is it? Okay I'll restore this.

@dtzWill

dtzWill Feb 13, 2018

Contributor

Oh? Hmm sorry. I thought configurePlatforms was .. .oh, it's not set on cross is it? Okay I'll restore this.

This comment has been minimized.

@Ericson2314

Ericson2314 Feb 13, 2018

Member

It gets set to that on cross, but I rather have it always set that way, for packages that support it. See the mkDerivation definition for this.

@Ericson2314

Ericson2314 Feb 13, 2018

Member

It gets set to that on cross, but I rather have it always set that way, for packages that support it. See the mkDerivation definition for this.

Show outdated Hide outdated pkgs/development/libraries/libbfd/default.nix
];
# We just want to build libbfd
postPatch = ''
postAutoreconf = ''

This comment has been minimized.

@Ericson2314

Ericson2314 Feb 13, 2018

Member

I'm not sure about this either? We are only building in the bfd subdirectory, so shouldn't need to autoreconf the outer stuff. I also don't think the hook is recursive and will properly descend either.

@Ericson2314

Ericson2314 Feb 13, 2018

Member

I'm not sure about this either? We are only building in the bfd subdirectory, so shouldn't need to autoreconf the outer stuff. I also don't think the hook is recursive and will properly descend either.

This comment has been minimized.

@dtzWill

dtzWill Feb 13, 2018

Contributor

Hmm I'll look into this. FWIW the update hook is recursive: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/setup-hooks/update-autotools-gnu-config-scripts.sh .

And unpacking binutils it appears config.guess and config.sub are at the top-level, not in the bfd directory, which is why it's important for the update to happen at the top-level.

(FWIW the problem this fixes is configure complaining it doesn't recognize the platform)

I think what we'd ideally do is this:

  • update hook runs at top-level, first
  • autoreconf happens, in bfd directory

It appears the hooks are both added to preConfigurePhases, with the update happening after autoreconf which is unfortunate. Lemme see..

@dtzWill

dtzWill Feb 13, 2018

Contributor

Hmm I'll look into this. FWIW the update hook is recursive: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/setup-hooks/update-autotools-gnu-config-scripts.sh .

And unpacking binutils it appears config.guess and config.sub are at the top-level, not in the bfd directory, which is why it's important for the update to happen at the top-level.

(FWIW the problem this fixes is configure complaining it doesn't recognize the platform)

I think what we'd ideally do is this:

  • update hook runs at top-level, first
  • autoreconf happens, in bfd directory

It appears the hooks are both added to preConfigurePhases, with the update happening after autoreconf which is unfortunate. Lemme see..

dtzWill added some commits Feb 13, 2018

libbfd: manually update config.guess/config.sub
Workaround for building "from" the bfd directory but needing
to update files a level above.

This needs to be done *after* autoreconf since autoreconf
will replace these itself, apparently.
ruby: don't reference groff if not being used (not used by default)
Fixes cross build by removing false dependency.

If this is needed again, be careful about *which* "groff" is needed.
(which in terms of build vs host)

@Ericson2314 Ericson2314 merged commit a267ae4 into NixOS:staging Feb 13, 2018

8 checks passed

grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-nixos-manual nix-instantiate ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env --file . --query --available --json
Details

@Ericson2314 Ericson2314 added this to @bgamari's numerous fixes in Cross compilation Feb 13, 2018

@dezgeg

This comment has been minimized.

Show comment
Hide comment
@dezgeg

dezgeg Feb 13, 2018

Contributor

I think you could instead move the cd bfd so that it happens after updateAutotoolsGnuConfigScriptsPhase.

Also, does this package really need autoreconfHook264 nowadays instead of a recent version? Maybe that's enough to fix it.

Contributor

dezgeg commented on pkgs/development/libraries/libbfd/default.nix in 767bddb Feb 13, 2018

I think you could instead move the cd bfd so that it happens after updateAutotoolsGnuConfigScriptsPhase.

Also, does this package really need autoreconfHook264 nowadays instead of a recent version? Maybe that's enough to fix it.

This comment has been minimized.

Show comment
Hide comment
@dtzWill

dtzWill Feb 13, 2018

Contributor

Yes re:needing that specific autotools-- it complains loudly if anything other than that exact version is used :(.

Not sure there's a good way to do what you said, if you have something that works let me know!

Contributor

dtzWill replied Feb 13, 2018

Yes re:needing that specific autotools-- it complains loudly if anything other than that exact version is used :(.

Not sure there's a good way to do what you said, if you have something that works let me know!

This comment has been minimized.

Show comment
Hide comment
@dezgeg

dezgeg Feb 13, 2018

Contributor

Meh.

I guess we could make all autoconf versions copy the recent version of config.sub and config.guess from gnu-config instead of the version that they vendor in?

Contributor

dezgeg replied Feb 13, 2018

Meh.

I guess we could make all autoconf versions copy the recent version of config.sub and config.guess from gnu-config instead of the version that they vendor in?

This comment has been minimized.

Show comment
Hide comment
@dezgeg
Contributor

dezgeg replied Feb 14, 2018

@Ericson2314 Ericson2314 referenced this pull request Feb 14, 2018

Open

[RFC] A large batch of cross-compilation fixes #30882

0 of 8 tasks complete
@vcunat

This comment has been minimized.

Show comment
Hide comment
@vcunat

vcunat Feb 18, 2018

Member

FYI, I just noticed that some of the new musl stuff won't build with gcc-7, e.g. https://hydra.nixos.org/build/69495411

Member

vcunat commented Feb 18, 2018

FYI, I just noticed that some of the new musl stuff won't build with gcc-7, e.g. https://hydra.nixos.org/build/69495411

@dtzWill

This comment has been minimized.

Show comment
Hide comment
@dtzWill

dtzWill Feb 19, 2018

Contributor

Can you try if staging...dezgeg:upgrade-autoconf111-config-scripts works?

This doesn't fix the issue for me, does it for you? This is what I get:

@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/qhhhmq6aj185lfs2x3sas708h23g5pml-binutils-2.28.1.tar.bz2
source root is binutils-2.28.1
setting SOURCE_DATE_EPOCH to timestamp 1500992977 of file binutils-2.28.1/md5.sum
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
applying patch /nix/store/q9pypsrw5slh7m607scrbx7y6bbn01bl-new-dtags.patch
patching file ld/ldmain.c
Hunk #1 succeeded at 280 with fuzz 1 (offset -16 lines).
applying patch /nix/store/wy1lrg34fw2f1msbiws3b60n8wmg8rvn-dtneeded.patch
patching file ld/ldmain.c
Hunk #1 succeeded at 310 with fuzz 1 (offset 12 lines).
applying patch /nix/store/sqbhaaayam0xw3a3164ks1vvbrdhl9vq-deterministic.patch
patching file ld/ldlang.c
Hunk #1 succeeded at 3199 with fuzz 1 (offset 104 lines).
applying patch /nix/store/warg8i0kjfr2hkc3lz3kwfgj9q8hvny3-pt-pax-flags.patch
patching file bfd/elf-bfd.h
Hunk #1 succeeded at 1785 with fuzz 2 (offset 519 lines).
patching file bfd/elf.c
Hunk #1 succeeded at 1546 (offset 461 lines).
Hunk #2 succeeded at 3010 (offset 663 lines).
Hunk #3 succeeded at 4301 (offset 971 lines).
Hunk #4 succeeded at 4967 with fuzz 2 (offset 1013 lines).
Hunk #5 succeeded at 6488 (offset 1336 lines).
Hunk #6 succeeded at 6498 with fuzz 2 (offset 1336 lines).
patching file bfd/elflink.c
Hunk #1 succeeded at 5919 with fuzz 1 (offset 155 lines).
Hunk #2 succeeded at 5958 (offset 155 lines).
patching file binutils/readelf.c
Hunk #1 succeeded at 3779 (offset 1486 lines).
patching file include/bfdlink.h
Hunk #1 succeeded at 379 with fuzz 2 (offset 66 lines).
patching file include/elf/common.h
Hunk #1 succeeded at 465 (offset 42 lines).
Hunk #2 succeeded at 476 (offset 42 lines).
patching file ld/emultempl/elf32.em
Hunk #1 succeeded at 2565 with fuzz 1 (offset 426 lines).
patching file ld/ldgram.y
Hunk #1 succeeded at 1244 (offset 171 lines).
patching file ld/lexsup.c
Hunk #1 succeeded at 1819 (offset 26 lines).
applying patch /nix/store/jxhica5y04jd182c2b3xzap31ixxplw2-no-plugins.patch
patching file bfd/plugin.c
Hunk #1 succeeded at 334 (offset 1 line).
Hunk #2 succeeded at 366 (offset 1 line).
applying patch /nix/store/wilglaz00r3zpqy6j5awrzia446lzmk9-disambiguate-arm-targets.patch
patching file bfd/elf32-arm.c
applying patch /nix/store/pa83jbilxjpv5d4f62l3as4wg2fri7r7-always-search-rpath.patch
patching file ld/genscripts.sh
applying patch /nix/store/wlh3fqr3k9wrymvg83y3xi3dvqkwmca1-build-components-separately.patch
patching file bfd/configure.ac
patching file opcodes/Makefile.am
patching file opcodes/configure.ac
applying patch /nix/store/s3z9xjfl3ppms5m33j0pyrq07280l93c-bfd-1-disable-subdir-doc.patch
patching file bfd/Makefile.am
patching file bfd/Makefile.in
Hunk #1 succeeded at 371 (offset 32 lines).
@nix { "action": "setPhase", "phase": "autoreconfPhase" }
autoreconfPhase
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I . -I .. -I ../config
main::scan_file() called too early to check prototype at /nix/store/2zniw2qmqxzy5kjwxs5z79qyn3jkp3sv-automake-1.11.6/bin/.aclocal-wrapped line 644.
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '..'.
libtoolize: copying file '../ltmain.sh'
libtoolize: putting macros in '.'.
libtoolize: copying file './libtool.m4'
libtoolize: copying file './ltoptions.m4'
libtoolize: copying file './ltsugar.m4'
libtoolize: copying file './ltversion.m4'
libtoolize: copying file './lt~obsolete.m4'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
main::scan_file() called too early to check prototype at /nix/store/2zniw2qmqxzy5kjwxs5z79qyn3jkp3sv-automake-1.11.6/bin/.aclocal-wrapped line 644.
autoreconf: running: /nix/store/3hb5j83il656vpf9rzf014n0fln4f703-autoconf-2.64/bin/autoconf --force
autoreconf: running: /nix/store/3hb5j83il656vpf9rzf014n0fln4f703-autoconf-2.64/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at /nix/store/2zniw2qmqxzy5kjwxs5z79qyn3jkp3sv-automake-1.11.6/bin/automake line 4159.
configure.ac:28: installing `../missing'
Makefile.am: installing `../depcomp'
autoreconf: Leaving directory `.'
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
configure flags: --disable-static --disable-dependency-tracking --prefix=/nix/store/x4m3bfn4a16z5ym0s176lgdjz789mq30-libbfd-2.28.1 --bindir=/nix/store/x4m3bfn4a16z5ym0s176lgdjz789mq30-libbfd-2.28.1/bin --sbindir=/nix/store/x4m3bfn4a16z5ym0s176lgdjz789mq30-libbfd-2.28.1/sbin --includedir=/nix/store/48w6c91d47fhhpjp3s9165pxhiqlh0kk-libbfd-2.28.1-dev/include --oldincludedir=/nix/store/48w6c91d47fhhpjp3s9165pxhiqlh0kk-libbfd-2.28.1-dev/include --mandir=/nix/store/x4m3bfn4a16z5ym0s176lgdjz789mq30-libbfd-2.28.1/share/man --infodir=/nix/store/x4m3bfn4a16z5ym0s176lgdjz789mq30-libbfd-2.28.1/share/info --docdir=/nix/store/x4m3bfn4a16z5ym0s176lgdjz789mq30-libbfd-2.28.1/share/doc/libbfd --libdir=/nix/store/x4m3bfn4a16z5ym0s176lgdjz789mq30-libbfd-2.28.1/lib --libexecdir=/nix/store/x4m3bfn4a16z5ym0s176lgdjz789mq30-libbfd-2.28.1/libexec --localedir=/nix/store/x4m3bfn4a16z5ym0s176lgdjz789mq30-libbfd-2.28.1/share/locale --enable-targets=all --enable-64-bit-bfd --enable-install-libbfd --enable-shared --with-system-zlib --build=x86_64-unknown-linux-musl --host=x86_64-unknown-linux-musl
checking build system type... Invalid configuration `x86_64-unknown-linux-musl': machine `x86_64-unknown-linux' not recognized
configure: error: /nix/store/qlyk4p97g9lc6dxwjkqb0ilbi0dm8lqv-bash-4.4-p12/bin/bash ./../config.sub x86_64-unknown-linux-musl failed
Contributor

dtzWill commented Feb 19, 2018

Can you try if staging...dezgeg:upgrade-autoconf111-config-scripts works?

This doesn't fix the issue for me, does it for you? This is what I get:

@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/qhhhmq6aj185lfs2x3sas708h23g5pml-binutils-2.28.1.tar.bz2
source root is binutils-2.28.1
setting SOURCE_DATE_EPOCH to timestamp 1500992977 of file binutils-2.28.1/md5.sum
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
applying patch /nix/store/q9pypsrw5slh7m607scrbx7y6bbn01bl-new-dtags.patch
patching file ld/ldmain.c
Hunk #1 succeeded at 280 with fuzz 1 (offset -16 lines).
applying patch /nix/store/wy1lrg34fw2f1msbiws3b60n8wmg8rvn-dtneeded.patch
patching file ld/ldmain.c
Hunk #1 succeeded at 310 with fuzz 1 (offset 12 lines).
applying patch /nix/store/sqbhaaayam0xw3a3164ks1vvbrdhl9vq-deterministic.patch
patching file ld/ldlang.c
Hunk #1 succeeded at 3199 with fuzz 1 (offset 104 lines).
applying patch /nix/store/warg8i0kjfr2hkc3lz3kwfgj9q8hvny3-pt-pax-flags.patch
patching file bfd/elf-bfd.h
Hunk #1 succeeded at 1785 with fuzz 2 (offset 519 lines).
patching file bfd/elf.c
Hunk #1 succeeded at 1546 (offset 461 lines).
Hunk #2 succeeded at 3010 (offset 663 lines).
Hunk #3 succeeded at 4301 (offset 971 lines).
Hunk #4 succeeded at 4967 with fuzz 2 (offset 1013 lines).
Hunk #5 succeeded at 6488 (offset 1336 lines).
Hunk #6 succeeded at 6498 with fuzz 2 (offset 1336 lines).
patching file bfd/elflink.c
Hunk #1 succeeded at 5919 with fuzz 1 (offset 155 lines).
Hunk #2 succeeded at 5958 (offset 155 lines).
patching file binutils/readelf.c
Hunk #1 succeeded at 3779 (offset 1486 lines).
patching file include/bfdlink.h
Hunk #1 succeeded at 379 with fuzz 2 (offset 66 lines).
patching file include/elf/common.h
Hunk #1 succeeded at 465 (offset 42 lines).
Hunk #2 succeeded at 476 (offset 42 lines).
patching file ld/emultempl/elf32.em
Hunk #1 succeeded at 2565 with fuzz 1 (offset 426 lines).
patching file ld/ldgram.y
Hunk #1 succeeded at 1244 (offset 171 lines).
patching file ld/lexsup.c
Hunk #1 succeeded at 1819 (offset 26 lines).
applying patch /nix/store/jxhica5y04jd182c2b3xzap31ixxplw2-no-plugins.patch
patching file bfd/plugin.c
Hunk #1 succeeded at 334 (offset 1 line).
Hunk #2 succeeded at 366 (offset 1 line).
applying patch /nix/store/wilglaz00r3zpqy6j5awrzia446lzmk9-disambiguate-arm-targets.patch
patching file bfd/elf32-arm.c
applying patch /nix/store/pa83jbilxjpv5d4f62l3as4wg2fri7r7-always-search-rpath.patch
patching file ld/genscripts.sh
applying patch /nix/store/wlh3fqr3k9wrymvg83y3xi3dvqkwmca1-build-components-separately.patch
patching file bfd/configure.ac
patching file opcodes/Makefile.am
patching file opcodes/configure.ac
applying patch /nix/store/s3z9xjfl3ppms5m33j0pyrq07280l93c-bfd-1-disable-subdir-doc.patch
patching file bfd/Makefile.am
patching file bfd/Makefile.in
Hunk #1 succeeded at 371 (offset 32 lines).
@nix { "action": "setPhase", "phase": "autoreconfPhase" }
autoreconfPhase
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I . -I .. -I ../config
main::scan_file() called too early to check prototype at /nix/store/2zniw2qmqxzy5kjwxs5z79qyn3jkp3sv-automake-1.11.6/bin/.aclocal-wrapped line 644.
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '..'.
libtoolize: copying file '../ltmain.sh'
libtoolize: putting macros in '.'.
libtoolize: copying file './libtool.m4'
libtoolize: copying file './ltoptions.m4'
libtoolize: copying file './ltsugar.m4'
libtoolize: copying file './ltversion.m4'
libtoolize: copying file './lt~obsolete.m4'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
main::scan_file() called too early to check prototype at /nix/store/2zniw2qmqxzy5kjwxs5z79qyn3jkp3sv-automake-1.11.6/bin/.aclocal-wrapped line 644.
autoreconf: running: /nix/store/3hb5j83il656vpf9rzf014n0fln4f703-autoconf-2.64/bin/autoconf --force
autoreconf: running: /nix/store/3hb5j83il656vpf9rzf014n0fln4f703-autoconf-2.64/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at /nix/store/2zniw2qmqxzy5kjwxs5z79qyn3jkp3sv-automake-1.11.6/bin/automake line 4159.
configure.ac:28: installing `../missing'
Makefile.am: installing `../depcomp'
autoreconf: Leaving directory `.'
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
configure flags: --disable-static --disable-dependency-tracking --prefix=/nix/store/x4m3bfn4a16z5ym0s176lgdjz789mq30-libbfd-2.28.1 --bindir=/nix/store/x4m3bfn4a16z5ym0s176lgdjz789mq30-libbfd-2.28.1/bin --sbindir=/nix/store/x4m3bfn4a16z5ym0s176lgdjz789mq30-libbfd-2.28.1/sbin --includedir=/nix/store/48w6c91d47fhhpjp3s9165pxhiqlh0kk-libbfd-2.28.1-dev/include --oldincludedir=/nix/store/48w6c91d47fhhpjp3s9165pxhiqlh0kk-libbfd-2.28.1-dev/include --mandir=/nix/store/x4m3bfn4a16z5ym0s176lgdjz789mq30-libbfd-2.28.1/share/man --infodir=/nix/store/x4m3bfn4a16z5ym0s176lgdjz789mq30-libbfd-2.28.1/share/info --docdir=/nix/store/x4m3bfn4a16z5ym0s176lgdjz789mq30-libbfd-2.28.1/share/doc/libbfd --libdir=/nix/store/x4m3bfn4a16z5ym0s176lgdjz789mq30-libbfd-2.28.1/lib --libexecdir=/nix/store/x4m3bfn4a16z5ym0s176lgdjz789mq30-libbfd-2.28.1/libexec --localedir=/nix/store/x4m3bfn4a16z5ym0s176lgdjz789mq30-libbfd-2.28.1/share/locale --enable-targets=all --enable-64-bit-bfd --enable-install-libbfd --enable-shared --with-system-zlib --build=x86_64-unknown-linux-musl --host=x86_64-unknown-linux-musl
checking build system type... Invalid configuration `x86_64-unknown-linux-musl': machine `x86_64-unknown-linux' not recognized
configure: error: /nix/store/qlyk4p97g9lc6dxwjkqb0ilbi0dm8lqv-bash-4.4-p12/bin/bash ./../config.sub x86_64-unknown-linux-musl failed
@dtzWill

This comment has been minimized.

Show comment
Hide comment
@dtzWill

dtzWill Feb 19, 2018

Contributor

FYI, I just noticed that some of the new musl stuff won't build with gcc-7, e.g. https://hydra.nixos.org/build/69495411

AFAICT this happens on gcc6 as well, perhaps on all non-musl. Not sure there's much to be done about this, at least for now--I think @Ericson2314 has a PR that'd let us express that this is not meant for non-musl systems...?

Contributor

dtzWill commented Feb 19, 2018

FYI, I just noticed that some of the new musl stuff won't build with gcc-7, e.g. https://hydra.nixos.org/build/69495411

AFAICT this happens on gcc6 as well, perhaps on all non-musl. Not sure there's much to be done about this, at least for now--I think @Ericson2314 has a PR that'd let us express that this is not meant for non-musl systems...?

@vcunat

This comment has been minimized.

Show comment
Hide comment
@vcunat

vcunat Feb 19, 2018

Member

Oh, right, I looked wrong, into still-failing instead of newly-failing.

Member

vcunat commented Feb 19, 2018

Oh, right, I looked wrong, into still-failing instead of newly-failing.

@dtzWill dtzWill referenced this pull request Feb 19, 2018

Merged

llvmPackages_{4,5}: musl compat #35195

4 of 8 tasks complete
@edolstra

This comment has been minimized.

Show comment
Hide comment
@edolstra

edolstra Feb 19, 2018

Member

I'm really not in favour of adding musl support to Nixpkgs. Adding support for non-standard libcs is a major undertaking. From my experience with dietlibc and klibc, it will require patches everywhere, which is maintenance nightmare, for no discernable advantage.

Since this is a major expansion of the scope of Nixpkgs, a decision on whether to add support for other libcs should really be done via the RFC process.

Member

edolstra commented Feb 19, 2018

I'm really not in favour of adding musl support to Nixpkgs. Adding support for non-standard libcs is a major undertaking. From my experience with dietlibc and klibc, it will require patches everywhere, which is maintenance nightmare, for no discernable advantage.

Since this is a major expansion of the scope of Nixpkgs, a decision on whether to add support for other libcs should really be done via the RFC process.

@dtzWill

This comment has been minimized.

Show comment
Hide comment
@dtzWill

dtzWill Feb 20, 2018

Contributor

First pass at putting together an RFC for musl: NixOS/rfcs#23

WIP, looking for early feedback and any and all willing to serve as co-authors of the RFC.

Contributor

dtzWill commented Feb 20, 2018

First pass at putting together an RFC for musl: NixOS/rfcs#23

WIP, looking for early feedback and any and all willing to serve as co-authors of the RFC.

@oxij

This comment has been minimized.

Show comment
Hide comment
@oxij

oxij Feb 20, 2018

Contributor
Contributor

oxij commented Feb 20, 2018

@Ericson2314

This comment has been minimized.

Show comment
Hide comment
@Ericson2314

Ericson2314 Feb 20, 2018

Member

What is SNLOS, btw?

Member

Ericson2314 commented Feb 20, 2018

What is SNLOS, btw?

@7c6f434c

This comment has been minimized.

Show comment
Hide comment
@7c6f434c

7c6f434c Feb 20, 2018

Member

@Ericson2314 https://github.com/SLNOS/nixpkgs — a NixOS external branch with suckless.org influences

Member

7c6f434c commented Feb 20, 2018

@Ericson2314 https://github.com/SLNOS/nixpkgs — a NixOS external branch with suckless.org influences

@oxij

This comment has been minimized.

Show comment
Hide comment
@oxij

oxij Feb 20, 2018

Contributor
Contributor

oxij commented Feb 20, 2018

@xeji

This comment has been minimized.

Show comment
Hide comment
@xeji

xeji Apr 5, 2018

Contributor

@dtzWill hydra builds of musl-getconf and musl-getent have failed for a while on master and 18.03. Should we mark these as broken for 18.03 ?

Contributor

xeji commented Apr 5, 2018

@dtzWill hydra builds of musl-getconf and musl-getent have failed for a while on master and 18.03. Should we mark these as broken for 18.03 ?

@dtzWill

This comment has been minimized.

Show comment
Hide comment
@dtzWill

dtzWill Apr 5, 2018

Contributor

Haha sorry, and no. They just are only meant to be used with a musl stdenv, where they work fine.

Should probably set meta.platforms appropriately, we couldn't do this before.

Contributor

dtzWill commented Apr 5, 2018

Haha sorry, and no. They just are only meant to be used with a musl stdenv, where they work fine.

Should probably set meta.platforms appropriately, we couldn't do this before.

@Ericson2314

This comment has been minimized.

Show comment
Hide comment
@Ericson2314

Ericson2314 Apr 5, 2018

Member

#37337 will make meta.platforms work on 18.03 too, so we should merge that then.

Member

Ericson2314 commented Apr 5, 2018

#37337 will make meta.platforms work on 18.03 too, so we should merge that then.

@Ericson2314 Ericson2314 referenced this pull request Apr 5, 2018

Merged

lib: Fix #30902 on 18.03 #37337

0 of 8 tasks complete
@matthewbauer

This comment has been minimized.

Show comment
Hide comment
@matthewbauer

matthewbauer Apr 10, 2018

Member

I didn't realize this was here! Really quick, would this work in Glibc as well? Ideally we'll want to use this for all Linuxes (see top-level/unix-tools.nix in staging).

Member

matthewbauer commented on b12a7c9 Apr 10, 2018

I didn't realize this was here! Really quick, would this work in Glibc as well? Ideally we'll want to use this for all Linuxes (see top-level/unix-tools.nix in staging).

This comment has been minimized.

Show comment
Hide comment
@matthewbauer

matthewbauer Apr 10, 2018

Member

Also could we get these directly from NetBSD? (I can make a PR for this)

Member

matthewbauer replied Apr 10, 2018

Also could we get these directly from NetBSD? (I can make a PR for this)

This comment has been minimized.

Show comment
Hide comment
@dtzWill

dtzWill Apr 11, 2018

Contributor

Also could we get these directly from NetBSD? (I can make a PR for this)

Yes please!

Contributor

dtzWill replied Apr 11, 2018

Also could we get these directly from NetBSD? (I can make a PR for this)

Yes please!

@matthewbauer

This comment has been minimized.

Show comment
Hide comment
@matthewbauer

matthewbauer May 1, 2018

Member

Can you open an issue in https://github.com/nixos/patchelf ?

Member

matthewbauer commented on c0d343b May 1, 2018

Can you open an issue in https://github.com/nixos/patchelf ?

This comment has been minimized.

Show comment
Hide comment
@dtzWill

dtzWill May 1, 2018

Contributor

Good call, just did! Thanks!

Contributor

dtzWill replied May 1, 2018

Good call, just did! Thanks!

@orivej

This comment has been minimized.

Show comment
Hide comment
@orivej

orivej Jun 10, 2018

Contributor

@dtzWill, why did you add libiconv to propagatedBuildInputs of SDL2 rather than to its buildInputs?

Contributor

orivej commented Jun 10, 2018

@dtzWill, why did you add libiconv to propagatedBuildInputs of SDL2 rather than to its buildInputs?

@dtzWill

This comment has been minimized.

Show comment
Hide comment
@dtzWill

dtzWill Jun 10, 2018

Contributor

@orivej in my tree I found builds using SDL needed iconv so I figured it was supposed to be propagated (or "part of libc/stdenv"). Why, is this causing problems/unexpected?

Contributor

dtzWill commented Jun 10, 2018

@orivej in my tree I found builds using SDL needed iconv so I figured it was supposed to be propagated (or "part of libc/stdenv"). Why, is this causing problems/unexpected?

@dtzWill

This comment has been minimized.

Show comment
Hide comment
@dtzWill

dtzWill Jun 10, 2018

Contributor

(I was using the full gnu libiconv, not what's available in musl which I think is what we're doing on master currently).

Contributor

dtzWill commented Jun 10, 2018

(I was using the full gnu libiconv, not what's available in musl which I think is what we're doing on master currently).

@nh2

This comment has been minimized.

Show comment
Hide comment
@nh2

nh2 Jun 12, 2018

Contributor

@dtzWill Can you explain a bit how to use this?

You have a "Quickstart with Binary Cache" section but I can't figure out what to configure in nix to actually use musl for everything.

Contributor

nh2 commented Jun 12, 2018

@dtzWill Can you explain a bit how to use this?

You have a "Quickstart with Binary Cache" section but I can't figure out what to configure in nix to actually use musl for everything.

@orivej

This comment has been minimized.

Show comment
Hide comment
@orivej

orivej Jun 12, 2018

Contributor

@dtzWill I'm reworking SDL2 to fix #41620. It propagates many derivations that it should not, and one of those seems to be libiconv, so I asked to double check myself.

Contributor

orivej commented Jun 12, 2018

@dtzWill I'm reworking SDL2 to fix #41620. It propagates many derivations that it should not, and one of those seems to be libiconv, so I asked to double check myself.

@nh2 nh2 referenced this pull request Jun 13, 2018

Closed

Fully static linking #6

@nh2

This comment has been minimized.

Show comment
Hide comment
@nh2

nh2 Jun 13, 2018

Contributor

Hey, just want to let you know that with the work in here I've managed to build some fully static Haskell executables! https://github.com/nh2/static-haskell-nix

Contributor

nh2 commented Jun 13, 2018

Hey, just want to let you know that with the work in here I've managed to build some fully static Haskell executables! https://github.com/nh2/static-haskell-nix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment