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

OSX 10.10 (preview) support #691

Closed
hiramgeeks opened this Issue Aug 26, 2014 · 30 comments

Comments

Projects
None yet
6 participants
@hiramgeeks

hiramgeeks commented Aug 26, 2014

Hey,

I'm trying to compile SFML (master) on a OS X 10.10 (Preview) iMac. CMake interrupts the process with the following message:

CMake Error at cmake/Config.cmake:58 (message): Unsupported version of OS X: 10.10

I'm not planning to use XCode 6 (Preview), but XCode 5 as already supported. It would be great if you guys enable support for OS X 10.10, since I can use SFML 2.1 (stable) with no problems on it.

The idea here is that I can compile it and help you with bug reports too.

Let me know if you need further info.

Thanks,
Hiram

@hiramgeeks

This comment has been minimized.

Show comment
Hide comment
@hiramgeeks

hiramgeeks Aug 26, 2014

BTW, I could try to "by pass" this check on Config.cmake file, but I think that OS X 10.10 is about to be released, and would be great to test it in advance.

hiramgeeks commented Aug 26, 2014

BTW, I could try to "by pass" this check on Config.cmake file, but I think that OS X 10.10 is about to be released, and would be great to test it in advance.

@MarioLiebisch

This comment has been minimized.

Show comment
Hide comment
@MarioLiebisch

MarioLiebisch Aug 26, 2014

Member

That's a CMake issue and not really something anyone here can change (other than submitting a patch to CMake).

Member

MarioLiebisch commented Aug 26, 2014

That's a CMake issue and not really something anyone here can change (other than submitting a patch to CMake).

@mantognini

This comment has been minimized.

Show comment
Hide comment
@mantognini

mantognini Aug 26, 2014

Member

Yep, as @MarioLiebisch said, this is a Cmake-related issue. We can do nothing about it. Maybe try with a nightly build version of Cmake, they might have already fixed that..

SFML is planned, of course, to support 10.10 but I don't have access to any beta version so I can't help much before it's officially released. But if you spot something, drop us a line on the forum (preferably).

Member

mantognini commented Aug 26, 2014

Yep, as @MarioLiebisch said, this is a Cmake-related issue. We can do nothing about it. Maybe try with a nightly build version of Cmake, they might have already fixed that..

SFML is planned, of course, to support 10.10 but I don't have access to any beta version so I can't help much before it's officially released. But if you spot something, drop us a line on the forum (preferably).

@mantognini mantognini closed this Aug 26, 2014

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 26, 2014

Member

Why do you guys say that it's a CMake issue? This error is triggered by SFML. And by the way, it shouldn't, because the condition for it is "if minor version is less than 7".

Member

LaurentGomila commented Aug 26, 2014

Why do you guys say that it's a CMake issue? This error is triggered by SFML. And by the way, it shouldn't, because the condition for it is "if minor version is less than 7".

@texus

This comment has been minimized.

Show comment
Hide comment
@texus

texus Aug 26, 2014

Contributor

Isn't the problem just with the regex on line 56 of that file?
I could be wrong but it looks like it would only find the first number and puts a 1 instead of a 10 in the version variable.

Contributor

texus commented Aug 26, 2014

Isn't the problem just with the regex on line 56 of that file?
I could be wrong but it looks like it would only find the first number and puts a 1 instead of a 10 in the version variable.

@hiramgeeks

This comment has been minimized.

Show comment
Hide comment
@hiramgeeks

hiramgeeks Aug 26, 2014

@LaurentGomila, yeah. I think the minor version could be upgraded to, at least, 9 (10.9) which is the OS X current stable.

@MarioLiebisch, AFAK, Config.cmake is created/generated/maintained by the SFML developers. Am I wrong? I'm not very familiar with CMake yet, I don't know how their files are generated. I think the issue should be re-opened.

hiramgeeks commented Aug 26, 2014

@LaurentGomila, yeah. I think the minor version could be upgraded to, at least, 9 (10.9) which is the OS X current stable.

@MarioLiebisch, AFAK, Config.cmake is created/generated/maintained by the SFML developers. Am I wrong? I'm not very familiar with CMake yet, I don't know how their files are generated. I think the issue should be re-opened.

@hiramgeeks

This comment has been minimized.

Show comment
Hide comment
@hiramgeeks

hiramgeeks Aug 26, 2014

@texus, I recently tried to "by pass" that condition, but there was still other issues. I can't test that again right now, but would be a start changing the regex or bypassing it to see what happens.

hiramgeeks commented Aug 26, 2014

@texus, I recently tried to "by pass" that condition, but there was still other issues. I can't test that again right now, but would be a start changing the regex or bypassing it to see what happens.

