Closed itspec-ru closed 2 years ago
This is an issue with the integrated sds library and the compiler warning „ stringop-overflow“ with gcc 11.2. Best workaround is to remove the warning only for this library and opening a bug report in the sds repository.
Edit:
It seems to be a gcc bug:
In gcc 11.2.1 the bug is fixed. At least myMPD compiles fine on fedora 35 with gcc 11.2.1. Can you upgrade gcc and test?
I disabled the stringop-overflow warning for the sds source in the devel branch. Can you test it?
mympd from devel branch compiled successful. live-ebuild for devel branch Works fine. Thanks!
Above commit in my new sds fork should also fix this issue. Could you please test the v9.1.0 branch?
Of course, I'm ready to test the v9.1.0 branch. ebuild ready But the v9.1.0 branch has not been fixed yet.
I hopped commit 9dbd049 fixes this issue independent from compile settings.
I get errors like this
In function ‘sdsll2str’,
inlined from ‘sdsfromlonglong’ at /var/calculate/tmp/portage/media-sound/mympd-9.1.0.9999/work/mympd-9.1.0.9999/dist/sds/sds.c:529:15:
/var/calculate/tmp/portage/media-sound/mympd-9.1.0.9999/work/mympd-9.1.0.9999/dist/sds/sds.c:486:12: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
486 | *s = *p;
| ~~~^~~~
/var/calculate/tmp/portage/media-sound/mympd-9.1.0.9999/work/mympd-9.1.0.9999/dist/sds/sds.c: In function ‘sdsfromlonglong’:
/var/calculate/tmp/portage/media-sound/mympd-9.1.0.9999/work/mympd-9.1.0.9999/dist/sds/sds.c:528:10: note: at offset 21 into destination object ‘buf’ of size 21
528 | char buf[SDS_LLSTR_SIZE];
| ^~~
Thanks for your test. It seems the deactivation of the compiler option is for gcc 11.2.0 the only solution. Is this version the default in gentoo?
gcc 11.2.0 now latest stable in gentoo for most arch (amd64 arm arm64 hppa ppc ppc64 sparc x86). But it is possible to install unstable ("testing") packages as well (gcc-11.2.1_p20211127, gcc-11.2.1_pre9999, gcc-12.0.0_pre9999). It is also possible to install older versions, they are also stable. By default, the system is updated to the latest stable version. Also you can see Keywording and Stabilization
Thanks for the information. The patch will be merged into master for the next release.
Latest commit 707c9ea8d5b7faaad516a68838721a6592767cc2
compiled successfully.
Bug fixed. Thanks!
myMPD version: [e.g. 9.0.x]
When compiling mympd i get multiple errors like this
My configuration: OS: Gentoo Linux GCC: gcc (Gentoo 11.2.0 p1) 11.2.0 CMAKE: cmake version 3.21.4
For installing as workaround i use own ebuild with added code block
As you can see, I just remove the "-Werror" instructions from the CMakeLists.txt This is probably not the best way to solve the problem.