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
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jelle van der Waa (jelly)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

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
Comment by Romain Déoux (koneko) - Friday, 08 June 2018, 14:08 GMT
The build process for the GUI is wrong.

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
```
Comment by t27049215 (t27049215) - Tuesday, 04 September 2018, 14:59 GMT
  • Field changed: Percent Complete (100% → 0%)
Warnings still exist.

EDIT:
Just for the record, I've put a possible solution in the closed report  FS#59920 .
Comment by Jelle van der Waa (jelly) - Sunday, 06 January 2019, 19:21 GMT
Nah, this does not work.

../lib/platform.cpp:169:30: note: in expansion of macro ‘CFGDIR’
std::string cfgdir = CFGDIR;

It's simply not expanded
Comment by t27049215 (t27049215) - Friday, 11 January 2019, 07:34 GMT Comment by Antonin Décimo (Rucikir) - Friday, 03 January 2020, 08:43 GMT
I can confirm that the missing std library and datadir message is still present with 1.90-1.

Loading...