Skip to content
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

Make "localizations" sane again #37012

Merged
merged 15 commits into from Mar 23, 2018
Merged

Conversation

matthewbauer
Copy link
Member

@matthewbauer matthewbauer commented Mar 14, 2018

Motivation for this change

This is a fairly big PR, so I'll list out what it does:

  • deprecate "libintlOrEmpty". This was an ugly name for an attribute. Instead you can just use "libintl" which is an alias to gettext when libc != glibc. It now acts similarly to "libiconv" and you can add it to any derivation needing libintl (no need to use stdenv.isDarwin anymore!)
  • adds setup-hook to gettext to add "-lintl" to LDFLAGS
  • adds setup-hook to iconv to add "-liconv" to LDFLAGS
  • removes all of the hacks adding "-liconv" and "-lintl", treewide

I'm interested in comments on whether this is a good idea!

/cc @Ericson2314 @LnL7 @copumpkin @NixOS/darwin-maintainers

@matthewbauer
Copy link
Member Author

@GrahamcOfBorg eval

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: gettext, libiconv

Partial log (click to expand)

cannot build derivation '/nix/store/wi9hlarrigqwww4grplsnz5g0nsjh6z4-diffutils-3.6.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/mqqc508gyxv3l0y16szb0qz7wm8mwvhj-ed-1.14.2.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/anlnl09bv7r98qb8b6kh3rahczs8596q-findutils-4.6.0.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/598csxjgxxcys0aw9l7032w1xfpqi8k4-gcc-wrapper-7.3.0.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/7zbfjb02sbcjxl7knfhvdsppg085lzm3-patch-2.7.6.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/5n15lfxd58nlkfj0aimqj4m5qbygwyvs-stdenv-linux.drv': 25 dependencies couldn't be built
cannot build derivation '/nix/store/jp0xj8plhpjpmn6pnv60vwxahn7brw74-stdenv-linux.drv': 25 dependencies couldn't be built
cannot build derivation '/nix/store/ikdnsi6v05fq7mfbzzd669rd56x0vmv1-gettext-0.19.8.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/r6wwlk30m79g91xgkgx0a2ylk65pigis-glibc-iconv-2.26-131.drv': 2 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/ikdnsi6v05fq7mfbzzd669rd56x0vmv1-gettext-0.19.8.drv', '/nix/store/r6wwlk30m79g91xgkgx0a2ylk65pigis-glibc-iconv-2.26-131.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: gettext, libiconv

Partial log (click to expand)

cannot build derivation '/nix/store/wi9hlarrigqwww4grplsnz5g0nsjh6z4-diffutils-3.6.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/mqqc508gyxv3l0y16szb0qz7wm8mwvhj-ed-1.14.2.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/anlnl09bv7r98qb8b6kh3rahczs8596q-findutils-4.6.0.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/598csxjgxxcys0aw9l7032w1xfpqi8k4-gcc-wrapper-7.3.0.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/7zbfjb02sbcjxl7knfhvdsppg085lzm3-patch-2.7.6.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/5n15lfxd58nlkfj0aimqj4m5qbygwyvs-stdenv-linux.drv': 25 dependencies couldn't be built
cannot build derivation '/nix/store/jp0xj8plhpjpmn6pnv60vwxahn7brw74-stdenv-linux.drv': 25 dependencies couldn't be built
cannot build derivation '/nix/store/ikdnsi6v05fq7mfbzzd669rd56x0vmv1-gettext-0.19.8.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/r6wwlk30m79g91xgkgx0a2ylk65pigis-glibc-iconv-2.26-131.drv': 2 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/ikdnsi6v05fq7mfbzzd669rd56x0vmv1-gettext-0.19.8.drv', '/nix/store/r6wwlk30m79g91xgkgx0a2ylk65pigis-glibc-iconv-2.26-131.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: gettext, libiconv

Partial log (click to expand)

