[Bug 2076668] Re: FTBFS on armhf due to t64

Heitor Alves de Siqueira 2076668 at bugs.launchpad.net
Fri Aug 16 12:43:32 UTC 2024


Checking https://launchpad.net/ubuntu/+source/nvme-cli/2.8-1ubuntu0.1, I
see that all arches built successfully and seem to have been published.

I've also looked into the build logs for armhf specifically, and the
"incompatible pointer type" errors are not present anymore. Marking this
one as verified, accordingly.

** Tags removed: verification-needed verification-needed-noble
** Tags added: verification-done verification-done-noble

-- 
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 Committed

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