Ticket #4595 (closed defect: fixed)
Midnight Commander Git Regression in Compiling #2
Reported by: | Axanar | Owned by: | andrew_b |
---|---|---|---|
Priority: | major | Milestone: | 4.8.33 |
Component: | compilation | Version: | master |
Keywords: | Cc: | ||
Blocked By: | #4593 | Blocking: | |
Branch state: | no branch | Votes for changeset: |
Description (last modified by zaytsev) (diff)
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../.. -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-6 -pthread -I../../.. -I/usr/include/ext2fs -I/usr/include/et -I/usr/include/e2p -fdiagnostics-show-option -Wbad-function-cast -Wcomment -Wdeclaration-after-statement -Wfloat-conversion -Wfloat-equal -Wformat -Wformat-security -Wformat-signedness -Wimplicit -Wimplicit-fallthrough -Wignored-qualifiers -Wlogical-not-parentheses -Wmaybe-uninitialized -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-parameter-type -Wmissing-prototypes -Wmissing-variable-declarations -Wnested-externs -Wno-long-long -Wno-unreachable-code -Wparentheses -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-prototypes -Wswitch -Wswitch-default -Wtype-limits -Wundef -Wuninitialized -Wunreachable-code -Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-parameter -Wunused-result -Wunused-value -Wunused-variable -Wwrite-strings -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -fpermissive -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -c tar-internal.c -fPIC -DPIC -o .libs/tar-internal.o tar-internal.c: In function 'tar_flush_read': tar-internal.c:131:16: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'idx_t' {aka 'long int'} [-Wsign-compare] 131 | if (status == record_size) | ^~ tar-internal.c: In function 'stoint': tar-internal.c:289:25: warning: comparison of integer expressions of different signedness: 'uintmax_t' {aka 'long unsigned int'} and 'intmax_t' {aka 'long int'} [-Wsign-compare] 289 | v |= maxval < i ? 1 : 0; | ^ libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../.. -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-6 -pthread -I../../.. -I/usr/include/ext2fs -I/usr/include/et -I/usr/include/e2p -fdiagnostics-show-option -Wbad-function-cast -Wcomment -Wdeclaration-after-statement -Wfloat-conversion -Wfloat-equal -Wformat -Wformat-security -Wformat-signedness -Wimplicit -Wimplicit-fallthrough -Wignored-qualifiers -Wlogical-not-parentheses -Wmaybe-uninitialized -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-parameter-type -Wmissing-prototypes -Wmissing-variable-declarations -Wnested-externs -Wno-long-long -Wno-unreachable-code -Wparentheses -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-prototypes -Wswitch -Wswitch-default -Wtype-limits -Wundef -Wuninitialized -Wunreachable-code -Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-parameter -Wunused-result -Wunused-value -Wunused-variable -Wwrite-strings -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -fpermissive -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -c tar-internal.c -o tar-internal.o >/dev/null 2>&1 make[4]: Leaving directory '/root/rpmbuild/BUILD/mc-4.8.33-build/mc-4.8.33/src/vfs/tar' make[3]: *** [Makefile:603: all-recursive] Error 1 make[2]: *** [Makefile:716: all-recursive] Error 1 make[1]: *** [Makefile:599: all-recursive] Error 1 make: *** [Makefile:529: all] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.HldT5d (%build)
This also after recent Changes... Using Fedora 41 here... This can be easily solved by casting...
Change History
comment:1 Changed 3 months ago by andrew_b
- Owner set to andrew_b
- Status changed from new to accepted
- Component changed from mc-core to compilation
- Blocked By 4593 added
- Milestone changed from Future Releases to 4.8.33
comment:3 follow-up: ↓ 4 Changed 3 months ago by zaytsev
Ubuntu 24.04:
make[4]: Entering directory '/home/zaytsev/src/mc/build/src/vfs/tar' CC tar-internal.lo ../../../../src/vfs/tar/tar-internal.c: In function ‘tar_flush_read’: ../../../../src/vfs/tar/tar-internal.c:131:16: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘idx_t’ {aka ‘long int’} [-Wsign-compare] 131 | if (status == record_size) | ^~ ../../../../src/vfs/tar/tar-internal.c: In function ‘stoint’: ../../../../src/vfs/tar/tar-internal.c:289:25: warning: comparison of integer expressions of different signedness: ‘uintmax_t’ {aka ‘long unsigned int’} and ‘intmax_t’ {aka ‘long int’} [-Wsign-compare] 289 | v |= maxval < i ? 1 : 0; | ^ CC tar-sparse.lo CC tar-xheader.lo In function ‘decode_timespec’, inlined from ‘decode_time.isra’ at ../../../../src/vfs/tar/tar-xheader.c:322:9: ../../../../src/vfs/tar/tar-xheader.c:260:17: warning: ‘arg_lim’ is used uninitialized [-Wuninitialized] 260 | char const *p = *arg_lim; | ^ ../../../../src/vfs/tar/tar-xheader.c: In function ‘decode_time.isra’: ../../../../src/vfs/tar/tar-xheader.c:317:11: note: ‘arg_lim’ declared here 317 | char *arg_lim; | ^~~~~~~ CC tar.lo ../../../../src/vfs/tar/tar.c: In function ‘tar_checksum’: ../../../../src/vfs/tar/tar.c:335:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare] 335 | for (i = 0; i < sizeof (*header); i++) | ^ ../../../../src/vfs/tar/tar.c:348:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare] 348 | for (i = 0; i < sizeof (header->header.chksum); i++) | ^ CCLD libvfs-tar.la
... but build succeeds.
comment:4 in reply to: ↑ 3 Changed 3 months ago by Axanar
Replying to zaytsev:
Ubuntu 24.04:
[..]... but build succeeds.
Fedora increases hardening flags during compile time. If you compile normally, then you might end up with warnings and the compile succeeds... But if you compile for release RPMs using e.g. rpmbuild, mock or pungi, then you may end up in warnings being treated as errors. build fails.
/usr/lib/rpm/redhat/macros
comment:5 Changed 3 months ago by zaytsev
I don't think so. I think it has to do with stdckdint.h. On Fedora, build fails even without mock & co.
comment:6 Changed 2 months ago by Axanar
Now compiles on Fedora 41. Thank you!
Branch: 4593_tar_compilation
Passes RPM Hardening rules and compiles with rpmbuild!