libretro / FBNeo

FBNeo - We are Team FBNeo.
https://neo-source.com
Other
228 stars 136 forks source link

Launchpad PPA builds for this core are failing #1087

Closed RogueScholar closed 4 months ago

RogueScholar commented 4 months ago

libretro-fbneo Debian package for Launchpad Testing PPA currently FTBFS

I've been meaning to get this filed for two weeks, but just never had the time. As stated in the title, the Launchpad PPA builds have been failing for this core on all architectures for over a month now (last successful builds occurred on the morning of 2024-06-02), though I believe the specific errors changed right around two weeks ago. I've copied the current errors below from last night's build log.

Initial observations

This doesn't look like a configuration/packaging error to me, though we have to follow the build hardening policies for the Debian/Ubuntu package archives, plus we've had to add some extra build flags to adapt to the limited memory of the build farm VMs. Which is to say that these are not garden variety "out of the box" compilations and you're likely to see some unfamiliar build flags below. This had always been a problematic core to package so I invested some time back in April into tweaking the build parallelism and some of the other knobs we can twist on Launchpad and was so pleased to get to a point that packages were once again being produced, and this setback has been like a gut punch having taken place so soon after everything was working like gangbusters again.

Analysis of potential causes

A quick Git bisect points to https://github.com/libretro/FBNeo/commit/7f5e365a6b5c89a773163e18ee17410639eb86c9 and #1081, which does seem to coincide with when it seemed to me that the error message changed. Sadly I didn't have time to examine the logs more closely from the builds around the point that they first started failing, and those logs have already been purged. A good central nexus for updated information about the PPA builds for this particular core is the source code package recipe which always shows the status of the most recent builds for all architectures. All of the deviations in the build environment will spring from the Debian packaging files themselves, which are maintained in a separate Git repository on Launchpad.

Build log

