Closed ghost closed 10 years ago
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.
That's a CMake issue and not really something anyone here can change (other than submitting a patch to CMake).
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).
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".
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.
@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.
@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.
Oupsi! :blush:
You guys are probably right. The regex should be updated indeed!
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: :blush:]
You guys are probably right. The regex should be updated indeed!
— Reply to this email directly or view it on GitHub https://github.com/LaurentGomila/SFML/issues/691#issuecomment-53415089.
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 +
.)
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.
Meh, filename confused me. :)
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
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!
@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.
Yeah, I let you know soon.
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
@mantognini couldn't it just return an (id) on init instead of (instancetype)?
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.
Apparently, it would be enough to replace NSApp with [NSApplication sharedApplication] in this line.
Let me give it a try
Yeah, it was enough! Everything compiled now.
A popular saying here in Brazil: "we killed two rabbits with a single hit". Two issues resolved.
@LaurentGomila, would it be convenient if I submit a pull request for those issues or you can change that on your side?
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.
That's great.
@hiramgeeks, thanks a lot for your help on this issue.
@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
@mantognini Have you already pushed the other modification? If so can you link it?
@eXpl0it3r No, it's not yet implemented. I'll do it either later tonight or on Monday.
Hey,
I'm trying to compile SFML (master) on a OS X 10.10 (Preview) iMac. CMake interrupts the process with the following message:
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