Bug 1427788 - cppcheck-gui can't find std.cfg installed with the package
Summary: cppcheck-gui can't find std.cfg installed with the package
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: cppcheck
Version: epel7
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Susi Lehtola
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1446954
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-01 08:42 UTC by bugreports2005
Modified: 2017-06-09 19:01 UTC (History)
2 users (show)

Fixed In Version: cppcheck-1.79-1.fc24 cppcheck-1.79-1.fc25 cppcheck-1.79-1.el7 cppcheck-1.79-1.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-27 02:52:16 UTC


Attachments (Terms of Use)

Description bugreports2005 2017-03-01 08:42:52 UTC
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):~$

Comment 1 Marco Kundt 2017-04-09 09:04:16 UTC
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.

Comment 2 Susi Lehtola 2017-04-09 12:52:42 UTC
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!

Comment 3 Fedora Update System 2017-05-18 07:59:03 UTC
cppcheck-1.79-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d891f317df

Comment 4 Fedora Update System 2017-05-18 07:59:19 UTC
cppcheck-1.79-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6752be76c2

Comment 5 Fedora Update System 2017-05-18 07:59:28 UTC
cppcheck-1.79-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-7b2be00781

Comment 6 Fedora Update System 2017-05-18 07:59:37 UTC
cppcheck-1.79-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-5224ea4827

Comment 7 Fedora Update System 2017-05-18 19:04:33 UTC
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

Comment 8 Fedora Update System 2017-05-18 21:37:10 UTC
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

Comment 9 Fedora Update System 2017-05-18 23:30:45 UTC
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

Comment 10 Fedora Update System 2017-05-18 23:35:51 UTC
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

Comment 11 Fedora Update System 2017-05-27 02:52:16 UTC
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.

Comment 12 Fedora Update System 2017-05-27 03:01:11 UTC
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.

Comment 13 Fedora Update System 2017-06-02 19:18:36 UTC
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.

Comment 14 Fedora Update System 2017-06-09 19:01:26 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.