cannot build derivation ‘/nix/store/jk1zz0s15yycck554d9r4yhmgs7i582g-diffutils-3.6.drv’: 3 dependencies couldn't be built
cannot build derivation ‘/nix/store/laz9k81r1k792rjzpmmb0y1yw3xqsc8s-ed-1.14.2.drv’: 2 dependencies couldn't be built
cannot build derivation ‘/nix/store/hn6zshz3xr72lk7hlxba1aah6414ybci-findutils-4.6.0.drv’: 2 dependencies couldn't be built
cannot build derivation ‘/nix/store/7fmzxrzc8h167q0fr5vnh6v8aina1plx-gcc-wrapper-7.3.0.drv’: 5 dependencies couldn't be built
cannot build derivation ‘/nix/store/dk98y3argxkb7gm4i0pk7aiqvw2ya3fy-patch-2.7.6.drv’: 2 dependencies couldn't be built
cannot build derivation ‘/nix/store/j2h5059p7i6jbqd3zbbf5zyl2wdm1gp2-stdenv-linux.drv’: 23 dependencies couldn't be built
cannot build derivation ‘/nix/store/qfas4r6j6bqsvqpjfmcybavzgh4ikwk4-stdenv-linux.drv’: 23 dependencies couldn't be built
cannot build derivation ‘/nix/store/nk9lgv621rkq31lc1hwj0kr56qba5y3a-gettext-0.19.8.drv’: 3 dependencies couldn't be built
cannot build derivation ‘/nix/store/8ypdk4zdxm2qbm9pp1xq4l9377h8ih5l-glibc-iconv-2.26-131.drv’: 2 dependencies couldn't be built
error: build of ‘/nix/store/8ypdk4zdxm2qbm9pp1xq4l9377h8ih5l-glibc-iconv-2.26-131.drv’, ‘/nix/store/nk9lgv621rkq31lc1hwj0kr56qba5y3a-gettext-0.19.8.drv’ failed

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: gettext, libiconv

Partial log (click to expand)

cannot build derivation ‘/nix/store/jk1zz0s15yycck554d9r4yhmgs7i582g-diffutils-3.6.drv’: 3 dependencies couldn't be built
cannot build derivation ‘/nix/store/laz9k81r1k792rjzpmmb0y1yw3xqsc8s-ed-1.14.2.drv’: 2 dependencies couldn't be built
cannot build derivation ‘/nix/store/hn6zshz3xr72lk7hlxba1aah6414ybci-findutils-4.6.0.drv’: 2 dependencies couldn't be built
cannot build derivation ‘/nix/store/7fmzxrzc8h167q0fr5vnh6v8aina1plx-gcc-wrapper-7.3.0.drv’: 5 dependencies couldn't be built
cannot build derivation ‘/nix/store/dk98y3argxkb7gm4i0pk7aiqvw2ya3fy-patch-2.7.6.drv’: 2 dependencies couldn't be built
cannot build derivation ‘/nix/store/j2h5059p7i6jbqd3zbbf5zyl2wdm1gp2-stdenv-linux.drv’: 23 dependencies couldn't be built
cannot build derivation ‘/nix/store/qfas4r6j6bqsvqpjfmcybavzgh4ikwk4-stdenv-linux.drv’: 23 dependencies couldn't be built
cannot build derivation ‘/nix/store/nk9lgv621rkq31lc1hwj0kr56qba5y3a-gettext-0.19.8.drv’: 3 dependencies couldn't be built
cannot build derivation ‘/nix/store/8ypdk4zdxm2qbm9pp1xq4l9377h8ih5l-glibc-iconv-2.26-131.drv’: 2 dependencies couldn't be built
error: build of ‘/nix/store/8ypdk4zdxm2qbm9pp1xq4l9377h8ih5l-glibc-iconv-2.26-131.drv’, ‘/nix/store/nk9lgv621rkq31lc1hwj0kr56qba5y3a-gettext-0.19.8.drv’ failed

