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

wxMac: fixed main compile on 10.6 #21410

Closed
wants to merge 1 commit into from
Closed

wxMac: fixed main compile on 10.6 #21410

wants to merge 1 commit into from

Conversation

mdaiter
Copy link
Contributor

@mdaiter mdaiter commented Dec 25, 2016

Motivation for this change

Need to link appropriate services when compiling wxMac 2.8 on Darwin.

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.

@mention-bot
Copy link

@mdaiter, thanks for your PR! By analyzing the history of the files in this pull request, we identified @abbradar, @aske and @edolstra to be potential reviewers.

@FRidh FRidh added the 6.topic: darwin Running or building packages on Darwin label Dec 25, 2016
@FRidh
Copy link
Member

FRidh commented Dec 25, 2016

The attribute is called wxGTK28 so please use that in your commit name as well.

Copy link
Member

@LnL7 LnL7 left a comment

Choose a reason for hiding this comment

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

looks good, just some nitpicks

@@ -1,6 +1,7 @@
{ stdenv, fetchurl, pkgconfig, gtk2, libXinerama, libSM, libXxf86vm, xf86vidmodeproto
, gstreamer, gst_plugins_base, GConf, libX11, cairo
, withMesa ? true, mesa ? null, compat24 ? false, compat26 ? true, unicode ? true,
, withMesa ? true, mesa ? null, compat24 ? false, compat26 ? true, unicode ? true
, Carbon ? null, Cocoa ? null, CoreServices
Copy link
Member

Choose a reason for hiding this comment

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

You didn't add a default value for CoreServices, but this isn't really necessary. If those are not evaluated in the derivation it's fine to pass those around on other platforms.

@@ -17,7 +18,8 @@ stdenv.mkDerivation rec {
};

buildInputs = [ gtk2 libXinerama libSM libXxf86vm xf86vidmodeproto gstreamer gst_plugins_base GConf libX11 cairo ]
++ optional withMesa mesa;
++ optional withMesa mesa
++ optionals stdenv.isDarwin [Carbon Cocoa CoreServices];
Copy link
Member

Choose a reason for hiding this comment

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

whitespace

Copy link
Member

@LnL7 LnL7 left a comment

Choose a reason for hiding this comment

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

The build still fails for me.

In file included from ./include/wx/mac/private.h:4:
./include/wx/mac/carbon/private.h:1459:9: error: unknown type name 'Cursor'; did you mean 'NSCursor'?
typedef Cursor ClassicCursor;
        ^~~~~~
        NSCursor
./include/wx/defs.h:2508:28: note: 'NSCursor' declared here
DECLARE_WXCOCOA_OBJC_CLASS(NSCursor);
                           ^
./include/wx/defs.h:2486:16: note: expanded from macro 'DECLARE_WXCOCOA_OBJC_CLASS'
typedef struct klass *WX_##klass
               ^
60 warnings and 1 error generated.
make: *** [Makefile:21236: basedll_encconv.o] Error 1

@mdaiter
Copy link
Contributor Author

mdaiter commented Dec 26, 2016

@LnL7 , the build will still fail: the OS X system framework required to build the package is 10.6. The maintainers don't have plans for updating it anytime soon, so for now, the general recommendation people have been making is to download the .framework and pass it as an argument to the configure stage. We could do this, but it'd require we install a 10.6 framework anytime someone wants to use this package.

@LnL7
Copy link
Member

LnL7 commented Dec 26, 2016

Does it work outside of nix or is it just broken.

@mdaiter
Copy link
Contributor Author

mdaiter commented Dec 26, 2016

@LnL7 , the package itself will compile/run on a system containing the 10.6 framework (https://forums.wxwidgets.org/viewtopic.php?t=38413)

@mdaiter
Copy link
Contributor Author

mdaiter commented Dec 26, 2016

@LnL7 we might just want to grab this framework file, compile against it, and then delete it. Otherwise, we may install multiple versions of apple-sdk.

@LnL7
Copy link
Member

LnL7 commented Jan 7, 2017

I would suggest we just mark this as broken on darwin.

@matthewbauer
Copy link
Member

I added comment making this Linux-only for now: 8df24b7

@LnL7 LnL7 closed this Apr 10, 2017
@mdaiter mdaiter deleted the wxMacFix branch April 30, 2017 12:19
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.

None yet

5 participants