--
You received this message because you are subscribed to the Google Groups "OCLint Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to oclint-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I am open to other build systems as well, but one of CMake's advantages is cross-platform, so I would insist on having it at least be able to build with CMake. Clang has this document http://clang.llvm.org/get_started.html to build llvm/clang with CMake and Visual Studio, I guess if Clang can be built by CMake, building OCLint should be easy afterwards.
For the auto-registration mechanism, I am lack of the knowledge about how dll works in Windows. I need to study the differences in dynamic libraries between unix-like systems and Windows. Any good web references you can recommend?
I also need to think about a Windows box for continuous integration. You could check on http://pearland.qilongyi.com:5581 to see the current build status. (The machine for this CI is temporary, but I am using a personal url, will change it to oclint domain once we have an official buildbot.)
If you like, you could cherry pick your changes about the <ctime> inclusions, and send only these changes as a pull request now. ;)
On Friday, July 5, 2013 12:41:42 AM UTC+2, Longyi Qi wrote:building OCLint should be easy afterwards.
I just says that I have some difficulties to port my configuration into CMake.
(use different generator, remove some flags, change some properties).
I also need to think about a Windows box for continuous integration. You could check on http://pearland.qilongyi.com:5581 to see the current build status.
If you like, you could cherry pick your changes about the <ctime> inclusions, and send only these changes as a pull request now. ;)
--
Hi Joris,I tried to set up my Windows environment yesterday, but I don't think I am on the right track.
I got the Visual Studio 2008 installed, and I thought a cygwin might help. I was able to have cmake, git, svn configured and recognized in cmd. However, cmake couldn't find the correct C/C++ compiler.
But I thought Visual Studio should comes with C++ compiler, is that right?
May I know your dependency toolset? Am I missing something?
Thanks Joris for your help. I am working on MinGW now, making progress, but looks like it has some conflits with the Cygwin I have installed.
CMake can locate the correct MinGW compiler, but couldn't configure llvm/clang properly. Do you know if there is a way that I can launch MSYS console with Cygwin disabled?
Another question, after this is compiled within a MSYS environment, do end users require to have the same environment set up in order to use the tool? Could you help me with a list of runtime dependencies and compilation dependencies?
--
Now, move on to the next problem :)I got the following error when build the compiler-rt, and refer to a discussion on llvm/clang mailing list https://groups.google.com/forum/#!topic/llvm-dev/wuNlxOzuxpg. How did you come through this?
Alright, I can try the same thing. But without compiler-rt compiled, did you by any chance run tests on Windows?
For compiling oclint core, do you keep using mingw gcc compiler or you also switch to use clang?
I agree there are useless libs there, would you help clean them? Or feel free to create a github issue for this matter.
And I made big progress on Windows build. I can now compile and test oclint-core module, and ready to move on to the rest of the modules.
But when I build google mock/test, I had some problems with the pthread, I ended up with manually changing the configuration to disable pthread at all. Did you have the same issue? May I know how you handled this? Or you have pthread for windows installed?
Any progress or issues ?
Sorry for my lack of responsiveness.First, I have compiled the project entirely and run the tool as the screenshot attached.
Thank you for your effort. Frankly, I never thought oclint will be appended with .exe, and you make the magic happen!
I have spent some time with automating the build process, but the progress is so disappointing due to I am not familiar with Windows. Do you think you would like to help on this? If Windows is supported, then we definitely need the automated scripts and CI box to ensure the stability of the project.
What we want to achieve eventually is to automate the entire build process.
I also recommend you take a look at the current oclint-scripts folder, it has all the scripts for unix-like systems.
Even though the goal is the same, but I don't think we need to follow the same thing for Windows.
You can create a new folder, maybe oclint-mingw-scripts, and put your scripts there.
Feel free to suggest new ideas.
I don't know if having root CMakeLists.txt in root folder provides any extra values. The reason behind current modularization is for reuse purposes.
This project is derived from a research project. Modules, like metrics and core, are used by other projects.
Hi Joris,I have taken a look at the latest change on github, and they are great, thank you for your help.
For disabling compiler-rt, I would suggest you modify the checkoutLLVMClang.sh script, and simply don’t check out the compiler-rt code, it might be easier for you?
Don’t worry about the code coverage for now, we are on the direction of migrating to C++11, and will use llvm-cov to replace gcov.
And feel free to add new scripts when necessary, I think probably disabling pthread in google test may need some work.
May I also know the C++11 support status in MinGW?
On Monday, July 22, 2013 3:04:49 PM UTC+2, Longyi Qi wrote:Hi Joris,I have taken a look at the latest change on github, and they are great, thank you for your help.Ok, So I continue :)For disabling compiler-rt, I would suggest you modify the checkoutLLVMClang.sh script, and simply don’t check out the compiler-rt code, it might be easier for you?I think we can pass some variable to CMake to "disable" it.
Don’t worry about the code coverage for now, we are on the direction of migrating to C++11, and will use llvm-cov to replace gcov.The problem is not gcov, but lcov and genhtml...I will ignore that stuff.
And feel free to add new scripts when necessary, I think probably disabling pthread in google test may need some work.I think it can be solved too with some variable passed to CMakeMay I also know the C++11 support status in MinGW?I don't use c++11 yet,but simple test cases work.I don't know if g++ supports all c++11 features.
last commit should fix scripts for clang, googletest.test scripts are "fixed", except lcov calls.CMake counter part is not ready now for TestBuild.Back to CMake issues :/ (It works in my alternative build system (which I know) though)
- link to "useless" ${PROFILE_RT_LIBS}- "--coverage" is only in compiler flags and not in linker flags.- *.dll is not generated along *.exe, so I have to copy them manually.
Can you check that ${PROFILE_RT_LIBS} is really useful.my local "fixes" for these problems are mostly hacks currently (and so, not committed).May I drop code coverage completely for windows ?
Thank you for your great help, Joris. Overall speaking, I don't mind dropping code coverage completely for Windows if it is a block and requires large effort. Hope it's a relief. :-) Two comments below.
If I remember correctly, the `--coverage` won't help if Clang is used as compiler. That's why we ended up with that complex CMake configurations, just to find the correct "gcov" replacement library based on various systems and architectures.
I guess what we can try instead is to keep `--coverage` for the compilation flag, and `SET(PROFILE_RT_LIBS gcov)` to ask linker use gcov.
On Monday, July 22, 2013 11:31:42 PM UTC+2, Longyi Qi wrote:
If I remember correctly, the `--coverage` won't help if Clang is used as compiler. That's why we ended up with that complex CMake configurations, just to find the correct "gcov" replacement library based on various systems and architectures.Hope that clang will fix that.I guess what we can try instead is to keep `--coverage` for the compilation flag, and `SET(PROFILE_RT_LIBS gcov)` to ask linker use gcov.mingw/gcc part fixed :)(I have added '--coverage' and not 'gcov').
The last issue is the "missing dll" when launching exe.Possibilities I see:- copy dll along the executables- Add dll path into the PATHI prefer to copy dll...Will see how to do it in CMake.
On Tue, Jul 23, 2013 at 11:16 AM, Joris Dauphin <joris....@gmail.com> wrote:
On Monday, July 22, 2013 11:31:42 PM UTC+2, Longyi Qi wrote:
(I have added '--coverage' and not 'gcov').In theory, should behave the same, adding `--coverage` to linker will be converted to `-lgcov` for gcc compilers.
The last issue is the "missing dll" when launching exe.Possibilities I see:- copy dll along the executables- Add dll path into the PATHI prefer to copy dll...Will see how to do it in CMake.Is it possible to modify `buildRelease.sh` file and use `COPY` DOS command? Or create a new script that simply copy all DLLs and EXEs into a proper location?
--
Hi Joris, did you try building llvm/clang on Windows these days?
I was in a stage that almost everything works, but when I tried to build everything again from scratch, ld.exe always stop responding when it comes to 97% with libclang.dll with a returned code 5. Any ideas? Thanks.
--
I pulled the latest svn version of clang.Clang: svn rev187497.OS: MINGW32_NT-6.1 LQI-PC 1.0.18(0.48/3/2) 2012-11-21 22:34 i686 Msysmingw32-gcc: 4.7.2-1
What I have done was to shift+delete the build folder completely, but still got the same ld error.
I was wondering if the compiler versions make the differences. Any idea on how to use an older version of gcc?
Joris,Thanks a lot for baring with me.Good news: gcc 4.7.1 successfully compiles the latest llvm/clang codebase for me.
New issue: as shown in the screenshot attached, I think my compiler treats itself as a Linux one.
I also have my merged branch with the latest c++11 changes at https://github.com/lqi/oclint/tree/windows for you.
Another interesting thing I have noticed is, when I try to compile oclint-driver/main.cpp, it cannot find dlfcn.h, where it should look for windows.h instead.
On Tuesday, August 6, 2013 8:00:38 PM UTC+2, Longyi Qi wrote:New issue: as shown in the screenshot attached, I think my compiler treats itself as a Linux one.I also have my merged branch with the latest c++11 changes at https://github.com/lqi/oclint/tree/windows for you.I got the same error after check-out your branch...Investigating on my side.(maybe with c++11 we need some more define/things to be portable).
Another interesting thing I have noticed is, when I try to compile oclint-driver/main.cpp, it cannot find dlfcn.h, where it should look for windows.h instead.
--
Great help, Joris. Thank you!I prefer using gnu++11 for MinGW environment if you agree with me, too.
We are at a very good track, thanks Joris. I have few other questions for you, but they are pretty minor now-This works for oclint-core module, however, it cannot find OCLintRuleSet target here in oclint-rules module.
We have forced the libraries to be stored in rules.dl and reporters.dl folders respectively. But it is not working here, not sure if it's working on your machine. We have scripts to copy DLLs from these two folders and bundle them together with the release, https://github.com/lqi/oclint/blob/windows/oclint-scripts/buildRelease.sh#L29.Look forward to your suggestions.
--
These helps are great. I can automate the entire test and build process without any human interfere. In addition, all tests pass. This is fantastic. Thank you, Joris.
I believe this should be the last issue (I hope so) - I am trying to use oclint to analyze its own codebase (and other codebase). However, when the rule set is large, I couldn't load every rules into the main program.For one example:lqi@LQI-PC /c/oclint/oclint/oclint-core$ ../build/oclint-release/bin/oclint.exe lib/Results.cpp
Not sure if number of DLLs or the size of rules being loaded matters.
And you can check out my latest code from https://github.com/lqi/oclint/tree/windows, hope it could ease your work.
On Saturday, August 10, 2013 10:42:07 PM UTC+2, Longyi Qi wrote:These helps are great. I can automate the entire test and build process without any human interfere. In addition, all tests pass. This is fantastic. Thank you, Joris.nice :)I believe this should be the last issue (I hope so) - I am trying to use oclint to analyze its own codebase (and other codebase). However, when the rule set is large, I couldn't load every rules into the main program.For one example:lqi@LQI-PC /c/oclint/oclint/oclint-core$ ../build/oclint-release/bin/oclint.exe lib/Results.cppWork fine here (In release mode)Not sure if number of DLLs or the size of rules being loaded matters.
Since in release it works for me, I would say that size may be a problem...In release, the total size of rules is around 278 Mb (+ 4Mb with reporters + 15Mb with exe -> total ~300Mb).Not yet compiled in debug, but the size should be a lot bigger :-/ .What are the size in *nix/mac in debug/release ?
And you can check out my latest code from https://github.com/lqi/oclint/tree/windows, hope it could ease your work.I see that you use switch on uname now.which was the error with *nix/mac ?
Everything in release mode works fine, which is great.This is already good to merge,
but pardon me to be a little bit greedy, is there a way to make debug model also works? I am okay with modifying the Windows system configuration.
In addition, I was wondering if we should use IF (MINGW) instead of IF (${CMAKE_SYSTEM_NAME} MATCHES "Win") in CMakeLists.txt? MINGW is shorter, and it is more precise. Let me know what you think.
On Monday, August 12, 2013 3:08:23 PM UTC+2, Longyi Qi wrote:but pardon me to be a little bit greedy, is there a way to make debug model also works? I am okay with modifying the Windows system configuration.I am investigating to reduce dll size...With my build system, I have a little smaller size (~80%), but not enough...We can also strip symbol to gain a little more (but it is not compatible with debug...).It seems that "rules*.dll" include "some" llvm/clang symbols...I wonder how to move those "common" symbols outside of the "rules*.dll"
This is significant. I am interested in hearing how you achieve this.
I also would like to know which rules are blocking you. If there are code changes to automate this process, I guess you could attach a patch to the email. Thank you!
Have you found time to watch my patch ? Any feedback ?
--
Hi Joris,Sorry for the lack of response recently. I was travelling to California for the past a few days. I am about the set up the CI machine for Windows, and merge the code soon.
--
Great, thanks Joris. Would you help create two separate pull requests for these two patches respectively?BTW, I guess the email address you are using for git's user.email is not added to your github account, so that github cannot recognize you as a project contributor....
On Monday, September 9, 2013 8:33:20 PM UTC+2, Longyi Qi wrote:Great, thanks Joris. Would you help create two separate pull requests for these two patches respectively?
BTW, I guess the email address you are using for git's user.email is not added to your github account, so that github cannot recognize you as a project contributor....