@Ericson2314
Copy link
Member

Something like this is definitely the right step! Have you seen the glibcLibiconv attribute btw? Also musl I think needs separate libiconv.

@Ericson2314
Copy link
Member

I still want to find a way to build glibc without libiconv too to help be less conditional about this. I'm less famailiar with the gettext aspect, but yeah probably the same dream.

@Ericson2314 Ericson2314 requested a review from shlevy March 14, 2018 21:46
@matthewbauer
Copy link
Member Author

matthewbauer commented Mar 14, 2018

Yep removing 'libiconv' and 'libintl' from GCC will make GCC much more "normal". The problem is that lots of packages assume that you are building with GCC and so the '-liconv' or '-lintl' are not given. We shouldn't have to add specific libraries in a setup-hook under normal circumstances but this seems like an okay case given the Linux world's long legacy of GCC dependency.

Any ideas on what the failure on Linux is? I suspect GCC doesn't like being given "-liconv" or "-lintl" even though it should have them baked in.

Also musl I think needs separate libiconv

Right now libiconv is provided I think as long as libc != glibc. I think that should cover Musl but haven't tested it.

@dtzWill
Copy link
Member

dtzWill commented Mar 14, 2018

Teehee, looks like you found the problem? 😁

@dtzWill
Copy link
Member

dtzWill commented Mar 14, 2018

This is great, very much approve :1:.

@matthewbauer
Copy link
Member Author

@GrahamcOfBorg build libelf

@GrahamcOfBorg
Copy link

No attempt on x86_64-linux

The following builds were skipped because they don't evaluate on x86_64-linux: libelf

No log is available.

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux

The following builds were skipped because they don't evaluate on aarch64-linux: libelf

No log is available.

@matthewbauer
Copy link
Member Author

@GrahamcOfBorg build gcc

@GrahamcOfBorg
Copy link

No attempt on x86_64-linux

The following builds were skipped because they don't evaluate on x86_64-linux: gcc

No log is available.

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux

The following builds were skipped because they don't evaluate on aarch64-linux: gcc

No log is available.

@matthewbauer matthewbauer requested a review from peti as a code owner March 14, 2018 22:58
@matthewbauer
Copy link
Member Author

@GrahamcOfBorg eval

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: gettext, libiconv

The following builds were skipped because they don't evaluate on x86_64-linux: darwin.libiconv

Partial log (click to expand)

cannot build derivation ‘/nix/store/jk1zz0s15yycck554d9r4yhmgs7i582g-diffutils-3.6.drv’: 3 dependencies couldn't be built
cannot build derivation ‘/nix/store/laz9k81r1k792rjzpmmb0y1yw3xqsc8s-ed-1.14.2.drv’: 2 dependencies couldn't be built
cannot build derivation ‘/nix/store/hn6zshz3xr72lk7hlxba1aah6414ybci-findutils-4.6.0.drv’: 2 dependencies couldn't be built
cannot build derivation ‘/nix/store/7fmzxrzc8h167q0fr5vnh6v8aina1plx-gcc-wrapper-7.3.0.drv’: 5 dependencies couldn't be built
cannot build derivation ‘/nix/store/dk98y3argxkb7gm4i0pk7aiqvw2ya3fy-patch-2.7.6.drv’: 2 dependencies couldn't be built
cannot build derivation ‘/nix/store/j2h5059p7i6jbqd3zbbf5zyl2wdm1gp2-stdenv-linux.drv’: 23 dependencies couldn't be built
cannot build derivation ‘/nix/store/qfas4r6j6bqsvqpjfmcybavzgh4ikwk4-stdenv-linux.drv’: 23 dependencies couldn't be built
cannot build derivation ‘/nix/store/nk9lgv621rkq31lc1hwj0kr56qba5y3a-gettext-0.19.8.drv’: 3 dependencies couldn't be built
cannot build derivation ‘/nix/store/8ypdk4zdxm2qbm9pp1xq4l9377h8ih5l-glibc-iconv-2.26-131.drv’: 2 dependencies couldn't be built
error: build of ‘/nix/store/8ypdk4zdxm2qbm9pp1xq4l9377h8ih5l-glibc-iconv-2.26-131.drv’, ‘/nix/store/nk9lgv621rkq31lc1hwj0kr56qba5y3a-gettext-0.19.8.drv’ failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: gettext, libiconv