Excerpt of log from failed x86_64 (amd64) build on 2024-07-06 (click to expand) ```console buildd:~ $ g++ -c -o../../burner/libretro/libretro.o ../../burner/libretro/libretro.cpp -g -mno-omit-leaf-frame-pointer -ffile-prefix-map=/<>=. -flto=auto -ffat-lto-objects \ -fstack-protector-strong -fstack-clash-protection -fcf-protection -fno-strict-aliasing -ffast-math -frounding-math -fomit-frame-pointer -fforce-addr -ffloat-store -finline-limit=1200 \ -fcheck-new -fdebug-prefix-map=/<>=/usr/src/libretro-fbneo-1.0.0.03+r202407061647~9e7f2030a-2~ubuntu24.10.1 -fPIC -std=gnu++98 -DGIT_VERSION=\"9e7f2030a\" -O3 -DNDEBUG \ -DAUTOGEN_DATS -DEXTERNAL_ZLIB -DINCLUDE_7Z_SUPPORT -D_7ZIP_PPMD_SUPPPORT -D_7ZIP_ST -D__LIBRETRO__ -DNO_VIZ -DLSB_FIRST -DUSE_SPEEDHACKS -Wall -Wformat -Werror=format-security -Wshadow \ -Wno-long-long -Wunknown-pragmas -Wundef -Wno-conversion -Wno-missing-braces -Wno-multichar -Wuninitialized -Wpointer-arith -Wno-inline -Wno-unused-value -Wno-sequence-point -Wno-extra \ -Wno-strict-aliasing -Wno-write-strings -Wno-address -Wno-narrowing -Wno-pedantic -I../../burner/win32 -I../../burner/libretro/libretro-common/include -I../../burner/libretro -I../../burn \ -I../../burn/snd -I../../burn/devices -I../../intf -I../../intf/input -I../../intf/cd -I../../intf/audio -I../../burner -I../../cpu -I../../cpu/f8 -I../../cpu/i8039 -I../../cpu/i8051 \ -I../../cpu/i8x41 -I../../cpu/m377 -I../../cpu/m6805 -I../../cpu/tlcs900 -I../../cpu/tms32010 -I../../cpu/upd7725 -I../../cpu/upd7810 -I../../cpu/v60 -I../../cpu/z80 -I../../cpu/z180 \ -I../../cpu/sh4 -I../../dep/libs/zlib -I../../dep/libs/lib7z -I../../burn/drv/capcom -I../../burn/drv/konami -I../../burn/drv/dataeast -I../../burn/drv/cave -I../../burn/drv/neogeo \ -I../../burn/drv/psikyo -I../../burn/drv/sega -I../../burn/drv/toaplan -I../../burn/drv/taito -I../../burn/drv/irem -I../../burn/drv/pce -I../../dep/generated -I../../dep/libs \ -I../../burner/libretro/deps/ugui ../../burner/libretro/libretro.cpp: In function ‘bool open_archive()’: ../../burner/libretro/libretro.cpp:1220:24: error: format not a string literal and no format arguments [-Werror=format-security] 1220 | sprintf(text_missing_files, RETRO_ERROR_MESSAGES_00); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../burner/libretro/libretro.cpp: In function ‘CoreRomPathsLoad()’: ../../burner/libretro/libretro.cpp:219:45: warning: ‘rom_path.opt’ directive output may be truncated writing 12 bytes into a region of size between 0 and 259 [-Wformat-truncation=] 219 | snprintf(szConfig, MAX_PATH - 1, "%srom_path.opt", szAppPathDefPath); | ^~~~~~~~~~~~ In file included from /usr/include/stdio.h:980, from ../../burner/burner.h:6, from ../../burner/libretro/libretro.cpp:7: In function ‘snprintf’, inlined from ‘CoreRomPathsLoad()’ at ../../burner/libretro/libretro.cpp:219:10: /usr/include/x86_64-linux-gnu/bits/stdio2.h:54:35: note: ‘__snprintf_chk’ output between 13 and 272 bytes into a destination of size 259 54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 55 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 56 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ ../../burner/libretro/libretro.cpp: In function ‘CoreRomPathsLoad()’: ../../burner/libretro/libretro.cpp:223:53: warning: ‘%c’ directive output may be truncated writing 1 byte into a region of size between 0 and 259 [-Wformat-truncation=] 223 | snprintf(szConfig, MAX_PATH - 1, "%s%crom_path.opt", g_rom_dir, PATH_DEFAULT_SLASH_C()); | ^~ In function ‘snprintf’, inlined from ‘CoreRomPathsLoad()’ at ../../burner/libretro/libretro.cpp:223:11: /usr/include/x86_64-linux-gnu/bits/stdio2.h:54:35: note: ‘__snprintf_chk’ output between 14 and 273 bytes into a destination of size 259 54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 55 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 56 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ buildd:~ $ g++ -c -o../../burner/libretro/retro_cdemu.o ../../burner/libretro/retro_cdemu.cpp -g -mno-omit-leaf-frame-pointer -ffile-prefix-map=/<>=. -flto=auto -ffat-lto-objects \ -fstack-protector-strong -fstack-clash-protection -fcf-protection -fno-strict-aliasing -ffast-math -frounding-math -fomit-frame-pointer -fforce-addr -ffloat-store -finline-limit=1200 \ -fcheck-new -fdebug-prefix-map=/<>=/usr/src/libretro-fbneo-1.0.0.03+r202407061647~9e7f2030a-2~ubuntu24.10.1 -fPIC -std=gnu++98 -DGIT_VERSION=\"9e7f2030a\" -O3 -DNDEBUG \ -DAUTOGEN_DATS -DEXTERNAL_ZLIB -DINCLUDE_7Z_SUPPORT -D_7ZIP_PPMD_SUPPPORT -D_7ZIP_ST -D__LIBRETRO__ -DNO_VIZ -DLSB_FIRST -DUSE_SPEEDHACKS -Wall -Wformat -Werror=format-security -Wshadow \ -Wno-long-long -Wunknown-pragmas -Wundef -Wno-conversion -Wno-missing-braces -Wno-multichar -Wuninitialized -Wpointer-arith -Wno-inline -Wno-unused-value -Wno-sequence-point -Wno-extra \ -Wno-strict-aliasing -Wno-write-strings -Wno-address -Wno-narrowing -Wno-pedantic -I../../burner/win32 -I../../burner/libretro/libretro-common/include -I../../burner/libretro -I../../burn \ -I../../burn/snd -I../../burn/devices -I../../intf -I../../intf/input -I../../intf/cd -I../../intf/audio -I../../burner -I../../cpu -I../../cpu/f8 -I../../cpu/i8039 -I../../cpu/i8051 \ -I../../cpu/i8x41 -I../../cpu/m377 -I../../cpu/m6805 -I../../cpu/tlcs900 -I../../cpu/tms32010 -I../../cpu/upd7725 -I../../cpu/upd7810 -I../../cpu/v60 -I../../cpu/z80 -I../../cpu/z180 \ -I../../cpu/sh4 -I../../dep/libs/zlib -I../../dep/libs/lib7z -I../../burn/drv/capcom -I../../burn/drv/konami -I../../burn/drv/dataeast -I../../burn/drv/cave -I../../burn/drv/neogeo \ -I../../burn/drv/psikyo -I../../burn/drv/sega -I../../burn/drv/toaplan -I../../burn/drv/taito -I../../burn/drv/irem -I../../burn/drv/pce -I../../dep/generated -I../../dep/libs \ -I../../burner/libretro/deps/ugui ../../burner/libretro/libretro.cpp: In function ‘open_archive()’: ../../burner/libretro/libretro.cpp:958:57: warning: ‘%c’ directive output may be truncated writing 1 byte into a region of size between 0 and 259 [-Wformat-truncation=] 958 | snprintf(path, MAX_PATH - 1, "%s%c%s%c%s", g_rom_dir, PATH_DEFAULT_SLASH_C(), szTypeEnum[0][nType], PATH_DEFAULT_SLASH_C(), romName); | ^~ In function ‘snprintf’, inlined from ‘locate_archive(std::vector >&, char const*)’ at ../../burner/libretro/libretro.cpp:958:12, inlined from ‘open_archive()’ at ../../burner/libretro/libretro.cpp:1106:17: /usr/include/x86_64-linux-gnu/bits/stdio2.h:54:35: note: ‘__snprintf_chk’ output 3 or more bytes (assuming 937) into a destination of size 259 54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 55 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 56 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ ../../burner/libretro/libretro.cpp: In function ‘open_archive()’: ../../burner/libretro/libretro.cpp:994:55: warning: ‘fbneo’ directive output may be truncated writing 5 bytes into a region of size between 0 and 259 [-Wformat-truncation=] 994 | snprintf(path, MAX_PATH, "%s%cfbneo%c%s%c%s", g_system_dir, PATH_DEFAULT_SLASH_C(), PATH_DEFAULT_SLASH_C(), szTypeEnum[0][nType], PATH_DEFAULT_SLASH_C(), romName); | ^~~~~ In function ‘snprintf’, inlined from ‘locate_archive(std::vector >&, char const*)’ at ../../burner/libretro/libretro.cpp:994:12, inlined from ‘open_archive()’ at ../../burner/libretro/libretro.cpp:1106:17: /usr/include/x86_64-linux-gnu/bits/stdio2.h:54:35: note: ‘__snprintf_chk’ output 9 or more bytes (assuming 943) into a destination of size 260 54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 55 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 56 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ ../../burner/libretro/libretro.cpp: In function ‘open_archive()’: ../../burner/libretro/libretro.cpp:1035:52: warning: ‘%s’ directive output may be truncated writing up to 5199 bytes into a region of size 259 [-Wformat-truncation=] 1035 | snprintf(path, MAX_PATH-1,"%s%c%s", CoreRomPaths[i], PATH_DEFAULT_SLASH_C(), romName); | ^~ In function ‘snprintf’, inlined from ‘locate_archive(std::vector >&, char const*)’ at ../../burner/libretro/libretro.cpp:1035:12, inlined from ‘open_archive()’ at ../../burner/libretro/libretro.cpp:1106:17: /usr/include/x86_64-linux-gnu/bits/stdio2.h:54:35: note: ‘__snprintf_chk’ output 2 or more bytes (assuming 5201) into a destination of size 259 54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 55 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 56 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ ../../burner/libretro/libretro.cpp: In function ‘open_archive()’: ../../burner/libretro/libretro.cpp:1054:63: warning: ‘%s’ directive output may be truncated writing up to 5199 bytes into a region of size 259 [-Wformat-truncation=] 1054 | snprintf(path, MAX_PATH - 1, "%s%c%s%c%s", CoreRomPaths[i], PATH_DEFAULT_SLASH_C(), szTypeEnum[0][nType], PATH_DEFAULT_SLASH_C(), romName); | ^~ In function ‘snprintf’, inlined from ‘locate_archive(std::vector >&, char const*)’ at ../../burner/libretro/libretro.cpp:1054:13, inlined from ‘open_archive()’ at ../../burner/libretro/libretro.cpp:1106:17: /usr/include/x86_64-linux-gnu/bits/stdio2.h:54:35: note: ‘__snprintf_chk’ output 3 or more bytes (assuming 5877) into a destination of size 259 54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 55 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 56 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ buildd:~ $ g++ -c -o../../burner/libretro/retro_common.o ../../burner/libretro/retro_common.cpp -g -mno-omit-leaf-frame-pointer -ffile-prefix-map=/<>=. -flto=auto -ffat-lto-objects \ -fstack-protector-strong -fstack-clash-protection -fcf-protection -fno-strict-aliasing -ffast-math -frounding-math -fomit-frame-pointer -fforce-addr -ffloat-store -finline-limit=1200 \ -fcheck-new -fdebug-prefix-map=/<>=/usr/src/libretro-fbneo-1.0.0.03+r202407061647~9e7f2030a-2~ubuntu24.10.1 -fPIC -std=gnu++98 -DGIT_VERSION=\"9e7f2030a\" -O3 -DNDEBUG \ -DAUTOGEN_DATS -DEXTERNAL_ZLIB -DINCLUDE_7Z_SUPPORT -D_7ZIP_PPMD_SUPPPORT -D_7ZIP_ST -D__LIBRETRO__ -DNO_VIZ -DLSB_FIRST -DUSE_SPEEDHACKS -Wall -Wformat -Werror=format-security -Wshadow \ -Wno-long-long -Wunknown-pragmas -Wundef -Wno-conversion -Wno-missing-braces -Wno-multichar -Wuninitialized -Wpointer-arith -Wno-inline -Wno-unused-value -Wno-sequence-point -Wno-extra \ -Wno-strict-aliasing -Wno-write-strings -Wno-address -Wno-narrowing -Wno-pedantic -I../../burner/win32 -I../../burner/libretro/libretro-common/include -I../../burner/libretro -I../../burn \ -I../../burn/snd -I../../burn/devices -I../../intf -I../../intf/input -I../../intf/cd -I../../intf/audio -I../../burner -I../../cpu -I../../cpu/f8 -I../../cpu/i8039 -I../../cpu/i8051 \ -I../../cpu/i8x41 -I../../cpu/m377 -I../../cpu/m6805 -I../../cpu/tlcs900 -I../../cpu/tms32010 -I../../cpu/upd7725 -I../../cpu/upd7810 -I../../cpu/v60 -I../../cpu/z80 -I../../cpu/z180 \ -I../../cpu/sh4 -I../../dep/libs/zlib -I../../dep/libs/lib7z -I../../burn/drv/capcom -I../../burn/drv/konami -I../../burn/drv/dataeast -I../../burn/drv/cave -I../../burn/drv/neogeo \ -I../../burn/drv/psikyo -I../../burn/drv/sega -I../../burn/drv/toaplan -I../../burn/drv/taito -I../../burn/drv/irem -I../../burn/drv/pce -I../../dep/generated -I../../dep/libs \ -I../../burner/libretro/deps/ugui ../../burner/libretro/libretro.cpp: In function ‘retro_load_game’: ../../burner/libretro/libretro.cpp:1734:16: warning: ‘strncpy’ output may be truncated copying 259 bytes from a string of length 259 [-Wstringop-truncation] 1734 | strncpy(buf, path, size - 1); | ^ buildd:~ $ g++ -c -o../../burner/libretro/retro_input.o ../../burner/libretro/retro_input.cpp -g -mno-omit-leaf-frame-pointer -ffile-prefix-map=/<>=. -flto=auto -ffat-lto-objects \ -fstack-protector-strong -fstack-clash-protection -fcf-protection -fno-strict-aliasing -ffast-math -frounding-math -fomit-frame-pointer -fforce-addr -ffloat-store -finline-limit=1200 \ -fcheck-new -fdebug-prefix-map=/<>=/usr/src/libretro-fbneo-1.0.0.03+r202407061647~9e7f2030a-2~ubuntu24.10.1 -fPIC -std=gnu++98 -DGIT_VERSION=\"9e7f2030a\" -O3 -DNDEBUG \ -DAUTOGEN_DATS -DEXTERNAL_ZLIB -DINCLUDE_7Z_SUPPORT -D_7ZIP_PPMD_SUPPPORT -D_7ZIP_ST -D__LIBRETRO__ -DNO_VIZ -DLSB_FIRST -DUSE_SPEEDHACKS -Wall -Wformat -Werror=format-security -Wshadow \ -Wno-long-long -Wunknown-pragmas -Wundef -Wno-conversion -Wno-missing-braces -Wno-multichar -Wuninitialized -Wpointer-arith -Wno-inline -Wno-unused-value -Wno-sequence-point -Wno-extra \ -Wno-strict-aliasing -Wno-write-strings -Wno-address -Wno-narrowing -Wno-pedantic -I../../burner/win32 -I../../burner/libretro/libretro-common/include -I../../burner/libretro -I../../burn \ -I../../burn/snd -I../../burn/devices -I../../intf -I../../intf/input -I../../intf/cd -I../../intf/audio -I../../burner -I../../cpu -I../../cpu/f8 -I../../cpu/i8039 -I../../cpu/i8051 \ -I../../cpu/i8x41 -I../../cpu/m377 -I../../cpu/m6805 -I../../cpu/tlcs900 -I../../cpu/tms32010 -I../../cpu/upd7725 -I../../cpu/upd7810 -I../../cpu/v60 -I../../cpu/z80 -I../../cpu/z180 \ -I../../cpu/sh4 -I../../dep/libs/zlib -I../../dep/libs/lib7z -I../../burn/drv/capcom -I../../burn/drv/konami -I../../burn/drv/dataeast -I../../burn/drv/cave -I../../burn/drv/neogeo \ -I../../burn/drv/psikyo -I../../burn/drv/sega -I../../burn/drv/toaplan -I../../burn/drv/taito -I../../burn/drv/irem -I../../burn/drv/pce -I../../dep/generated -I../../dep/libs \ -I../../burner/libretro/deps/ugui cc1plus: some warnings being treated as errors make[2]: *** [Makefile:726: ../../burner/libretro/libretro.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory '/<>/src/burner/libretro' dh_auto_build: error: cd src/burner/libretro && make -j4 "INSTALL=install --strip-program=true" AUTOGEN_DATS=1 EXTERNAL_ZLIB=1 GIT_VERSION=9e7f2030a INCLUDE_7Z_SUPPORT=1 USE_SPEEDHACKS=1 USE_X64_DRC=1 \ returned exit code 2 make[1]: *** [debian/rules:94: override_dh_auto_build] Error 25 make[1]: Leaving directory '/<>' make: *** [debian/rules:82: binary] Error 2 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 ```
grant2258 commented 4 months ago
../../burner/libretro/libretro.cpp:1220:24: error: format not a string literal and no format arguments [-Werror=format-security]
 1220 |                 sprintf(text_missing_files,  RETRO_ERROR_MESSAGES_00);

