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

Darwin misc. fixes #17685

Merged
merged 43 commits into from
Aug 24, 2016
Merged

Darwin misc. fixes #17685

merged 43 commits into from
Aug 24, 2016

Conversation

matthewbauer
Copy link
Member

Motivation for this change

These are some more fixes I've put together. Make sure they build on nox-review under Linux before merging, just in case they break something.

Things done
  • Tested using sandboxing
    (nix.useChroot on NixOS,
    or option build-use-chroot in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • OS X
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@matthewbauer, thanks for your PR! By analyzing the annotation information on this pull request, we identified @micxjo, @vcunat and @ericbmerritt to be potential reviewers

@vcunat vcunat added the 6.topic: darwin Running or building packages on Darwin label Aug 12, 2016
@vcunat
Copy link
Member

vcunat commented Aug 12, 2016

I also recently broke mariadb on Darwin and I don't know a good way to fix it, I'm sorry. http://hydra.nixos.org/build/38458779/nixlog/1/raw (There should be some fixed vulnerabilities in the updates.)

@matthewbauer
Copy link
Member Author

@vcunat it looks like jemalloc is not being built correctly

@copumpkin
Copy link
Member

This is awesome. I haven't tested any of it, but really appreciate people putting work against darwin.

@vcunat
Copy link
Member

vcunat commented Aug 13, 2016

it looks like jemalloc is not being built correctly

If some of you who do have a Darwin access could fix it, it would be nice, as Qt is blocked by that.

@vcunat
Copy link
Member

vcunat commented Aug 13, 2016

Maybe I'll get lucky now: 1c9307d. EDIT: nope, but it got much further.

@copumpkin
Copy link
Member

I'm looking at the jemalloc issue. It seems that mariadb is looking for malloc_stats_print but that libjemalloc sticks je_ prefix on its symbols by default (on Darwin at least) so mariadb fails to find the symbol. Anyone know what's up with that, and why it doesn't seem to affect linux?

@copumpkin
Copy link
Member

Aha, https://github.com/jemalloc/jemalloc/blob/0c5cec833fb2b075222ee19a41c03f32178d3be1/INSTALL. I'll fix.

@copumpkin
Copy link
Member

@matthewbauer do any of these cause a mass [darwin] rebuild? What's a sensible way to test these changes? I'd like to merge wholesale but am not sure how to be responsible about it.

@vcunat I think jemalloc is good again, as of 1f0df5f. That was half of what was wrong with mariadb, and I fixed the rest in ccd16f8.

@matthewbauer
Copy link
Member Author

matthewbauer commented Aug 14, 2016

@copumpkin stdenv should be unaffected if that's what you mean by mass rebuild.

From nox, here's what's affected on Darwin:

bs1770gain gegl libsecret glew110 unrtf geany stm32flash smartmontools gimpPlugins.gap gpshell john tie fontforge-gtk libfreefare stfl boringssl mosquitto dog cwebbin mg gppcscconnectionplugin gpicview newsbeuter-dev cccc sailsd genromfs tm hardlink unclutter gimpPlugins.lqrPlugin runningx libstatgrab gimp nss dclxvi odt2txt openct cddiscid libykneomgr rakudo gimpPlugins.waveletSharpen setroot yubico-piv-tool nspr gimpPlugins.texturize globalplatform dumptorrent newsbeuter sl stricat fox svrcore nssTools erlangR16 gkrellm opensc pcsclite pond

and this is what's affected on Linux:

gnome3.networkmanager_pptp eclipses.eclipse-sdk-422 gnome3.networkmanager_vpnc awesome jumanji python27Packages.redNotebook hardlink stm32flash gnome3.pomodoro tuxguitar gnome3.gnome-online-miners vimb networkmanager_openvpn networkmanager_openconnect cccc eclipses.eclipse-sdk-431 gnome3.gnome_terminal beets gnome3.networkmanagerapplet stfl gnome3.geary miro dwb gnome3.webkitgtk mg eclipses.eclipse-sdk-421 pond guitarix pytrainer dclxvi eclipses.eclipse-cpp-37 eclipses.eclipse-cpp-36 gnome3.grilo-plugins xiphos genromfs eclipses.eclipse-sdk-451 evince eclipses.eclipse-cpp-44 eclipses.eclipse-sdk-35 newsbeuter gnucash26 font-manager dwb-unwrapped gnome3.networkmanager_openvpn eclipses.eclipse-sdk-442 gnome3.gnome-music mkcast sailsd openmodelica eclipses.eclipse-sdk-36 gnome3.california gnome3.devhelp gnome3.gnome-tweak-tool stricat tie runningx gnome3.vino gnome3.bijiben mu osmo unclutter gnome3.gnome-maps eclipses.eclipse-scala-sdk-40 liferea uzbl eclipses.eclipse-platform-452 eclipses.eclipse-sdk-46 gnome3.networkmanager_openconnect gnome3.gnome-photos gnome3.gnome_online_accounts gnome3.folks gnome3.tracker gnome3.sushi eclipses.eclipse-sdk-452 edit gnome3.libgdata gnome3.gnome-contacts vimprobable2-unwrapped areca networkmanagerapplet gnome3.gnome-calendar unrtf webkitgtk210x eclipses.eclipse-platform-451 webkitgtk2 gnome3.yelp gnome3.gfbgraph gnome3.gnome_shell gnome3.libzapojit surf eclipses.eclipse-platform-45 azureus gnome3.gnome_control_center gnome3.networkmanager_l2tp eclipses.eclipse-cpp-42 darktable gnome3.gnome-user-docs tm vimprobable2 gnome3.seahorse eclipses.eclipse-cpp-43 recoll python27Packages.pywebkitgtk dog networkmanager_l2tp eclipses.eclipse-cpp-45 gnome3.evolution eclipses.eclipse-platform gitg eclipses.eclipse-sdk-45 dumptorrent sl bs1770gain networkmanager_pptp gpicview shotwell gnome3.nautilus evolution_data_server cwebbin odt2txt networkmanager_vpnc gnome3.vinagre gnome3.totem eclipses.eclipse-sdk-37 eclipses.eclipse-sdk-44 gnome3.file-roller epiphany gnome3.gpaste ekiga newsbeuter-dev gnome3.gnome-user-share eclipses.eclipse-modeling-36 midori-unwrapped gnome3.gnome-boxes gnome3.gnome-documents midori boringssl swt vimb-unwrapped libsecret gnome3.webkitgtk24x setroot luakit gnome3.gnome-disk-utility

It might seem weird to have so many affected on Linux but they're good improvement AFAICT. Most are from patching build scripts to use "cc" instead of "gcc". If we ever want to switch Linux from "gcc" to "clang" these changes will make things easier.

@copumpkin
Copy link
Member

Sounds good to me. Anyone have objections to merging?

@matthewbauer
Copy link
Member Author

@copumpkin While you're merging stuff, could you also look at merging #17642 into staging or master?

@copumpkin
Copy link
Member

Running nox-review on linux now. Holy shit there are a lot of large source downloads involved (mostly eclipse-related crap?). Not sure how long this will take...

@copumpkin
Copy link
Member

Still building webkit 😴

@dezgeg
Copy link
Contributor

dezgeg commented Aug 15, 2016

I wonder if we could just set CC=cc in the stdenv to avoid most of these.

@copumpkin
Copy link
Member

I thought we already did that. But many builds still go out of their way to
set gcc
On Mon, Aug 15, 2016 at 09:06 Tuomas Tynkkynen notifications@github.com
wrote:

I wonder if we could just set CC=cc in the stdenv to avoid most of these.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#17685 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAAKPyuKw1keOHayihlQICdTwmq6PbjHks5qgGQ4gaJpZM4JiyJ6
.

@copumpkin
Copy link
Member

Okay, my linux box ran out of disk space after several hours of nox-review on this, so I can't really test it right now. I'll pass this to someone else who either has the confidence to merge it without rebuilding half of the linux GUI world (including two separate versions of webkit for some reason) or who has a beefier machine than I do.

@dezgeg
Copy link
Contributor

dezgeg commented Aug 15, 2016

Right, we do set it. Maybe an implicit CC=$(CC) in makeFlags, or something...

@matthewbauer
Copy link
Member Author

matthewbauer commented Aug 15, 2016

@dezgeg The one thing I'd warn of with that is sometime Makefiles will set CC to something weird like gcc -pthread. Changing that to just "$(CC)" will break. In that case, we can't really just overwrite every makefile through makeFlags. It really should be up to the makefile to use the "?=" notation to set correct default for CC.

@jb55
Copy link
Contributor

jb55 commented Aug 16, 2016

I'm running nox-review tonight on one of my beefy machines. will report back.

Makefile says this:

Please compile using CMake on Mac OS X.
doesn't work on Darwin
- needs CoreServices
- needs libiconv in ld flags on clang
needs:

- CoreServices
- ApplicationServices
- Use "cc" instead of "gcc".
- Add missing pthread to build.
There was a typo previously adding these in.
It uses the linux-only sys/prctl.h header.
unrtf needs libiconv on Darwin. Linux has issues with the -liconv flag,
but it's provided by gcc anyway.
@matthewbauer matthewbauer changed the title Darwin misc. fixes <round 2> Darwin misc. fixes Aug 16, 2016
@jb55
Copy link
Contributor

jb55 commented Aug 17, 2016

Hmm looks like it failed

@dezgeg
Copy link
Contributor

dezgeg commented Aug 17, 2016

That one is already failing: http://hydra.nixos.org/build/38535205

@jb55
Copy link
Contributor

jb55 commented Aug 17, 2016

rerunning without that one...

@jb55
Copy link
Contributor

jb55 commented Aug 17, 2016

weird, getting a segfault in gcc now https://gist.github.com/jb55/90e3bf2b9bfc9049285534c87780c17c

@matthewbauer
Copy link
Member Author

matthewbauer commented Aug 23, 2016

@copumpkin Can you merge this? There may still be issues but AFAICT no new errors are introduced.

@copumpkin
Copy link
Member

@matthewbauer if you're sure that @jb55's gcc segfault doesn't stem from this, sure. Leaves me feeling a little uneasy to blindly merge a big lump of stuff like this with the last message being "I got a segfault in my compiler after merging this" 😄

@jb55
Copy link
Contributor

jb55 commented Aug 23, 2016

The segfaulting seemed non-deterministic, I didn't have much time to look into it further :(

@copumpkin copumpkin merged commit 3f337a2 into NixOS:master Aug 24, 2016
@matthewbauer matthewbauer deleted the darwin-misc2 branch February 22, 2019 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants