Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Why is the official OS X Clang download 10.8+ and not 10.5+?  (Read 6823 times)

0 Members and 1 Guest are viewing this topic.

Cornstalks

  • Full Member
  • ***
  • Posts: 180
    • View Profile
    • My Website
On the download page it says the second OS X option is "Clang (OS X 10.8+)". Why 10.8+? Shouldn't it be 10.5+?

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Why is the official OS X Clang download 10.8+ and not 10.5+?
« Reply #1 on: May 12, 2013, 09:36:57 am »
nope, that's correct because I can't guarantee it will work under 10.8 as the clang/libc++ version used are provided by Apple for 10.8 only.
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: Why is the official OS X Clang download 10.8+ and not 10.5+?
« Reply #2 on: May 12, 2013, 01:46:31 pm »
Uh? OS X 10.7 (but not OS X 10.6) is also shipped with libc++ (dunno about clang), wouldn't it work for this version?
Want to play movies in your SFML application? Check out sfeMovie!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Why is the official OS X Clang download 10.8+ and not 10.5+?
« Reply #3 on: May 12, 2013, 04:00:27 pm »
I'm not sure.. I don't have a 10.7 to test.

There is also another problem : since you would typically use clang and libc++ for its C++11 support, you might use part of the standard that are not yet available on 10.7 (since the last version of Xcode is probably not compatible – or the next one won't be compatible).

That's the main reason I can't make any guarantee on the retro compatibility.
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: Why is the official OS X Clang download 10.8+ and not 10.5+?
« Reply #4 on: May 12, 2013, 04:13:32 pm »
Testing would be indeed needed but.. comparing the exported symbols present in libc++ for both versions from the SDKs shows that the OS X 10.8 version introduced very few new symbols (mostly removed ones). I counted something like 5 symbols changed, 1 added and 85 removed out of ~1400 symbols. I know this does not guarantee anything but it's still a good indication about compatibility.

The main point I would actually worry about is.. what is the default compiler for the Xcode version that runs on OS X 10.7, Clang or GCC? If it's the later, supporting OS X 10.7 for the Clang package will probably cause more harm than anything else.
Want to play movies in your SFML application? Check out sfeMovie!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Why is the official OS X Clang download 10.8+ and not 10.5+?
« Reply #5 on: May 12, 2013, 04:19:17 pm »
There's not issue with the default compiler because I override it with the template. When creating a new project you can choose your version of SFML. The compiler is then selected accordingly.  ;)

SFML / OS X developer

Cornstalks

  • Full Member
  • ***
  • Posts: 180
    • View Profile
    • My Website
Re: Why is the official OS X Clang download 10.8+ and not 10.5+?
« Reply #6 on: May 12, 2013, 04:31:36 pm »
Xcode 4.6.2 (the latest version) runs on OS X 10.7, and it'll default to the same things that Xcode 4.6.2 on 10.8 does.

Also, I'm not sure that the "default" settings make a huge difference, seeing as people will most likely use the Xcode templates SFML provides, so then it's SFML's template's defaults that make a difference, not the Xcode defaults.

Also, 10.7 supports C++11 & libc++ just fine. There's a reason you can set your target to 10.7 when building a C++11 application in Xcode. it's not problematic at all. You don't have to worry about missing symbols.

And finally, I'd also suggest noting on the downloads page that the Clang builds are linking to libc++ and support C++11. Otherwise, it's not obvious they link to libc++ and support C++11 (and thus look like they should support OS X 10.5, which is why I was puzzled in the first place).

Cornstalks

  • Full Member
  • ***
  • Posts: 180
    • View Profile
    • My Website
Re: Why is the official OS X Clang download 10.8+ and not 10.5+?
« Reply #7 on: May 14, 2013, 03:48:52 am »
And finally, I'd also suggest noting on the downloads page that the Clang builds are linking to libc++ and support C++11. Otherwise, it's not obvious they link to libc++ and support C++11 (and thus look like they should support OS X 10.5, which is why I was puzzled in the first place).
I just want to emphasize this because I think this is what is causing this guy's problem.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Why is the official OS X Clang download 10.8+ and not 10.5+?
« Reply #8 on: May 14, 2013, 08:47:47 am »
sorry for the late answer, was busy with some exams and stuff..

Quote
Also, 10.7 supports C++11 & libc++ just fine. There's a reason you can set your target to 10.7 when building a C++11 application in Xcode. it's not problematic at all. You don't have to worry about missing symbols.

I'm still not entirely convinced: some C++11 features are added with updates, like the user defined literals or std::async very recently. Now suppose you use those UDL in your code (so you have the very last version of clang & libc++). You then ship your app to 10.7 users. What happens if they don't have the last version of libc++? Symbols would be missing, right? (Or did I miss some 101 info?)



Quote
And finally, I'd also suggest noting on the downloads page that the Clang builds are linking to libc++ and support C++11. Otherwise, it's not obvious they link to libc++ and support C++11.
It's explained in the tutorial but we could add a comment about libc++/C++11 too.. I'll discuss with Laurent.
« Last Edit: May 14, 2013, 08:49:58 am by Hiura »
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: Why is the official OS X Clang download 10.8+ and not 10.5+?
« Reply #9 on: May 14, 2013, 09:33:39 am »
I'm still not entirely convinced: some C++11 features are added with updates, like the user defined literals or std::async very recently. Now suppose you use those UDL in your code (so you have the very last version of clang & libc++). You then ship your app to 10.7 users. What happens if they don't have the last version of libc++? Symbols would be missing, right? (Or did I miss some 101 info?)
Isn't it the purpose of building against some specific SDK?
Want to play movies in your SFML application? Check out sfeMovie!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Why is the official OS X Clang download 10.8+ and not 10.5+?
« Reply #10 on: May 14, 2013, 09:42:07 am »
I think the SDK only influences the use of libraries like Cocoa.
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: Why is the official OS X Clang download 10.8+ and not 10.5+?
« Reply #11 on: May 14, 2013, 11:10:57 am »
No, the SDKs are a full representation of all the libraries and frameworks of a specific OS X version. But these libraries do not contain any implementation, only the exported symbols. This allows you to make sure that every symbol is present on a specific OS X version when you use that SDK for linking.
Want to play movies in your SFML application? Check out sfeMovie!

Cornstalks

  • Full Member
  • ***
  • Posts: 180
    • View Profile
    • My Website
Re: Why is the official OS X Clang download 10.8+ and not 10.5+?
« Reply #12 on: May 14, 2013, 04:08:13 pm »
I'm still not entirely convinced: some C++11 features are added with updates, like the user defined literals or std::async very recently. Now suppose you use those UDL in your code (so you have the very last version of clang & libc++). You then ship your app to 10.7 users. What happens if they don't have the last version of libc++? Symbols would be missing, right? (Or did I miss some 101 info?)
Xcode lets you target 10.7 with libc++ and clang and C++11 because it works. If you find issues, it's worth a bug report to Apple. Why would this even be a problem for SFML though? SFML doesn't use C++11.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Why is the official OS X Clang download 10.8+ and not 10.5+?
« Reply #13 on: May 17, 2013, 11:16:26 am »
Okay, thanks for your precisions. I think I see the picture now. Still, the binaries are for 10.8+ since I didn't select 10.7 SDK. And that won't be changed before the next release (2.1).

I would need to install a 10.7 to test it then, but that's another story.
SFML / OS X developer