-
Notifications
You must be signed in to change notification settings - Fork 379
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
OSX migration #315
OSX migration #315
Conversation
tmsblgh
commented
May 31, 2016
•
edited by gyorb
Loading
edited by gyorb
- Add scan-build.py (intercept) support, used instead of ld_logger on OS X
- Update travis.yml
- Using Makefiles for testing
- Expand README with OS X things
- Resolves replace ld_logger by scan-build.py (intercept) #149
This commit fixes #294. A build action is considered to be skipped if any of the source files in the build action is skipped.
@@ -2,17 +2,27 @@ | |||
|
|||
if [[ "$OSTYPE" == "linux-gnu" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we merge these two if statements for setting TEST_TESTS_DIR and TEST_CODECHECKER_PACKAGE_DIR environment variables?
If OSTYPE is not set the default value should be linux-gnu.
More descriptive comment messages would be better instead of "Small changes..." 😉 |
Official OS X support would be very welcome. I'm in the process of trying to make this branch work on my machine. I'll report the issues I encounter. |
LOG.debug_analyzer("with ld logger ...") | ||
log_env = analyzer_env.get_log_env(logfile, context, original_env) | ||
if 'CC_LOGGER_GCC_LIKE' not in log_env: | ||
log_env['CC_LOGGER_GCC_LIKE'] = 'gcc:g++:clang:clang++:cc:c++' | ||
|
||
LOG.debug_analyzer(log_env) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got an ugly python error if we get here and check_intercept returned false and we're not on Linux.
[ERROR] - Failed to run: intercept-build"
[ERROR] - local variable 'log_env' referenced before assignment
Traceback (most recent call last):
File "/Users/r0mai/codechecker_package/CodeChecker/cc_lib/python2.7/codechecker_lib/arg_handler.py", line 226, in handle_check
context)
File "/Users/r0mai/codechecker_package/CodeChecker/cc_lib/python2.7/codechecker_lib/build_manager.py", line 167, in generate_log_file
silent=silent)
File "/Users/r0mai/codechecker_package/CodeChecker/cc_lib/python2.7/codechecker_lib/build_manager.py", line 65, in perform_build_command
LOG.debug_analyzer(log_env)
UnboundLocalError: local variable 'log_env' referenced before assignment
A more user friendly error message would be nice :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I forgot about this option. I've made some changes, you can check it. Thanks for your help :) @r0mai
Do you still experience some issues @r0mai ? |
I didn't have much time as I expected, but here where I'm now: I followed the documentation more or less blindly https://github.com/tmsblgh/codechecker-osx-migration/blob/7ed507526723fab6bde1b601bf6f6825da416d9f/README.md#os-x At the
Later in the documentation it is mentioned, that codecheker has to be able to find
So first thing to note, that the documentation here could be improved by adding this PATH requirement to the install & setup section. After that I tried it on a test project with a pretty obvious bug: (full gist) int main() {
int a[11];
a[123] = 15;
}
Starting the server and opening the localhost address opens a website with a single run. But clicking on that run shows no results, nothing: Maybe this simple program doesn't trigger any checker and that's why there are no issues? Here I'd suggest adding to the repo a simple example cpp file, build scripts and some instructions to the readme on how to check it right after the installation instructions, so the user can easily make sure that the whole infrastructure works before analyzing their big project. I'm here now. I'll report back if I find out other stuff. Also, I talked with @tmsblgh in private about having installer scripts which can take care of the whole installation process easily without all this manual hassle (like cloning and building a clang locally, setting up environment variables and setting files to point to that private clang build, etc). |
I checked your example on my linux machine and I got the result in the web viewer. I'd like to close and merge this pull request, because we are starting the integrating the codechecker source to the clang source tree. |
No:
I'll try to run it on something bigger project tonight. Can you give me some example cpp which should surely produce some report? |
We run codechecker multiple times on bzip2, xerces, vim. You could try to enable debug mode for the analysis and for the server viewing the results by setting the environment variable |