sprintf(text_missing_files,"%s", RETRO_ERROR_MESSAGES_00);

should fix it or just set the flags to not treat -Werror=format-security as errors.

Its also matches up with you bisect #1081

https://github.com/libretro/FBNeo/blame/5088fd6120dd73f532a795762f0dfd97f70fc65c/src/burner/libretro/libretro.cpp#L1220

barbudreadmon commented 4 months ago

That line used to be like this before that PR : https://github.com/libretro/FBNeo/blob/634d207adade213bbe83684be2a183d158f56e52/src/burner/libretro/libretro.cpp#L1015 Wouldn't that format not a string literal and no format arguments [-Werror=format-security] warning already apply ?

I just pushed that fix but let's flag @taoenwen about this in case there are still issues.

RogueScholar commented 4 months ago

@grant2258 and @barbudreadmon, it's obvious a simple "Duh…" is insufficient here. As a token of gratitude for getting things back on track and not taking any cheap shots at me or my ability to simple read what's in front of me, you both get to be Papa Sylvester, and I'll be "Junior."

Papa Sylvester with "Junior"

I swear that (on most days), I know how to approach that error. I bit off a little more than I could chew lately with some home repairs and days off have been scarce… You get the idea. That said, thank you ever so much for taking the necessary action to make this go away, and the fact that I didn't have to so much as refresh a patch has me on the verge of tears, LOL.

May the Great Compiler in the Sky bless you and keep you, all the days of your life. 👏🏻