FS#57739 - [cppcheck] Wrong data-dir and missing translations
Attached to Project:
Community Packages
Opened by Evgeniy (evgeniy) - Wednesday, 07 March 2018, 11:34 GMT
Last edited by Jelle van der Waa (jelly) - Tuesday, 25 February 2020, 19:54 GMT
Opened by Evgeniy (evgeniy) - Wednesday, 07 March 2018, 11:34 GMT
Last edited by Jelle van der Waa (jelly) - Tuesday, 25 February 2020, 19:54 GMT
|
Details
Description:
At first run cppcheck-gui shows: ``` Failed to change the user interface language: Failed to load translation for language Russian from file /usr/bin/cppcheck_ru.qm The user interface language has been reset to English. Open the Preferences-dialog to select any of the available languages. ``` as you see it searches cppcheck_ru.qm, while it is actually in /usr/share/cppcheck/cfg/lang/cppcheck_ru.qm After creation of project and loading compile_commands.json it shows: ``` Failed to load the selected library 'std.cfg'. File not found ``` ``` 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. Please note that --data-dir is supposed to be used by installation scripts and therefore the GUI does not start when it is used, all that happens is that the setting is configured. ``` but std.cfg exists, at /usr/share/cppcheck/cfg/std.cfg so it looks like some wrong configure/cmake/qmake options were used during building of cppcheck? Additional info: * package version(s) 1.82-1 * config and/or log files etc. Steps to reproduce: |
This task depends upon
Closed by Jelle van der Waa (jelly)
Tuesday, 25 February 2020, 19:54 GMT
Reason for closing: Fixed
Additional comments about closing: 1.90-2
Tuesday, 25 February 2020, 19:54 GMT
Reason for closing: Fixed
Additional comments about closing: 1.90-2
Instead of
```
qmake HAVE_RULES=yes
make SRCDIR=build CFGDIR=/usr/share/cppcheck/cfg HAVE_RULES=yes
```
we should have
```
qmake HAVE_RULES=yes DEFINES=CFGDIR=/usr/share/cppcheck/cfg
make
```
EDIT:
Just for the record, I've put a possible solution in the closed report
FS#59920.../lib/platform.cpp:169:30: note: in expansion of macro ‘CFGDIR’
std::string cfgdir = CFGDIR;
It's simply not expanded
Have you read https://bugs.archlinux.org/task/59920?project=5&string=cppcheck ?
Or switch to cmake builds as done here: https://github.com/Chocobo1/PKGBUILD/blob/master/cppcheck/PKGBUILD