@mantognini

This comment has been minimized.

Show comment
Hide comment
@mantognini

mantognini Aug 26, 2014

Member

Oupsi! 😊

You guys are probably right. The regex should be updated indeed!

Member

mantognini commented Aug 26, 2014

Oupsi! 😊

You guys are probably right. The regex should be updated indeed!

@mantognini mantognini reopened this Aug 26, 2014

@mantognini mantognini added bug labels Aug 26, 2014

@hiramgeeks

This comment has been minimized.

Show comment
Hide comment
@hiramgeeks

hiramgeeks Aug 26, 2014

NP! I wish I had to time to update the code myself and submit a pull
request, but I'm too busy making a GDD and a prototype of a game for a
competion that will begin in a few days. Anyway, let me know if I can help
with anything else.

2014-08-26 9:50 GMT-03:00 Marco Antognini notifications@github.com:

Oupsi! [image: 😊]

You guys are probably right. The regex should be updated indeed!


Reply to this email directly or view it on GitHub
#691 (comment).

hiramgeeks commented Aug 26, 2014

NP! I wish I had to time to update the code myself and submit a pull
request, but I'm too busy making a GDD and a prototype of a game for a
competion that will begin in a few days. Anyway, let me know if I can help
with anything else.

2014-08-26 9:50 GMT-03:00 Marco Antognini notifications@github.com:

Oupsi! [image: 😊]

You guys are probably right. The regex should be updated indeed!


Reply to this email directly or view it on GitHub
#691 (comment).

@mantognini

This comment has been minimized.

Show comment
Hide comment
@mantognini

mantognini Aug 26, 2014

Member

Try replacing line 56 of cmake/Config.cmake with:

STRING(REGEX REPLACE "10\\.([0-9]+).*" "\\1" MACOSX_VERSION "${MACOSX_VERSION_RAW}")

(Basically, this add a +.)

Member

mantognini commented Aug 26, 2014

Try replacing line 56 of cmake/Config.cmake with:

STRING(REGEX REPLACE "10\\.([0-9]+).*" "\\1" MACOSX_VERSION "${MACOSX_VERSION_RAW}")

(Basically, this add a +.)

@hiramgeeks

This comment has been minimized.

Show comment
Hide comment
@hiramgeeks

hiramgeeks Aug 26, 2014

Worked like a charm @mantognini. Actually, the changes I made myself last week caused other problems, but must be something I did wrong. IMO, this could be validated by you guys and merged to the master. Thank you.

hiramgeeks commented Aug 26, 2014

Worked like a charm @mantognini. Actually, the changes I made myself last week caused other problems, but must be something I did wrong. IMO, this could be validated by you guys and merged to the master. Thank you.

@MarioLiebisch

This comment has been minimized.

Show comment
Hide comment
@MarioLiebisch

MarioLiebisch Aug 26, 2014

Member

Meh, filename confused me. :)

Member

MarioLiebisch commented Aug 26, 2014

Meh, filename confused me. :)

@hiramgeeks

This comment has been minimized.

Show comment
Hide comment
@hiramgeeks

hiramgeeks Aug 26, 2014

BTW, while executing "make":

[ 47%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/WindowImplCocoa.mm.o
/Users/hiram/Development/SFML/src/SFML/Window/OSX/WindowImplCocoa.mm:228:32: error: 
      cannot initialize a parameter of type 'id<NSFileManagerDelegate>' with an
      rvalue of type 'SFApplicationDelegate *'
  ...[NSApp setDelegate:[[[SFApplicationDelegate alloc] init] autorelease]];
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/objc/NSObject.h:38:1: note: instance method 'autorelease' is
      assumed to return an instance of its receiver type ('SFApplicationDelegate
      *')
- (instancetype)autorelease OBJC_ARC_UNAVAILABLE;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSFileManager.h:109:47: note: 
      passing argument to parameter 'delegate' here
@property (assign) id <NSFileManagerDelegate> delegate NS_AVAILABLE(10_5, 2_0);
                                              ^
1 error generated.
make[2]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/WindowImplCocoa.mm.o] Error 1
make[1]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/all] Error 2
make: *** [all] Error 2

But nothing to do with the Config.cmake. I may open another issue later. Thanks

hiramgeeks commented Aug 26, 2014

BTW, while executing "make":