The following builds were skipped because they don't evaluate on aarch64-linux: darwin.libiconv

Partial log (click to expand)

cannot build derivation '/nix/store/wi9hlarrigqwww4grplsnz5g0nsjh6z4-diffutils-3.6.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/mqqc508gyxv3l0y16szb0qz7wm8mwvhj-ed-1.14.2.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/anlnl09bv7r98qb8b6kh3rahczs8596q-findutils-4.6.0.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/598csxjgxxcys0aw9l7032w1xfpqi8k4-gcc-wrapper-7.3.0.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/7zbfjb02sbcjxl7knfhvdsppg085lzm3-patch-2.7.6.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/5n15lfxd58nlkfj0aimqj4m5qbygwyvs-stdenv-linux.drv': 25 dependencies couldn't be built
cannot build derivation '/nix/store/jp0xj8plhpjpmn6pnv60vwxahn7brw74-stdenv-linux.drv': 25 dependencies couldn't be built
cannot build derivation '/nix/store/ikdnsi6v05fq7mfbzzd669rd56x0vmv1-gettext-0.19.8.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/r6wwlk30m79g91xgkgx0a2ylk65pigis-glibc-iconv-2.26-131.drv': 2 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/ikdnsi6v05fq7mfbzzd669rd56x0vmv1-gettext-0.19.8.drv', '/nix/store/r6wwlk30m79g91xgkgx0a2ylk65pigis-glibc-iconv-2.26-131.drv' failed

@matthewbauer
Copy link
Member Author

@GrahamcOfBorg build girara irssi harfbuzz

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: darwin.libiconv, gettext, libiconv, streamripper

The following builds were skipped because they don't evaluate on x86_64-darwin: pcmciaUtils

Partial log (click to expand)

cannot build derivation '/nix/store/c97c5xylzxv2lq59n4kfv4rh2q6lgmji-CF-osx-10.10.5.drv': 8 dependencies couldn't be built
cannot build derivation '/nix/store/smyycpha08phf6gfaxhsnxgsinwpx5b4-bootstrap_cmds-dev-tools-7.0.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/sjgwx8g6qafjwrns5f8zfx0wdd5xi83f-python-2.7.14.drv': 14 dependencies couldn't be built
cannot build derivation '/nix/store/k3jvpbxrxnkiv85incn9biqwxa3i9md7-xnu-osx-10.11.6.drv': 9 dependencies couldn't be built
cannot build derivation '/nix/store/s526axh62chwj0rj3r0mfmln3mkpd023-IOKit-osx-10.11.6.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/8hky7n7x0qfq0md84mxs47bdxv46qncr-configd-osx-10.8.5.drv': 9 dependencies couldn't be built
cannot build derivation '/nix/store/nab25qsimh9cyimn47n68np0dfpw3j40-python-2.7.14.drv': 15 dependencies couldn't be built
cannot build derivation '/nix/store/h5aiada57ihi9dmr93v7lxl7vqp3hang-glib-2.56.0.drv': 11 dependencies couldn't be built
cannot build derivation '/nix/store/gvsybch11ywyzchp31sa9irsdnin8z62-streamripper-1.64.6.drv': 7 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/3kacb294b8lk7rgwkdvk2qbbsw83kjqs-gettext-0.19.8.drv', '/nix/store/gm7cgjc3bgc74lc45rrnbz7df2ahkcib-libiconv-osx-10.11.6.drv', '/nix/store/gvsybch11ywyzchp31sa9irsdnin8z62-streamripper-1.64.6.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: gettext, libiconv

