Can no longer build Clang with MSVC

Something has changed in the Clang project in the last 48 hours that means I can no longer build clangFrontEnd, using MSVC Express 2008.

The problem is in the move semantics of ownership.h, and looks like a Visual C++ bug that a class template cannot access members of its own type in its constructor. I have tried following the note in the comments to enable /Za but that doesn't seem to be helping.

The really odd thing is that it does not look like this file has been updated for a while, so why it suddenly fails for me now I have no idea.

Any hints that might get me started again appreciated.

Also (unrelated) I have been waiting for >5 days now for a password to Bugzilla, and not received a response from mailing the support link on the sign-up page (other than to say its in an a moderator queue) Is this normal?

If not, again any help in expediting the process would be appreciated!

Thanks,
AlisdairM

Something has changed in the Clang project in the last 48 hours that means I can no longer build clangFrontEnd, using MSVC Express 2008.

The problem is in the move semantics of ownership.h, and looks like a Visual C++ bug that a class template cannot access members of its own type in its constructor. I have tried following the note in the comments to enable /Za but that doesn’t seem to be helping.

The really odd thing is that it does not look like this file has been updated for a while, so why it suddenly fails for me now I have no idea.

Any hints that might get me started again appreciated.

Ugh. We need more Clang developers working with Visual C++. Sorry, I don’t have a good answer for you. If you find a solution, or if anyone finds a solution, I’ll be happy to commit it ASAP.

Also (unrelated) I have been waiting for >5 days now for a password to Bugzilla, and not received a response from mailing the support link on the sign-up page (other than to say its in an a moderator queue) Is this normal?

Tanya Lattner replied with:

I’m sorry, there was a problem on the llvm.org server. I believe it should be fixed now. Please try to create your account again and if you have problems, feel free to email me directly offlist.

Have you tried to create your account again?

  • Doug

AlisdairM(public) wrote:

Something has changed in the Clang project in the last 48 hours that means I can no longer build clangFrontEnd, using MSVC Express 2008.

The problem is in the move semantics of ownership.h, and looks like a Visual C++ bug that a class template cannot access members of its own type in its constructor. I have tried following the note in the comments to enable /Za but that doesn't seem to be helping.

The really odd thing is that it does not look like this file has been updated for a while, so why it suddenly fails for me now I have no idea.

Any hints that might get me started again appreciated.
  

I have no idea, but I'll take a look at it tomorrow evening. (That's
about 20 hours from now.)

Also (unrelated) I have been waiting for >5 days now for a password to Bugzilla, and not received a response from mailing the support link on the sign-up page (other than to say its in an a moderator queue) Is this normal?
  

No, Bugzilla passwords should be sent within the hour, actually. Anyone
should be able to get access to Bugzilla.

Sebastian

AlisdairM(public) schrieb:

Something has changed in the Clang project in the last 48 hours that means I can no longer build clangFrontEnd, using MSVC Express 2008.
  

This looks really like a bug in MSVC. If you remove the virtual in

    virtual void DeleteExpr(ExprTy *E) {}
    virtual void DeleteStmt(StmtTy *S) {}
    virtual void DeleteTemplateParams(TemplateParamsTy *P) {}

the bug goes away. However this is not an option. I've attached a really ugly workaround (please, please don't blame me, it is not meant to get checked in). If you remove the c-style-cast in the get function the compiler tells you to a certain degree what's going on internally. It looks like MSVC doesn't have the right template argument and instead selects some random name. Thus I'm not even sure if MSVC generates working code at all.

Best Olaf

ugly_workaround.patch (873 Bytes)

I like your patch better than Alistair's, since it collects the ugliness in
one place. But I like mine best. Attached.

Also, how can you guys live with all these warnings? I'm going to generate
a few patches to get rid of most of them and commit them once I've tested
them on Linux.

Sebastian

evil_workaround.patch (501 Bytes)

OK, never mind my previous mail, apparently that workaround doesn't
actually work.

Sebastian

Sebastian Redl schrieb:

Also, how can you guys live with all these warnings? I'm going to generate

a few patches to get rid of most of them and commit them once I've tested

them on Linux.
  

Thats easy: after each CMake run turn off warnings 4291 & 4805 (switch
/wXXX) :wink:
Seriously: I had changed this long ago if I would know how to do so (I'm
not that familiar with that CMake stuff).

Best
Olaf Krzikalla

Thats easy: after each CMake run turn off warnings 4291 & 4805 (switch
/wXXX) :wink:
Seriously: I had changed this long ago if I would know how to do so (I'm
not that familiar with that CMake stuff).
  
just add it to line 27 and 50 of the main clang CMakeLists.txt
attached an example git patch

Cédric

patch1.patch (965 Bytes)

Hi Cédric,

AFAICT, this patch hasn't been applied and doesn't apply anymore. Is it still needed?

-Chris

Chris Lattner schrieb:

AFAICT, this patch hasn't been applied and doesn't apply anymore. Is it still needed?

-Chris

Well, 'needed' is carrying things too far. But it would be nice, definitely.

Best
Olaf Krzikalla

Olaf Krzikalla a écrit :

Chris Lattner schrieb:
  

AFAICT, this patch hasn't been applied and doesn't apply anymore. Is it still needed?

-Chris
    
Well, 'needed' is carrying things too far. But it would be nice, definitely.
  
I can commit something if there is an agrement, I just need the list of warning to disable (I don't have the time to sort them at the moment).
Perhaps more important, the build is currently broken on windows. should one of the proposed patch be applied, temporarilly?

Cédric

ps: this was not a svn patch, this is probably why it didn't apply.

I'm happy to let you guys do the right thing for windows :slight_smile:

-Chris