Closed skidoo23 closed 2 years ago
Strange, build runs perfectly in my obs environments: https://build.opensuse.org/package/live_build_log/home:jcorporation/myMPD-devel/Debian_Testing/x86_64
But it seems to be a gcc problematic: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578
I disabled this warning for the mongoose source in devel, please test.
Sorry, build error persists.
$ ./build.sh release
Creating assets in release
Creating i18n json
All translation phrased found
Minifying javascript
Creating mympd.js
Minifying htdocs/sw.js
Minifying release/htdocs/js/mympd.js
Combining and compressing javascript
release/htdocs/js/combined.js: 77.9% -- replaced with release/htdocs/js/combined.js.gz
release/htdocs/sw.min.js: 59.0%
Minifying stylesheets
Minifying htdocs/css/mympd.css
Minifying htdocs/css/theme-light.css
Combining and compressing stylesheets
release/htdocs/css/combined.css: 84.8% -- replaced with release/htdocs/css/combined.css.gz
Minifying and compressing html
Minifying htdocs/index.html
release/htdocs/index.html: 87.7%
Creating other compressed assets
htdocs/mympd.webmanifest: 61.2%
htdocs/assets/coverimage-booklet.svg: 46.0%
htdocs/assets/coverimage-loading.svg: 48.0%
htdocs/assets/coverimage-mympd.svg: 51.5%
htdocs/assets/coverimage-notavailable.svg: 47.9%
htdocs/assets/coverimage-stream.svg: 47.0%
htdocs/assets/mympd-background-dark.svg: 53.1%
htdocs/assets/mympd-background-light.svg: 52.6%
Compiling myMPD
Compiler: GNU 11.2.0
Executables in: /usr/local/bin
Workdir: /var/lib/mympd
Cachedir: /var/cache/mympd
Embedding assets in binary
Document root: /var/lib/mympd/empty
Searching for openssl
Searching for libid3tag
Searching for flac
Lua is disabled by user
Checking for compiler flag -std=gnu17
-- Performing Test COMPILER_SUPPORTS_FLAG
-- Performing Test COMPILER_SUPPORTS_FLAG - Success
Checking for compiler flag -fstack-clash-protection
-- Performing Test COMPILER_SUPPORTS_FLAG
-- Performing Test COMPILER_SUPPORTS_FLAG - Success
Checking for compiler flag -fcf-protection
-- Performing Test COMPILER_SUPPORTS_FLAG
-- Performing Test COMPILER_SUPPORTS_FLAG - Success
Checking for compiler flag -fno-plt
-- Performing Test COMPILER_SUPPORTS_FLAG
-- Performing Test COMPILER_SUPPORTS_FLAG - Success
-- Configuring done
-- Generating done
-- Build files have been written to: ~/src/myMPD/release
Consolidate compiler generated dependencies of target mympd
[ 0%] Building C object CMakeFiles/mympd.dir/dist/mjson/mjson.c.o
[ 1%] Building C object CMakeFiles/mympd.dir/dist/mongoose/mongoose.c.o
In function ‘mg_sha1_update’,
inlined from ‘mg_sha1_final’ at ~/src/myMPD/dist/mongoose/mongoose.c:2941:3:
~/src/myMPD/dist/mongoose/mongoose.c:2923:7: error: ‘mg_sha1_transform’ reading 64 bytes from a region of size 0 [-Werror=stringop-overread]
2923 | mg_sha1_transform(context->state, &data[i]);
| ^~~~~~~~~~~
~/src/myMPD/dist/mongoose/mongoose.c:2923:7: note: referencing argument 2 of type ‘const unsigned char[64]’
~/src/myMPD/dist/mongoose/mongoose.c: In function ‘mg_sha1_final’:
~/src/myMPD/dist/mongoose/mongoose.c:2796:13: note: in a call to function ‘mg_sha1_transform’
2796 | static void mg_sha1_transform(uint32_t state[5], const unsigned char buffer[64]) {
| ^~~~~
In function ‘mg_sha1_update’,
inlined from ‘mg_sha1_final’ at ~/src/myMPD/dist/mongoose/mongoose.c:2944:5:
~/src/myMPD/dist/mongoose/mongoose.c:2923:7: error: ‘mg_sha1_transform’ reading 64 bytes from a region of size 0 [-Werror=stringop-overread]
2923 | mg_sha1_transform(context->state, &data[i]);
| ^~~~~~~~~~~
~/src/myMPD/dist/mongoose/mongoose.c:2923:7: note: referencing argument 2 of type ‘const unsigned char[64]’
~/src/myMPD/dist/mongoose/mongoose.c: In function ‘mg_sha1_final’:
~/src/myMPD/dist/mongoose/mongoose.c:2796:13: note: in a call to function ‘mg_sha1_transform’
2796 | static void mg_sha1_transform(uint32_t state[5], const unsigned char buffer[64]) {
| ^~~~~
cc1: all warnings being treated as errors
make[2]: [CMakeFiles/mympd.dir/build.make:90: CMakeFiles/mympd.dir/dist/mongoose/mongoose.c.o] Fehler 1
make[1]: [CMakeFiles/Makefile2:100: CMakeFiles/mympd.dir/all] Fehler 2
make: *** [Makefile:136: all] Fehler 2
Surely used latest devel? I accidentally added -Wno-stringop-overflow first.
$ rm -rf ./myMPD/ $ git clone https://github.com/jcorporation/myMPD.git Klone nach 'myMPD'... remote: Enumerating objects: 40479, done. remote: Counting objects: 100% (6595/6595), done. remote: Compressing objects: 100% (1947/1947), done. remote: Total 40479 (delta 5141), reused 5849 (delta 4594), pack-reused 33884 Empfange Objekte: 100% (40479/40479), 48.37 MiB | 1.80 MiB/s, fertig. Löse Unterschiede auf: 100% (30362/30362), fertig. $ cd myMPD/ $ git branch -a all
GNU 12.0.1 as compiler?! Why the change from 11.2 to 12? Version 12 is not released yet.
Found the error and fixed with commit f57c587
Thx!
gcc 12 used for testing purposes. No idea why gcc 11 appears in output. Maybe some build system cacheing?
myMPD version: [e.g. 8.1.0] 9.2.2 recent devel from github
Describe the bug $ ./build.sh release Creating assets in release Creating i18n json All translation phrased found Minifying javascript Creating mympd.js Minifying htdocs/sw.js Minifying release/htdocs/js/mympd.js Combining and compressing javascript release/htdocs/js/combined.js: 77.9% -- replaced with release/htdocs/js/combined.js.gz release/htdocs/sw.min.js: 59.0% Minifying stylesheets Minifying htdocs/css/mympd.css Minifying htdocs/css/theme-light.css Combining and compressing stylesheets release/htdocs/css/combined.css: 84.8% -- replaced with release/htdocs/css/combined.css.gz Minifying and compressing html Minifying htdocs/index.html release/htdocs/index.html: 87.7% Creating other compressed assets htdocs/mympd.webmanifest: 61.2% htdocs/assets/coverimage-booklet.svg: 46.0% htdocs/assets/coverimage-loading.svg: 48.0% htdocs/assets/coverimage-mympd.svg: 51.5% htdocs/assets/coverimage-notavailable.svg: 47.9% htdocs/assets/coverimage-stream.svg: 47.0% htdocs/assets/mympd-background-dark.svg: 53.1% htdocs/assets/mympd-background-light.svg: 52.6% Compiling myMPD Compiler: GNU 11.2.0 Executables in: /usr/local/bin Workdir: /var/lib/mympd Cachedir: /var/cache/mympd Embedding assets in binary Document root: /var/lib/mympd/empty Searching for openssl Searching for libid3tag Searching for flac Lua is disabled by user Checking for compiler flag -std=gnu17 -- Performing Test COMPILER_SUPPORTS_FLAG -- Performing Test COMPILER_SUPPORTS_FLAG - Success Checking for compiler flag -fstack-clash-protection -- Performing Test COMPILER_SUPPORTS_FLAG -- Performing Test COMPILER_SUPPORTS_FLAG - Success Checking for compiler flag -fcf-protection -- Performing Test COMPILER_SUPPORTS_FLAG -- Performing Test COMPILER_SUPPORTS_FLAG - Success Checking for compiler flag -fno-plt -- Performing Test COMPILER_SUPPORTS_FLAG -- Performing Test COMPILER_SUPPORTS_FLAG - Success -- Configuring done -- Generating done -- Build files have been written to: ~/src/myMPD/release Consolidate compiler generated dependencies of target mympd [ 1%] Building C object CMakeFiles/mympd.dir/dist/mongoose/mongoose.c.o In function ‘mg_sha1_update’, inlined from ‘mg_sha1_final’ at ~/src/myMPD/dist/mongoose/mongoose.c:2941:3: ~/src/myMPD/dist/mongoose/mongoose.c:2923:7: error: ‘mg_sha1_transform’ reading 64 bytes from a region of size 0 [-Werror=stringop-overread] 2923 | mg_sha1_transform(context->state, &data[i]); | ^
~~~~~~~~~~ ~/src/myMPD/dist/mongoose/mongoose.c:2923:7: note: referencing argument 2 of type ‘const unsigned char[64]’ ~/src/myMPD/dist/mongoose/mongoose.c: In function ‘mg_sha1_final’: ~/src/myMPD/dist/mongoose/mongoose.c:2796:13: note: in a call to function ‘mg_sha1_transform’ 2796 | static void mg_sha1_transform(uint32_t state[5], const unsigned char buffer[64]) { | ^~~~~ In function ‘mg_sha1_update’, inlined from ‘mg_sha1_final’ at ~/src/myMPD/dist/mongoose/mongoose.c:2944:5: ~/src/myMPD/dist/mongoose/mongoose.c:2923:7: error: ‘mg_sha1_transform’ reading 64 bytes from a region of size 0 [-Werror=stringop-overread] 2923 | mg_sha1_transform(context->state, &data[i]); | ^~~~~~~~~~~ ~/src/myMPD/dist/mongoose/mongoose.c:2923:7: note: referencing argument 2 of type ‘const unsigned char[64]’ ~/src/myMPD/dist/mongoose/mongoose.c: In function ‘mg_sha1_final’: ~/src/myMPD/dist/mongoose/mongoose.c:2796:13: note: in a call to function ‘mg_sha1_transform’ 2796 | static void mg_sha1_transform(uint32_t state[5], const unsigned char buffer[64]) { | ^~~~~ cc1: all warnings being treated as errors make[2]: [CMakeFiles/mympd.dir/build.make:90: CMakeFiles/mympd.dir/dist/mongoose/mongoose.c.o] Fehler 1 make[1]: [CMakeFiles/Makefile2:100: CMakeFiles/mympd.dir/all] Fehler 2 make: *** [Makefile:136: all] Fehler 2A clear and concise description of what the bug is.
To Reproduce $ export MYMPD_INSTALL_PREFIX=/usr/local ENABLE_IPV6=ON ENABLE_LUA=OFF $ ./build.sh release
Expected behavior Build without error
Screenshots N/A
Server plattform (please complete the following information):
Client plattform (please complete the following information): N/A
Debug logs (please attach if it can be usefull) N/A
Configuration (please attach if it can be usefull) N/A
Additional context
Add any other context about the problem here.