The following builds were skipped because they don't evaluate on x86_64-linux: darwin.libiconv

Partial log (click to expand)

cannot build derivation '/nix/store/zxh38bfsq6jyprwqk3zn8ff62zsjfdxg-diffutils-3.6.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/6v02nc32h21wx7233dl3cllyb8dnlxxc-ed-1.14.2.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/axvn9sznzc41c9d4f8awrkr8jzsy0d0m-findutils-4.6.0.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/3d2ky6wgv4w1bdv5jh9jazgpbyxlx438-gcc-wrapper-7.3.0.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/cdkn3dsl4zbxsrjihwfas6g9cjk24811-patch-2.7.6.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/k4zxkvj15dyfg1g6wnamzlr6afignmwk-stdenv-linux.drv': 23 dependencies couldn't be built
cannot build derivation '/nix/store/mi12cpd5mszcfrkhrv14c29a4rz16iki-stdenv-linux.drv': 23 dependencies couldn't be built
cannot build derivation '/nix/store/ncndrrm6bdpb5b5d59b47qpp1zpj1qk0-gettext-0.19.8.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/np6hvshyw02kkli964aghpd6hh8pw4g4-glibc-iconv-2.27.drv': 2 dependencies couldn't be built
error: build of '/nix/store/ncndrrm6bdpb5b5d59b47qpp1zpj1qk0-gettext-0.19.8.drv', '/nix/store/np6hvshyw02kkli964aghpd6hh8pw4g4-glibc-iconv-2.27.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: girara, irssi, harfbuzz

Partial log (click to expand)

cannot build derivation '/nix/store/zhx4aa731p9wz5n8hxdj06r75iqj2gfs-pango-1.40.14.drv': 11 dependencies couldn't be built
cannot build derivation '/nix/store/gdw0xzwdga11dcdq3yaz26ph9hvdiji4-texlive-core-big.bin-2017.drv': 20 dependencies couldn't be built
cannot build derivation '/nix/store/qviw9hmjx06dzss135rbf4w1pd30fm13-at-spi2-atk-2.26.1.drv': 14 dependencies couldn't be built
cannot build derivation '/nix/store/7s7iy6vvr7c26m0vqhxy81jcsy35dyz6-texlive-combined-2017.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/gzjlnc2b4lvy08fxa4fbq3wk8qp7ivpa-dblatex-0.3.10.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/y5z8giwgpvvhp3rsbc1m3vird0bmav0s-gtk-doc-1.27.drv': 15 dependencies couldn't be built
cannot build derivation '/nix/store/s1syck2l4mvqhdwi51xh2822h1ghsh97-gdk-pixbuf-2.36.11.drv': 20 dependencies couldn't be built
cannot build derivation '/nix/store/ccnxs5akvaik8nlz7z4cgqvrw9h8b727-gtk+3-3.22.29.drv': 27 dependencies couldn't be built
cannot build derivation '/nix/store/0503i5jwb9i9azgj81zraksrms8m5vh5-girara-0.2.8.drv': 7 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/0503i5jwb9i9azgj81zraksrms8m5vh5-girara-0.2.8.drv', '/nix/store/jmcj8fdhq2nny4x3v7qpvgkaj39yr3ii-harfbuzz-1.7.5.drv', '/nix/store/r5ybmawc013hq97lld1pva06l5mjbzzl-irssi-1.1.1.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: girara, irssi, harfbuzz

Partial log (click to expand)