[ 47%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/WindowImplCocoa.mm.o
/Users/hiram/Development/SFML/src/SFML/Window/OSX/WindowImplCocoa.mm:228:32: error: 
      cannot initialize a parameter of type 'id<NSFileManagerDelegate>' with an
      rvalue of type 'SFApplicationDelegate *'
  ...[NSApp setDelegate:[[[SFApplicationDelegate alloc] init] autorelease]];
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/objc/NSObject.h:38:1: note: instance method 'autorelease' is
      assumed to return an instance of its receiver type ('SFApplicationDelegate
      *')
- (instancetype)autorelease OBJC_ARC_UNAVAILABLE;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSFileManager.h:109:47: note: 
      passing argument to parameter 'delegate' here
@property (assign) id <NSFileManagerDelegate> delegate NS_AVAILABLE(10_5, 2_0);
                                              ^
1 error generated.
make[2]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/WindowImplCocoa.mm.o] Error 1
make[1]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/all] Error 2
make: *** [all] Error 2

But nothing to do with the Config.cmake. I may open another issue later. Thanks

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@hiramgeeks

This comment has been minimized.

Show comment
Hide comment
@hiramgeeks

hiramgeeks Aug 26, 2014

Simple and Fast Development Team. :-) I appreaciate your quick response. I'll stop just demanding "quick fixes" and try to contribute more pragmatically to SFML. Keep up the great work!

hiramgeeks commented Aug 26, 2014

Simple and Fast Development Team. :-) I appreaciate your quick response. I'll stop just demanding "quick fixes" and try to contribute more pragmatically to SFML. Keep up the great work!

@mantognini

This comment has been minimized.

Show comment
Hide comment
@mantognini

mantognini Aug 26, 2014

Member

@LaurentGomila, yes that's the same line but I'm really confused.. I don't understand what's about this NSFileManagerDelegate here.. It's supposed to be NSApplicationDelegate. Or did they change something in 10.10 regarding application delegate?

@hiramgeeks can you try to apply the fix mentioned on the Laurent's link and tell me if it change something at all.

Member

mantognini commented Aug 26, 2014

@LaurentGomila, yes that's the same line but I'm really confused.. I don't understand what's about this NSFileManagerDelegate here.. It's supposed to be NSApplicationDelegate. Or did they change something in 10.10 regarding application delegate?

@hiramgeeks can you try to apply the fix mentioned on the Laurent's link and tell me if it change something at all.

@hiramgeeks

This comment has been minimized.

Show comment
Hide comment
@hiramgeeks

hiramgeeks Aug 26, 2014

Yeah, I let you know soon.

hiramgeeks commented Aug 26, 2014

Yeah, I let you know soon.

@hiramgeeks

This comment has been minimized.

Show comment
Hide comment
@hiramgeeks

hiramgeeks Aug 26, 2014

Actually, just replacing the line 228 (former 219) doesn't solve the problem:

[ 15%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/WindowImplCocoa.mm.o
/Users/hiram/Development/SFML/src/SFML/Window/OSX/WindowImplCocoa.mm:228:32: error: 
      cannot initialize a parameter of type 'id<NSFileManagerDelegate>' with an
      rvalue of type 'SFApplicationDelegate *'
            [NSApp setDelegate:[[SFApplicationDelegate alloc] init]];
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/objc/NSObject.h:60:1: note: instance method 'init' is assumed to
      return an instance of its receiver type ('SFApplicationDelegate *')
- (instancetype)init;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSFileManager.h:109:47: note: 
      passing argument to parameter 'delegate' here
@property (assign) id <NSFileManagerDelegate> delegate NS_AVAILABLE(10_5, 2_0);
                                              ^
1 error generated.
make[2]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/WindowImplCocoa.mm.o] Error 1
make[1]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/all] Error 2
make: *** [all] Error 2

hiramgeeks commented Aug 26, 2014

Actually, just replacing the line 228 (former 219) doesn't solve the problem:

[ 15%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/WindowImplCocoa.mm.o
/Users/hiram/Development/SFML/src/SFML/Window/OSX/WindowImplCocoa.mm:228:32: error: 
      cannot initialize a parameter of type 'id<NSFileManagerDelegate>' with an
      rvalue of type 'SFApplicationDelegate *'
            [NSApp setDelegate:[[SFApplicationDelegate alloc] init]];
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/objc/NSObject.h:60:1: note: instance method 'init' is assumed to
      return an instance of its receiver type ('SFApplicationDelegate *')
- (instancetype)init;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSFileManager.h:109:47: note: 
      passing argument to parameter 'delegate' here
@property (assign) id <NSFileManagerDelegate> delegate NS_AVAILABLE(10_5, 2_0);
                                              ^
1 error generated.
make[2]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/WindowImplCocoa.mm.o] Error 1
make[1]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/all] Error 2
make: *** [all] Error 2
@hiramgeeks

This comment has been minimized.

Show comment
Hide comment
@hiramgeeks

hiramgeeks Aug 26, 2014

