Has anyone tried build spring using llvm/clang tools?

Has anyone tried build spring using llvm/clang tools?

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Super Mario
Posts: 823
Joined: 21 Oct 2008, 02:54

Has anyone tried build spring using llvm/clang tools?

Post by Super Mario »

Reason:xcode (Mac IDE) is planning to replace gcc with llvm/clang in the future. So it would be save a lot of trouble in the future if spring-devs start compiling with clang to detect any problems with building spring with llvm/clang and then summit a bug report to the llvm/clang.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Has anyone tried build spring using llvm/clang tools?

Post by zwzsg »

Well, that would be implying someone is making Spring builds for Mac. Have you seen any?
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Has anyone tried build spring using llvm/clang tools?

Post by SpliFF »

In my opinion it should be CMake/GCC or nothing. There is zero value in maintaining buildsystems for proprietry (yeah, it's BSD-licensed but only Apple use Objective-C) software at the project level. It's possible CMake will write compatible Xcode project files when the technology matures.

History shows that Spring has a poor history of maintaining alternate build systems. Visual Studio builds and SCons have both bitrotted to the point they aren't worth bothering with. Dedicated Xcode support will suffer the same fate.

Apart from the usual world domination stuff I see no point in Apple dropping GCC. I see no point in Objective-C at all. If Apple want to put their developers through the grinder that's not really our problem to solve.

And yeah, Spring hasn't built on MacOSX in years. It probably could but none of the developers have Macs. Maybe in future a DarwinPorts project would probably make more sense than bending the project to Apple's ridiculous sense of elitism.
Last edited by SpliFF on 15 Oct 2010, 12:14, edited 1 time in total.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Has anyone tried build spring using llvm/clang tools?

Post by hoijui »

as OS X is BSD based, i guess it is pretty much impossible they ever can get rid of GCC, which would of course be the most stupid thing ever.. will just never happen.
this is not the what is stated here though. If we had an engine dev on OS X, and if he insists in using X Code, he would be free to maintain a project for that of course, though it would be .. similarly stupid, as he had access to all the linux IDEs, and spring is of course not using any OS X specific stuff that X Code could excel in.
i know of at least 4 devs that use VS to compile spring, and i still hear a lot of complaints that the project files are not well.

short: no!
Super Mario
Posts: 823
Joined: 21 Oct 2008, 02:54

Re: Has anyone tried build spring using llvm/clang tools?

Post by Super Mario »

Mac IS planning to replace gcc in the future. That's why the clang devs goals is make gcc compatibly. "http://clang.llvm.org/index.html" Apple is funding the clang project which shows they have no longer interest in gcc at this current state. The llvm gives them 40% perfomace boost in something I can't not remember. Apple wants the transation from gcc to clang to be painless as possible. Besides has anyone look at the features list?. I am in love because of it.

Edit: anyway noone has even answer my question.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Has anyone tried build spring using llvm/clang tools?

Post by hoijui »

when it will be fully compatible with gcc, we will not have to make adjustments.
if anyone that responded yet had tried it, they sure would have said so. those that did not try may not answer with "no, i did not try!".

learning some basic human communication rules is gooood!!
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Has anyone tried build spring using llvm/clang tools?

Post by Tobi »

SpliFF wrote:In my opinion it should be CMake/GCC or nothing. There is zero value in maintaining buildsystems for proprietry (yeah, it's BSD-licensed but only Apple use Objective-C) software at the project level. It's possible CMake will write compatible Xcode project files when the technology matures.
LLVM/clang is free/open source, not proprietary, and has nothing more to do with Apple then GCC has to do with Red Hat.
SpliFF wrote: History shows that Spring has a poor history of maintaining alternate build systems. Visual Studio builds and SCons have both bitrotted to the point they aren't worth bothering with. Dedicated Xcode support will suffer the same fate.
Xcode != LLVM/clang. The only relation is that Apple apparently wants to switch from GCC to LLVM/clang at some point.

(Which is quite understandable as GCC's architecture and performance isn't really up to date with modern practices anymore as far as I know; LLVM is a more modern (but less well established at this moment, I think) compiler backend project.)
SpliFF wrote: And yeah, Spring hasn't built on MacOSX in years. It probably could but none of the developers have Macs.
Wrong, it has.
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Has anyone tried build spring using llvm/clang tools?

Post by SpliFF »

Tobi wrote:LLVM/clang is free/open source, not proprietary, and has nothing more to do with Apple then GCC has to do with Red Hat.
That's simply untrue. Apple are the primary (possibly only) source of developers and funding for LLVM/clang. The wikipedia page even lists Apple Inc. as the developers. Where do you get your information?

The obvious conclusion anyone who understands the industry can make that is Apple want out of the GNU GPL infrastructure so they eventually reach the sort of developer lock-in that Microsoft have always enjoyed. It's exactly what they did with the OS, take something that's free and then make progressive secret changes until it's non-free. When Apple eventually drop support for the BSD version of llvm/clang in favour of some future Apple-only flavour I won't be the slightest bit surprised. When the Apple devs and funding leave the free llvm/clang project it'll be dead in the water, won't get new features, won't compile anything for OSX 12. It's "embrace and extend" any way you look at it.

If the iPod teaches us anything it's that Apple have no concerns about using their market weight to control and suppress third-party development when it suits them.

I can't comment on whether clang or GCC is better from a technical standpoint. All the information I've seen comes from the developers themselves (aka Apple) so it's hard to know what's true and what isn't. I can say though I've owned Apple computers since the 80's and exclusivity and lock-in have always been their game. All this new open-source lovin they pretend to have is just a sham.
Tobi wrote:
SpliFF wrote: And yeah, Spring hasn't built on MacOSX in years. It probably could but none of the developers have Macs.
Wrong, it has.
News to me but then I presume you're making a distinction between "it builds" and "it works". The downloads page still lists the mac port as unfinished.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Has anyone tried build spring using llvm/clang tools?

Post by hoijui »

are you sure Red Hat did not sponsor any GCC development?
and how did you get from "unfinished" to "has never been built in years"? :D

i totally agree on the Apple/BSD thing.
if you see this page:
http://clang.llvm.org/comparison.html
under Clang vs GCC, they have this as a pro point of clang:
GCC is licensed under the GPL license. clang uses a BSD license, which allows it to be used by projects that do not themselves want to be GPL.
the most realistic bad thing that would (and i am sure it will) happen there, is that they will add pro extensions to the compiler (letting it generate faster code and what not), which will not be free, and may not be used under linux/BSD, but only for OS X. which means that all the Open source stuff fill run faster/better under OS X then under Linux, which of course.. has other implications.
and yeah.. i do not like that, and of course dislike the BSD license there. making the code compile faster is the first step to get devs of open source tools to switch to clang, so they get a lot of bug testing and feature proving and what not for free.
SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: Has anyone tried build spring using llvm/clang tools?

Post by SirMaverick »

Super Mario wrote:Has anyone tried build spring using llvm/clang tools?
Yes. Fails to compile. Springlobby works.
Last edited by SirMaverick on 17 Oct 2010, 15:53, edited 2 times in total.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Has anyone tried build spring using llvm/clang tools?

Post by Tobi »

The LLVM website mentions it's hosted by the University of Illinois. Don't know of course whether they also still do development, but IMO it's a bit silly to just drop any open source project just because Apple is involved and/or the license is too liberal. (If it's good enough, RH could just fork it too...)

(Although I agree that it would have been better if it was (A)GPL v3..)

EDIT: oh I already see the issue; AFAICS LLVM is reasonable independent, but Apple is specifically sponsoring clang.
SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: Has anyone tried build spring using llvm/clang tools?

Post by SirMaverick »

Super Mario wrote:Has anyone tried build spring using llvm/clang tools?
Yes. Compiles after some changes. (Disclaimer: I'm not 100% sure what I'm doing.)

Many warnings, among others:

Code: Select all

clang: warning: argument unused during compilation: '-mfpmath=sse'
clang: warning: argument unused during compilation: '-fsingle-precision-constant'
clang: warning: argument unused during compilation: '-frounding-math'
clang: warning: argument unused during compilation: '-mieee-fp'
Probably the reason why it desyncs.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Has anyone tried build spring using llvm/clang tools?

Post by AF »

Am I not the only one thinking of webkit?
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: Has anyone tried build spring using llvm/clang tools?

Post by Neddie »

Surely you meant GPL v2, Tobi.
Super Mario
Posts: 823
Joined: 21 Oct 2008, 02:54

Re: Has anyone tried build spring using llvm/clang tools?

Post by Super Mario »

Neddie wrote:GPL v2,
Hell no. If you want to use a GPL license then all means use gcc.(or fork llvm/clang, if you have lots of time and money in your hands.)
Super Mario
Posts: 823
Joined: 21 Oct 2008, 02:54

Re: Has anyone tried build spring using llvm/clang tools?

Post by Super Mario »

SirMaverick wrote:
Super Mario wrote:Has anyone tried build spring using llvm/clang tools?
Yes. Compiles after some changes. (Disclaimer: I'm not 100% sure what I'm doing.)

Many warnings, among others:

Code: Select all

clang: warning: argument unused during compilation: '-mfpmath=sse'
clang: warning: argument unused during compilation: '-fsingle-precision-constant'
clang: warning: argument unused during compilation: '-frounding-math'
clang: warning: argument unused during compilation: '-mieee-fp'
Probably the reason why it desyncs.
which version are you using? Src or 2.8?
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: Has anyone tried build spring using llvm/clang tools?

Post by koshi »

I used svn from saturday for SpringLobby. I think SirMaverick moved to svn as well for spring.
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Has anyone tried build spring using llvm/clang tools?

Post by SpliFF »

AF wrote:Am I not the only one thinking of webkit?
You mean this?
They made a conscious decision about not working with KDE developers. All I'm asking for is that all the clueless people stop talking about the cooperation between Safari/Konqueror developers and how great it is. There's absolutely nothing great about it. In fact "it" doesn't exist. Maybe for Apple - at the very least for their marketing people. Clear?
Anyway, sorry to go OT. I just wanted to point out how "rewarding" Apple's open-source involvement really is and why we'd be nuts to rely on it.
SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: Has anyone tried build spring using llvm/clang tools?

Post by SirMaverick »

koshi wrote:I used svn from saturday for SpringLobby. I think SirMaverick moved to svn as well for spring.
Yes.
Post Reply

Return to “Engine”