cannot build derivation '/nix/store/dsjl4xdgq39163vzdk49nx5d00iqx64y-pango-1.40.14.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/ra95z404gk4spk6jlcm0iqv9xlykpg6h-texlive-core-big.bin-2017.drv': 19 dependencies couldn't be built
cannot build derivation '/nix/store/yf927lmadvirrvxvkv3nysa0hs29q2fd-at-spi2-atk-2.26.1.drv': 14 dependencies couldn't be built
cannot build derivation '/nix/store/vszbldjrdihn8bzr4jvypqg69axznhxj-texlive-combined-2017.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/ihjdpdpaxjd8ijqfysa9sg4pxl9ic75x-dblatex-0.3.10.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/v29vlsbrlzsf186fix1jvqfdw2wqfmxb-gtk-doc-1.27.drv': 15 dependencies couldn't be built
cannot build derivation '/nix/store/m737ja6i3842dyj16jqwk8v2d1hhm22p-gdk-pixbuf-2.36.11.drv': 21 dependencies couldn't be built
cannot build derivation '/nix/store/cak9w9zbiasnd26pq4fd5w75w1ymgcw0-gtk+3-3.22.29.drv': 31 dependencies couldn't be built
cannot build derivation '/nix/store/86dm49mpj4168jpzx7sakwc6pddc698q-girara-0.2.8.drv': 7 dependencies couldn't be built
error: build of '/nix/store/86dm49mpj4168jpzx7sakwc6pddc698q-girara-0.2.8.drv', '/nix/store/c8pgi55v9kaqmazik9kg80jljn3abqnf-irssi-1.1.1.drv', '/nix/store/dj4lhclk80gjgn1hf858l4rs8qv3fwik-harfbuzz-1.7.5.drv' failed

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: gettext, libiconv

The following builds were skipped because they don't evaluate on aarch64-linux: darwin.libiconv

Partial log (click to expand)

/nix/store/a36b038fpfw79ddwrlnbgb3lxhq6mgnj-gettext-0.19.8-doc/share/doc/gettext/examples/hello-c-gnome/autogen.sh: interpreter directive changed from "/bin/sh" to "/nix/store/raky49nkpdkqyxd02s7qv5wbffnhk1ml-bash-4.4-p19/bin/sh"
/nix/store/a36b038fpfw79ddwrlnbgb3lxhq6mgnj-gettext-0.19.8-doc/share/doc/gettext/examples/hello-c/autoclean.sh: interpreter directive changed from "/bin/sh" to "/nix/store/raky49nkpdkqyxd02s7qv5wbffnhk1ml-bash-4.4-p19/bin/sh"
/nix/store/a36b038fpfw79ddwrlnbgb3lxhq6mgnj-gettext-0.19.8-doc/share/doc/gettext/examples/hello-c/autogen.sh: interpreter directive changed from "/bin/sh" to "/nix/store/raky49nkpdkqyxd02s7qv5wbffnhk1ml-bash-4.4-p19/bin/sh"
checking for references to /build in /nix/store/a36b038fpfw79ddwrlnbgb3lxhq6mgnj-gettext-0.19.8-doc...
shrinking RPATHs of ELF executables and libraries in /nix/store/dxyf8qkkgp9q4fbcxm3gazz4555i982v-gettext-0.19.8-info
strip is /nix/store/ry8fzbr5myz674sif6804xvw7555m7jd-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/dxyf8qkkgp9q4fbcxm3gazz4555i982v-gettext-0.19.8-info
checking for references to /build in /nix/store/dxyf8qkkgp9q4fbcxm3gazz4555i982v-gettext-0.19.8-info...
/nix/store/z3h1kww8s3mfdkdsfkh2xi04dwldyjjh-gettext-0.19.8
/nix/store/crc8hcml3mnqd8c8mva7k6yclyd1l91h-glibc-iconv-2.27

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: darwin.libiconv, gettext, libiconv

Partial log (click to expand)