@mantognini couldn't it just return an (id) on init instead of (instancetype)?

hiramgeeks commented Aug 26, 2014

@mantognini couldn't it just return an (id) on init instead of (instancetype)?

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 26, 2014

Member

After a bit of Googling, it seems to be a known issue when porting to OS X 10.10. Maybe we can find the clean solution by searching a little more.

Member

LaurentGomila commented Aug 26, 2014

After a bit of Googling, it seems to be a known issue when porting to OS X 10.10. Maybe we can find the clean solution by searching a little more.

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 26, 2014

Member

Apparently, it would be enough to replace NSApp with [NSApplication sharedApplication] in this line.

Member

LaurentGomila commented Aug 26, 2014

Apparently, it would be enough to replace NSApp with [NSApplication sharedApplication] in this line.

@hiramgeeks

This comment has been minimized.

Show comment
Hide comment
@hiramgeeks

hiramgeeks Aug 26, 2014

Let me give it a try

hiramgeeks commented Aug 26, 2014

Let me give it a try

@hiramgeeks

This comment has been minimized.

Show comment
Hide comment
@hiramgeeks

hiramgeeks Aug 26, 2014

Yeah, it was enough! Everything compiled now.

hiramgeeks commented Aug 26, 2014

Yeah, it was enough! Everything compiled now.

@hiramgeeks

This comment has been minimized.

Show comment
Hide comment
@hiramgeeks

hiramgeeks Aug 26, 2014

A popular saying here in Brazil: "we killed two rabbits with a single hit". Two issues resolved.

hiramgeeks commented Aug 26, 2014

A popular saying here in Brazil: "we killed two rabbits with a single hit". Two issues resolved.

@hiramgeeks

This comment has been minimized.

Show comment
Hide comment
@hiramgeeks

hiramgeeks Aug 26, 2014

@LaurentGomila, would it be convenient if I submit a pull request for those issues or you can change that on your side?

hiramgeeks commented Aug 26, 2014

@LaurentGomila, would it be convenient if I submit a pull request for those issues or you can change that on your side?

@mantognini

This comment has been minimized.

Show comment
Hide comment
@mantognini

mantognini Aug 26, 2014

Member

That was an interesting bug that they introduced there. ^^'

Anyway, I have other modifications to the same file so I'll apply that one too. The fix won't come until next week or so, though.

Member

mantognini commented Aug 26, 2014

That was an interesting bug that they introduced there. ^^'

Anyway, I have other modifications to the same file so I'll apply that one too. The fix won't come until next week or so, though.

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 26, 2014

Member

That's great.

@hiramgeeks, thanks a lot for your help on this issue.

Member

LaurentGomila commented Aug 26, 2014

That's great.

@hiramgeeks, thanks a lot for your help on this issue.

@hiramgeeks

This comment has been minimized.

Show comment
Hide comment
@hiramgeeks

hiramgeeks Aug 26, 2014

@mantognini yeah, developing for iOS, I noticed Apple changing the API more drastically since last year. Noticeable from iOS 7 and OS X 10.9. Really strange bug, but understandable. Mr. Jobs is not there anymore yelling to make things work as before. LOL

@LaurentGomila my honor, sir. u r welcome

hiramgeeks commented Aug 26, 2014

@mantognini yeah, developing for iOS, I noticed Apple changing the API more drastically since last year. Noticeable from iOS 7 and OS X 10.9. Really strange bug, but understandable. Mr. Jobs is not there anymore yelling to make things work as before. LOL

@LaurentGomila my honor, sir. u r welcome

@eXpl0it3r

This comment has been minimized.

Show comment
Hide comment
@eXpl0it3r

eXpl0it3r Sep 19, 2014

Member

@mantognini Have you already pushed the other modification? If so can you link it?

Member

eXpl0it3r commented Sep 19, 2014

@mantognini Have you already pushed the other modification? If so can you link it?

@mantognini

This comment has been minimized.

Show comment
Hide comment
@mantognini

mantognini Sep 20, 2014

Member

@eXpl0it3r No, it's not yet implemented. I'll do it either later tonight or on Monday.

Member

mantognini commented Sep 20, 2014

@eXpl0it3r No, it's not yet implemented. I'll do it either later tonight or on Monday.

@mantognini mantognini self-assigned this Sep 20, 2014

@mantognini mantognini added this to the 2.2 milestone Sep 20, 2014

@mantognini mantognini closed this Sep 21, 2014

LaurentGomila referenced this issue Sep 22, 2014

Added support for OS X 10.10
Note: this only fix the compilation process. SFML was not thoroughly
tested on this OS yet.

@mantognini mantognini self-assigned this Feb 7, 2016

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