Description of problem: When checking a file (Check -> Files) with cppcheck-gui prints warning "Failed to load the selected library 'std.cfg'. File not Found" Version-Release number of selected component (if applicable): 1.75-1.el7.x86_64 How reproducible: Steps to Reproduce: 1. install cppcheck-gui package and make sure you have no site or user specific configuration for it 2. start cppcheck-gui 3. Check -> Files... 4. Select single .c file and Open Actual results: Warning: "Failed to load the selected library 'std.cfg'. File not found -> press OK -> Error: "Failed to load std.cfg. Your Cppcheck installation is broken. You can use --data-dir=<directory> at the command line to specify where this file is located." -> press OK -> cppcheck-gui checks the file OK. Expected results: I think the package should work "out of the box" and with default settings cppcheck-gui should check the file without issuing warning. Additional info: You can alter the configuration with command: cppcheck-gui --data-dir=/usr/share/CppCheck and after that cppcheck works without warnings. I run cppcheck-gui with strace and reproduced the problem: tipi:~$ grep std.cfg cppcheck-test.out open("/usr/bin/std.cfg", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/CppCheck//usr/bin/std.cfg", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/bin/cfg/std.cfg", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/CppCheck//usr/bin/cfg/std.cfg", O_RDONLY) = -1 ENOENT (No such file or directory) tipi(SA):~$
This happens because cppcheck-gui is compiled without CFGDIR=/usr/share/CppCheck. https://src.fedoraproject.org/cgit/rpms/cppcheck.git/tree/cppcheck.spec#n58 Is there any reason why Fedora isn't compiling this in? The option is even used in the official instructions for compiling it; right now it's only usable by starting it from the command line.
This is a bug in cppcheck's makefiles. I did have an explicit set for CFGDIR back when there was no way to configure cppcheck, but I'm amazed that they haven't put that in the build system!
cppcheck-1.79-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d891f317df
cppcheck-1.79-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6752be76c2
cppcheck-1.79-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-7b2be00781
cppcheck-1.79-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-5224ea4827
cppcheck-1.79-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-5224ea4827
cppcheck-1.79-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-7b2be00781
cppcheck-1.79-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6752be76c2
cppcheck-1.79-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-d891f317df
cppcheck-1.79-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
cppcheck-1.79-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
cppcheck-1.79-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
cppcheck-1.79-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.