cannot build derivation '/nix/store/syx8advkw863jzj0110brcmh3d7xfdid-ICU-osx-10.10.5.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/7kgfq8zb202gq19pr09w9i1py54cq3qa-cctools-binutils-darwin.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/5k3zrz5354i24vx7wbri25c8mg8m5fis-gnutar-1.30.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/4icj1dwpf1lrb5hf35x3b13h8nj2rwiv-CF-osx-10.10.5.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/gvrni8qkr5v5k9hrrk8wliifd29vihyy-cctools-binutils-darwin-wrapper.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/y8d8mjkphiwc8r94w74wsy3y0c1zckr0-clang-wrapper-5.0.1.drv': 9 dependencies couldn't be built
cannot build derivation '/nix/store/rxyg34jgdk0kk2dh43zlgn9ikz9k0svs-stdenv-darwin.drv': 35 dependencies couldn't be built
cannot build derivation '/nix/store/gm7cgjc3bgc74lc45rrnbz7df2ahkcib-libiconv-osx-10.11.6.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/3kacb294b8lk7rgwkdvk2qbbsw83kjqs-gettext-0.19.8.drv': 4 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/3kacb294b8lk7rgwkdvk2qbbsw83kjqs-gettext-0.19.8.drv', '/nix/store/gm7cgjc3bgc74lc45rrnbz7df2ahkcib-libiconv-osx-10.11.6.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: gettext, libiconv, pcmciaUtils, streamripper

The following builds were skipped because they don't evaluate on x86_64-linux: darwin.libiconv

Partial log (click to expand)

                 from ../src/journal/journal-vacuum.c:31:
/nix/store/41wkhq8nwbdcvamlfs691c0yhkhh1lrv-libgpg-error-1.28-dev/include/gpg-error.h:1557:43: error: expected ‘,’ or ‘;’ before ‘)’ token
                         const char *func) GPGRT_ATTR_NORETURN;
                                           ^
[221/1464] Compiling C object 'src/journal/journal-client@sta/journal-send.c.o'.
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
ninja: build stopped: subcommand failed.
builder for ‘/nix/store/b4x8l1jsyzg3vvb32qwi7dn28mpy2bh9-systemd-237.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/vnyyz16yzavim6ah5636ylfq19fz5aac-pcmciautils-018.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/vnyyz16yzavim6ah5636ylfq19fz5aac-pcmciautils-018.drv’ failed

@matthewbauer matthewbauer merged commit d23d443 into NixOS:staging Mar 23, 2018
@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: girara, irssi, harfbuzz

Partial log (click to expand)

strip is /nix/store/ry8fzbr5myz674sif6804xvw7555m7jd-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/ym6612gl1za5lx3ppgc72rp235gbm9jf-gdk-pixbuf-2.36.11-man
checking for references to /build in /nix/store/ym6612gl1za5lx3ppgc72rp235gbm9jf-gdk-pixbuf-2.36.11-man...
shrinking RPATHs of ELF executables and libraries in /nix/store/vzfn3g8fix8f2lcpq1ryvd6lihqmdwx1-gdk-pixbuf-2.36.11-devdoc
strip is /nix/store/ry8fzbr5myz674sif6804xvw7555m7jd-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/vzfn3g8fix8f2lcpq1ryvd6lihqmdwx1-gdk-pixbuf-2.36.11-devdoc
checking for references to /build in /nix/store/vzfn3g8fix8f2lcpq1ryvd6lihqmdwx1-gdk-pixbuf-2.36.11-devdoc...
cannot build derivation '/nix/store/7b0g54dj47ii0c51krcdbrb0jgkcgckz-gtk+3-3.22.29.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/aazbsi98jwqajq2cxfiss1m5vzghn82k-girara-0.2.8.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/aazbsi98jwqajq2cxfiss1m5vzghn82k-girara-0.2.8.drv' failed

@Ericson2314
Copy link
Member

Great!


