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

Emacs macport version fix #20706

Merged
merged 2 commits into from Dec 13, 2016
Merged

Conversation

matthewbauer
Copy link
Member

@matthewbauer matthewbauer commented Nov 25, 2016

Motivation for this change

This sets MAC_OS_X_VERSION_MIN_REQUIRED=1090 to get the emacs25macport working again. This should also be needed for emacs24macport.

Also: update to emacs-mac 6.1.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • 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.

Previously emacs-macport was giving the error:

  • AppKit/AppKit.h: present but cannot be compiled
  • Carbon/Carbon.h: present but cannot be compiled

This adds "MAC_OS_X_VERSION_MIN_REQUIRED=1090" to CFLAGS to allow them
to compile with the new 10.10 headers.

Fixes #20682.

Previously, emacs-macport was giving the error:

- AppKit/AppKit.h: present but cannot be compiled
- Carbon/Carbon.h: present but cannot be compiled

This add "MAC_OS_X_VERSION_MIN_REQUIRED=1090" to CFLAGS to allow them
to compile with the new 10.10 headers.

Fixes NixOS#20682.
@mention-bot
Copy link

@matthewbauer, thanks for your PR! By analyzing the history of the files in this pull request, we identified @periklis, @acowley and @jwiegley to be potential reviewers.

@LnL7 LnL7 added 6.topic: darwin Running or building packages on Darwin 8.has: package (update) labels Nov 25, 2016
@acowley
Copy link
Contributor

acowley commented Nov 25, 2016

Unless I'm misreading, -DMAC_OS_X_VERSION_MAX_ALLOWED=1090 is still there despite what the log message says.

That said, the change does get past the referenced error.

@matthewbauer
Copy link
Member Author

Sorry about that. I had that commit originally but it got overwritten.

@acowley
Copy link
Contributor

acowley commented Nov 26, 2016

To be clear, the change here seems to work for me, but I want to make sure it is the entire intended change since the diagnosed problem is that we have 10.10 headers, but the expression still includes the -DMAC_OS_X_VERSION_MAX_ALLOWED=1090 flag.

It looks like that flag isn't hurting anything at the moment, so I'm fine with merging, but maybe we should bump it just on principle?

@matthewbauer
Copy link
Member Author

@acowley The reason we need it is because of some 10.9 specific things that emacs-mac is using. You can try compiling src/macappkit.m without the defines to see what I mean. It should be completely harmless.

@matthewbauer
Copy link
Member Author

Would it be okay to get rid of the "lowPrio" for these two derivations?

@acowley
Copy link
Contributor

acowley commented Dec 4, 2016

I hope this can be merged soon. I had a frustrating time bringing a computer up to date today because the emacs25Macport hydra serves up doesn't have a working .app. Things seem to build fine, but what you end up with is broken. These commits are crucial to un-frustrating things!

@matthewbauer
Copy link
Member Author

@acowley AFAICT, emacs25Macport isn't in Hydra (lowPrio). Could you be looking at the regular "emacs" (which also provides a .app)?

@acowley
Copy link
Contributor

acowley commented Dec 4, 2016

Hm, the path in the store definitely said mac, and it was during an update from 24 that I hit this, and the result definitely did not have an .app.

@LnL7
Copy link
Member

LnL7 commented Dec 7, 2016

looks like like emacs24 is still broken, also does not build on sierra https://gist.github.com/LnL7/dda8973b7deac7cbe0ee9d30505d54d6

@LnL7
Copy link
Member

LnL7 commented Dec 13, 2016

let me check if it's just during the build.

@LnL7
Copy link
Member

LnL7 commented Dec 13, 2016

The resulting build seems to work. What's the reason we also have a build for emacs24, is that important?

@acowley
Copy link
Contributor

acowley commented Dec 13, 2016

If 25 works and 24 doesn't, we should split the PR. I do think 24 matters, but some emacs is better than no emacs!

@@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
"--enable-mac-app=$$out/Applications"
];

CFLAGS = "-O3 -DMAC_OS_X_VERSION_MAX_ALLOWED=1090";
CFLAGS = "-O3 -DMAC_OS_X_VERSION_MAX_ALLOWED=1090 -DMAC_OS_X_VERSION_MIN_REQUIRED=1090";
Copy link
Member

Choose a reason for hiding this comment

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

This looks a little strange, do we need both?

Copy link
Member Author

Choose a reason for hiding this comment

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

Well we can't have MAC_OS_X_VERSION_MAX_ALLOWED without MAC_OS_X_VERSION_MIN_REQUIRED because max allowed can't be less than min required (which it is with the latest apple-sdk). Why MAC_OS_X_VERSION_MAX_ALLOWED is necessary is unclear but it seems to fail without it.

Copy link
Member

Choose a reason for hiding this comment

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

Allright, do you want to fix emacs24 or do I just merge this for now.

Copy link
Member Author

Choose a reason for hiding this comment

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

I would say to just merge this now. If you can merge #20536 after this, it should fix emacs24Macport as well

@matthewbauer
Copy link
Member Author

If 25 works and 24 doesn't, we should split the PR. I do think 24 matters, but some emacs is better than no emacs!

Well this change is definitely needed for 24 even though other things are broken. #20536 seems to fix 24.

@LnL7 LnL7 merged commit 29d53f3 into NixOS:master Dec 13, 2016
@matthewbauer matthewbauer deleted the emacs-macport-version-fix branch February 22, 2019 04:43
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 8.has: package (update)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants