Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Coffee corner » Clang now fully supports U++
Clang now fully supports U++ [message #29144] Thu, 07 October 2010 12:51 Go to next message
dolik.rce is currently offline  dolik.rce
Messages: 1758
Registered: August 2008
Location: Czech Republic
Senior Contributor

Hi everyone!

Few days ago new version of LLVM was released. Since the release notes claimed that clang compiler now fully supports C++ standards, I decided to give it a try and see if it is mature enough to digest the complicated internals of U++.

Here is what I found:
There are some minor glitches, but mostly very easy to solve. I will soon post patched files. It will be probably just a few lines. For example it doesn't like something in the __BREAK__ statement (but that is only in debug mode) or missing some constructors for classes used with GLOBAL_VAR macro. I successfully compiled some of the example apps (wc,UWord,...) and also TheIDE. And as we all know, if it compiles TheIDE, it'll compile pretty much anything Wink

I really appreciate the verbosity of this compiler and I think even the compilation times are little shorter then gcc (that is just my feeling, I did not measure it). In my opinion it is definitely worthed to use it and to ensure U++ is compatible.

Best regards,
Honza
Re: Clang now fully supports U++ [message #29145 is a reply to message #29144] Thu, 07 October 2010 14:59 Go to previous messageGo to next message
Rishi is currently offline  Rishi
Messages: 39
Registered: August 2010
Location: Trincomalee, Sri Lanka
Member
Good to make it built-in. Thanks for info. Very Happy
Re: Clang now fully supports U++ [message #29154 is a reply to message #29144] Thu, 07 October 2010 21:05 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1354
Registered: November 2005
Location: Poland
Senior Contributor

That's a really good news! I must recompile my clang compilator .Hope to see your patches posted here soon Smile
Re: Clang now fully supports U++ [message #29169 is a reply to message #29154] Fri, 08 October 2010 12:45 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12055
Registered: November 2005
Ultimate Member
unodgs wrote on Thu, 07 October 2010 15:05

That's a really good news! I must recompile my clang compilator .Hope to see your patches posted here soon Smile


What patches? dolik.rce has theide open for commits... Smile (At least I hope so..)
Re: Clang now fully supports U++ [message #29175 is a reply to message #29169] Fri, 08 October 2010 16:59 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1758
Registered: August 2008
Location: Czech Republic
Senior Contributor

luzr wrote on Fri, 08 October 2010 12:45

unodgs wrote on Thu, 07 October 2010 15:05

That's a really good news! I must recompile my clang compilator .Hope to see your patches posted here soon Smile


What patches? dolik.rce has theide open for commits... Smile (At least I hope so..)


Yes, I have - but this time, theide doesn't require any patch Wink

The changed files are from Core and references. Mostly the changes required for clang are marked with #ifdef __clang__ to not disturb other compilers, but it probably wouldn't hurt anything anyway.

I tested by compiling everything from tutorial, examples, reference plus theide. Clang compiles everything that GCC does. Also I found few bugs in reference apps. Fix for SocketServer and Xmlize_std is included. XmlRpcCall is broken too, but I couldn't fix that.

Best regards,
Honza

EDIT: I got some more time so I changed the file from diff to archive with complete files.
  • Attachment: clang.zip
    (Size: 6.54KB, Downloaded 181 times)

[Updated on: Fri, 08 October 2010 20:49]

Report message to a moderator

Re: Clang now fully supports U++ [message #29184 is a reply to message #29144] Sat, 09 October 2010 00:41 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1758
Registered: August 2008
Location: Czech Republic
Senior Contributor

PS: I forgot to mention one important thing: The changed files I posted ensure that clangs works in optimal mode. The debug mode is still on my TODO list...
Re: Clang now fully supports U++ [message #29199 is a reply to message #29184] Sun, 10 October 2010 12:10 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1758
Registered: August 2008
Location: Czech Republic
Senior Contributor

dolik.rce wrote on Sat, 09 October 2010 00:41

PS: I forgot to mention one important thing: The changed files I posted ensure that clangs works in optimal mode. The debug mode is still on my TODO list...

Looks like I was mistaken/confused. Everything works fine even in debug mode with the changes posted above. Mirek could you check the files and commit them? Then I can put CLANG build method to packaging scripts...

Best regards,
Honza
Re: Clang now fully supports U++ [message #29524 is a reply to message #29199] Tue, 26 October 2010 13:58 Go to previous messageGo to next message
Sgifan is currently offline  Sgifan
Messages: 37
Registered: February 2010
Location: France
Member
I suppose all this is only true in Linux ?

clang is not ready for windows if i recall correctly

Re: Clang now fully supports U++ [message #29525 is a reply to message #29524] Tue, 26 October 2010 16:18 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1758
Registered: August 2008
Location: Czech Republic
Senior Contributor

Sgifan wrote on Tue, 26 October 2010 13:58

I suppose all this is only true in Linux ?

clang is not ready for windows if i recall correctly

Hi Sgifan,

I believe that the situation on windows should be quite similar. For some reason I could not found the binaries on llvm.org, but I downloaded it from http://code.google.com/p/i18n-zh/downloads/detail?name=LLVM- CLang-2.8-Mingw32-gcc-4.5.tar.xz and it appears to work. I tested it briefly on wine and compiled some simple files. I didn't manage to make it work with U++, but that was probably because I did not try hard enough Smile I think it also requires some header files from mingw or windows SDK, you will have to set up the paths correctly...

Let us know if you make it work and how Wink

Best regards,
Honza

Re: Clang now fully supports U++ [message #29602 is a reply to message #29525] Tue, 02 November 2010 22:25 Go to previous messageGo to next message
Tom1
Messages: 647
Registered: March 2007
Contributor
Hi,

Is there any specific reason the changes required to use CLANG instead of GCC have not been brought to the current upp codebase?

I would sure like to see this compiler in the builder selection list.

Best regards,

Tom
Re: Clang now fully supports U++ [message #29622 is a reply to message #29602] Thu, 04 November 2010 14:05 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12055
Registered: November 2005
Ultimate Member
Tom1 wrote on Tue, 02 November 2010 17:25

Hi,

Is there any specific reason the changes required to use CLANG instead of GCC have not been brought to the current upp codebase?

I would sure like to see this compiler in the builder selection list.

Best regards,

Tom


Such a change has my full support!

Mirek
Re: Clang now fully supports U++ [message #29627 is a reply to message #29622] Thu, 04 November 2010 15:40 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1758
Registered: August 2008
Location: Czech Republic
Senior Contributor

luzr wrote on Thu, 04 November 2010 14:05

Such a change has my full support!

Hi Mirek,
Can you support it by uploading those four files from archive few posts above? Smile They are in places where I don't have commit rights. Also checking if the changes are not harmful would be a great help Wink

Tom1: CLANG won't appear in the builder selection list(the one in Build Methods dialog), as it works perfectly fine with the GCC builder. But it can sure appear in your build method list Wink I attach my build method file to make it easier for you, just copy it into the configuration directory of theide (usually ~/.upp/theide/). The settings are mostly standard, so there is high probability that it will work as it is, without any adjustments.

Best regards,
Honza
  • Attachment: CLANG.bm
    (Size: 1.13KB, Downloaded 176 times)
Re: Clang now fully supports U++ [message #29640 is a reply to message #29627] Fri, 05 November 2010 10:13 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1354
Registered: November 2005
Location: Poland
Senior Contributor

Yesterday I rebuilt my clang in Win7 64 (one cmakelist.txt must be change manually to get clang compiled in 64b mode). Unfortunately clang still have problems with win api headers (but it's better than it was before) so I was not able to compile and run any upp gui application Sad. I hope they will fix it soon.
Re: Clang now fully supports U++ [message #29654 is a reply to message #29627] Fri, 05 November 2010 21:16 Go to previous messageGo to next message
Tom1
Messages: 647
Registered: March 2007
Contributor
Hi Honza,

Thanks for your notes. The CLANG.bm excellently covers what I had in mind -- in addition to the fixes you made to the source previously.

Now I'm having a different problem: Running any application I have compiled with CLANG results in 'Illegal instruction' printed on console followed by immediate end of execution.

Just to make sure the compiler works, I compiled the classic non-upp 'hello world' application directly from shell. That works OK.

Any idea what I'm doing wrong here? (I have a 32-bit Kubuntu 10.10, clang version 2.8, U++ 2791-maverick-i386 from your repository plus the sources have been updated from SVN today.)

Best regards,

Tom
Re: Clang now fully supports U++ [message #29660 is a reply to message #29654] Sat, 06 November 2010 00:55 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1758
Registered: August 2008
Location: Czech Republic
Senior Contributor

Hi Tom,

That is strange... I use clang 2.8 on 32-bit system too and never hit any runtime error. I'll try on Ubuntu on the weekend if I get some spare time, to see if it is related to the way ubuntu clang is compiled.

Honza
Re: Clang now fully supports U++ [message #29673 is a reply to message #29627] Sat, 06 November 2010 19:46 Go to previous message
mirek is currently offline  mirek
Messages: 12055
Registered: November 2005
Ultimate Member
dolik.rce wrote on Thu, 04 November 2010 10:40

luzr wrote on Thu, 04 November 2010 14:05

Such a change has my full support!

Hi Mirek,
Can you support it by uploading those four files from archive few posts above? Smile They are in places where I don't have commit rights. Also checking if the changes are not harmful would be a great help Wink



Done.

Mirek
Previous Topic: What is the biggest website design and devloper company?
Next Topic: Anybody still knowing anyone using Win98?
Goto Forum:
  


Current Time: Mon Oct 21 20:17:28 CEST 2019

Total time taken to generate the page: 0.01739 seconds