propagatedBuildInputs = [ zlib libffi libiconv ]
++ libintlOrEmpty;
propagatedBuildInputs = [ zlib libffi ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if it's right or wrong, but noticed this (while investigating problems w/musl and missing libiconv)--
what's the rationale for removing libiconv from propagated build inputs here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can have it propagate if thia breaks things. The rationale is that things that depend on glib shouldnt need to know about libiconv (esp. setup hooks). Not sure if it breaks glib though?

@shlevy
Copy link
Member

shlevy commented Mar 24, 2018

@matthewbauer @dtzWill @Ericson2314 should staging be usable yet?

@Ericson2314
Copy link
Member

I don't know. I didn't intend to break it, but if this breaks it I think it's worth it.

@matthewbauer
Copy link
Member Author

matthewbauer commented Mar 25, 2018

@Ericson2314 Looks like there is some breakage, but hopefully it's not too bad:

gobject-introspection is now failing: https://hydra.nixos.org/build/71894082/nixlog/1

ld: library not found for -liconv

Any idea why it's running the libiconv setup-hook in gobject-introspection (it only needs libintl)?

@Ericson2314
Copy link
Member

If you nix shell with NIX_DEBUG=7 you'll get a set -x trace and can see.

@dtzWill
Copy link
Member

dtzWill commented Mar 26, 2018

That job linked above seems to be passing now? So hopefully it's fixed? 😁

https://hydra.nixos.org/build/71910236

@matthewbauer
Copy link
Member Author

matthewbauer commented Mar 26, 2018

Yeah, just switch to the "propagatedBuildInputs" fixed it (looks like nativeBuildInputs idea is not going to work).

We still have some failing though, if anyone wants to take a look at them:

https://hydra.nixos.org/build/71917155/nixlog/1
https://hydra.nixos.org/build/71830265/nixlog/1

@dtzWill
Copy link
Member

dtzWill commented Mar 26, 2018

Hmm, we'll see. Do you know if there are any non-Darwin failures? My builders are offline for a few days so I don't have my usual ability to test on musl/etc O:).

@matthewbauer
Copy link
Member Author

None that I have found so far.

# libiconv must be listed in load flags on non-Glibc
# it doesn't hurt to have it in Glibc either though
iconvLdflags() {
export NIX_LDFLAGS="$NIX_LDFLAGS -liconv"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we ensure that we don't keep adding this multiple times? e.g. check that -liconv is not already in $NIX_LDFLAGS before rexporting?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could but even then we wouldn't know if the package itself passes -liconv. I think it's safe to pass it twice to gcc and clang. I don't get any warnings at least.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, multiple -l flags are usually no issues, and might even be preferable with cyclic dependencies.

I was just confused as it ended up four times in my ghc derivation. And I got four error messages. At first I though it would have to be in four different places.

env-vars
43:declare -x NIX_TARGET_LDFLAGS=" -L/nix/store/0pnvlr2ghaigvlwn2zg4nialw3sx5xmn-libiconv-1.15-x86_64-pc-mingw32/lib -liconv -liconv -L/nix/store/0pnvlr2ghaigvlwn2zg4nialw3sx5xmn-libiconv-1.15-x86_64-pc-mingw32/lib -liconv -liconv"

ghc-d0d02e2/libffi/build/x86_64-pc-mingw32/libtool
11829:postdeps="-liconv -liconv -liconv -liconv -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's probably packages propagating libiconv incorrectly. There are quite a few that do this still & probably need to be fixed. I think that's where the duplicates are coming from.

https://github.com/NixOS/nixpkgs/search?utf8=%E2%9C%93&q=propagatedbuildinputs+libiconv&type=

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this get cross support with the "role" stuff? I thought it did.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully- I'm not sure if anyone has used it yet in cross compile. In theory at least though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK yeah that was indeed done. 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LnL7 LnL7 mentioned this pull request Jan 23, 2019
10 tasks
@matthewbauer matthewbauer deleted the libintl-sanity branch February 22, 2019 04:34
@soareschen soareschen mentioned this pull request Jun 2, 2020
10 tasks
@abathur abathur mentioned this pull request Apr 6, 2021
10 tasks
@abathur abathur mentioned this pull request May 8, 2021
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Cross compilation
Planned for 18.09
Development

Successfully merging this pull request may close these issues.

None yet

7 participants