Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'addOverlay': is not a member of 'clang::CompilerInvocation' #285

Closed
LegalizeAdulthood opened this issue Feb 13, 2019 · 13 comments
Closed

Comments

@LegalizeAdulthood
Copy link

I was supposed to talk about cling tonight in my user group meeting as part of a discussion on interactive C++ tools. However, once again, cling doesn't have prebuilt Windows releases and doesn't build out of the box:

(ClCompile target) ->
  c:\code\cling\zip\build\cling-src\tools\cling\lib\interpreter\interpreter.cpp(309): error C2039: 'addOverlay': is not a member of 'clang::CompilerInvocation' [C:\Code\cling\zip\build\builddir\tools\cling\lib\Interpreter\obj.clingInterpreter.vcxproj]

I unzipped the 0.5 release and ran cpt.py in tools/packaging. After much grinding, it gets an error compiling. If I comment out the offending line, it then gets an error linking saying it can't find ~raw_ostream. I see that LLVMSupport is a proper dependency of cling, so I don't know why it doesn't find ~raw_ostream.

You need to use git more sensibly to ensure that your releases actually compile and link, either by using git modules or actually forking the necessary stuff in github and making a feature branch.

This happened to me the last time I tried to evaluate cling. It has potential, but the way you're managing your releases and your source code is really prohibitive to letting people try it. It's not like Windows is some obscure OS that noone uses.

@LegalizeAdulthood
Copy link
Author

By "forking stuff", I am referring to forking the LLVM/clang repositories so that cling is a feature branch on top of LLVM/clang.

@Axel-Naumann
Copy link
Member

Does the current master of cling + cling-patches of root.cern/git/llvm.git , root.cern/git/clang.git work for you? (How's that not "forking the necessary stuff in github and making a feature branch"?)

If things suck, please contribute to make it work better!

@Axel-Naumann
Copy link
Member

No response, I don't know waht to fix.

@LegalizeAdulthood
Copy link
Author

Sorry, I didn't see your comment from Feb 21. Given that your comment was 1 week after I filed the bug when I had the problem, the answer to your question is no, it didn't work. That's why I filed the bug.

@Axel-Naumann
Copy link
Member

Can you try the more traditional approach here: https://root.cern.ch/cling-build-instructions
Clone llvm and clang, both from root.cern.ch/git, then clone cling and off you go.

@bellenot can you confirm that the cling-on-Windows build works? How do you build usually?

@LegalizeAdulthood
Copy link
Author

I did follow your web site instructions exactly the last time I tried this. It takes many hours to compile all this stuff and I don't have the time to do that right now, sorry.

Why do you have your own git repo for clang/llvm? Why aren't you using the llvm-mirror repositories on github?

Why aren't you using git submodules in order to coordinate which versions of which repos you are using?

@bellenot
Copy link
Member

bellenot commented Jul 19, 2019

So here is what I did, after cloning the repos as described in :

C:\Users\bellenot\build\llvm\build>cmake -A x64 -Thost=x64 -DCMAKE_VERBOSE_MAKEFILE=ON ..\src
[...]
C:\Users\bellenot\build\llvm\build>cmake --build . --config Release -- /maxcpucount

And after 37 minutes, the build failed because of missing symbols in clingDemoPlugin:

C:\Users\bellenot\build\llvm\build\Release\bin\clingDemoPlugin.dll : fatal error LNK1120: 15 unresolved externals

But cling.exe (and everything else) was successfully built.

Note that the command line is broken, it displays weird characters, I'll try to fix this asap

@bellenot
Copy link
Member

And FYI, the issue with bad characters has been fixed in the current master

@Axel-Naumann
Copy link
Member

@LegalizeAdulthood better now?

Thanks for the suggestion to use submodules - it has come up in the past, we never found it useful enough (we don't have a lot of people complaining about having to match the versions).

@LegalizeAdulthood
Copy link
Author

It will be a while before I have time to come back to this.

@LegalizeAdulthood
Copy link
Author

Possibly months until I can come back to it, if ever.

This is why I'm suggesting that you have prebuilt Windows binaries as releases. I'm very familiar with the clang tree, having contributed many times to clang-tidy. If I am having trouble building this, your average person will give up after 5 minutes of building, if they can even get that far.

This is why you need prebuilt binary releases. Building this stuff is too complicated and takes WAY too long for 99.999% of the people that might be interested in trying this tool.

@Axel-Naumann
Copy link
Member

Re Windows binaries: that's #337

@ferdymercury
Copy link
Contributor

Closing as the requested binaries is being tracked here #337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants