[Bug 2076668] Re: FTBFS on armhf due to t64
Launchpad Bug Tracker
2076668 at bugs.launchpad.net
Thu Sep 12 20:51:33 UTC 2024
This bug was fixed in the package nvme-cli - 2.8-1ubuntu0.1
---------------
nvme-cli (2.8-1ubuntu0.1) noble; urgency=medium
[ Chengen Du ]
* NVMe show-regs command forcibly reboots ARM-based VM (LP: #2072381)
- d/p/lp2072381-0001-Avoid-using-unsupported-load-store-instruct.patch
[ Heitor Alves de Siqueira ]
* Fix FTBFS due to 64-bit time_t on 32-bit architectures (LP: #2076668)
- d/p/lp2076668-use-time_t-for-time_stamp-values.patch
-- Heitor Alves de Siqueira <halves at canonical.com> Wed, 14 Aug 2024
14:29:31 +0000
** Changed in: nvme-cli (Ubuntu Noble)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to nvme-cli in Ubuntu.
https://bugs.launchpad.net/bugs/2076668
Title:
FTBFS on armhf due to t64
Status in nvme-cli package in Ubuntu:
Fix Released
Status in nvme-cli source package in Noble:
Fix Released
Bug description:
[Impact]
The virtium plugin can cause FTBFS due to 64-bit time_t on 32-bit architectures
[Fix]
Changing timestamp types to time_t ensures correct builds on 32-bit systems even with 64-bit time_t (e.g. armhf). This has been fixed by the following upstream patch:
- fa0296794e49 plugins/virtium: use time_t for time_stamp values
https://github.com/linux-nvme/nvme-cli/commit/fa0296794e49
This has been merged into v2.10 upstream.
[Test Plan]
When building with 64-bit time_t and without the fix, the following build error will occur (e.g. Oracular on armhf):
[242/476] cc -Invme.p -I. -I.. -Iccan -I../ccan -I/usr/include/json-c -fdiagnostics-color=always -Wall -Winvalid-pch -std=gnu99 -fomit-frame-pointer -D_GNU_SOURCE -include config.h -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/nvme-cli-2.9.1-1ubuntu1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=3 -MD -MQ nvme.p/plugins_virtium_virtium-nvme.c.o -MF nvme.p/plugins_virtium_virtium-nvme.c.o.d -o nvme.p/plugins_virtium_virtium-nvme.c.o -c ../plugins/virtium/virtium-nvme.c
FAILED: nvme.p/plugins_virtium_virtium-nvme.c.o
cc -Invme.p -I. -I.. -Iccan -I../ccan -I/usr/include/json-c -fdiagnostics-color=always -Wall -Winvalid-pch -std=gnu99 -fomit-frame-pointer -D_GNU_SOURCE -include config.h -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/nvme-cli-2.9.1-1ubuntu1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=3 -MD -MQ nvme.p/plugins_virtium_virtium-nvme.c.o -MF nvme.p/plugins_virtium_virtium-nvme.c.o.d -o nvme.p/plugins_virtium_virtium-nvme.c.o -c ../plugins/virtium/virtium-nvme.c
../plugins/virtium/virtium-nvme.c: In function ‘vt_header_to_string’:
../plugins/virtium/virtium-nvme.c:205:63: error: passing argument 1 of ‘localtime’ from incompatible pointer type [-Wincompatible-pointer-types]
205 | strftime(timebuff, 50, "%Y-%m-%d %H:%M:%S", localtime(&(header->time_stamp)));
| ^~~~~~~~~~~~~~~~~~~~~
| |
| const long int *
In file included from /usr/include/features.h:510,
from /usr/include/fcntl.h:25,
from ../plugins/virtium/virtium-nvme.c:2:
/usr/include/time.h:141:19: note: expected ‘const time_t *’ {aka ‘const long long int *’} but argument is of type ‘const long int *’
141 | extern struct tm *__REDIRECT_NTH (localtime, (const time_t *__timer),
| ^~~~~~~~~~~~~~
After the patch, the virtium plugin files should build correctly (i.e.
no incompatible pointer types).
[Where problems could occur]
This patch could expose any bugs that were not present before the usage of time_t. Given this is specifically within the virtium plugins, no issues outside of this scope are expected.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nvme-cli/+bug/2076668/+subscriptions
More information about the foundations-bugs
mailing list