FTBFS on armfh - error: too few arguments to function ‘gettimeofday’

Bug #2061966 reported by Miriam España Acebal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
backuppc-rsync (Debian)
Fix Released
Unknown
backuppc-rsync (Ubuntu)
Fix Released
Undecided
Miriam España Acebal

Bug Description

lib/compat.c:154:16: error: too few arguments to function ‘gettimeofday’
  154 | return gettimeofday(tv);
      | ^~~~~~~~~~~~
In file included from /usr/include/features.h:502,
                 from /usr/include/arm-linux-gnueabihf/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:28,
                 from ./rsync.h:318,
                 from lib/compat.c:22:
/usr/include/arm-linux-gnueabihf/sys/time.h:71:12: note: declared here
   71 | extern int __REDIRECT_NTH (gettimeofday, (struct timeval *__restrict __tv,
      | ^~~~~~~~~~~~~~
lib/compat.c:156:1: warning: control reaches end of non-void function [-Wreturn-type]
  156 | }
      | ^

from armhf buildlog [1]

[1] https://launchpadlibrarian.net/724113685/buildlog_ubuntu-noble-armhf.backuppc-rsync_3.1.3.0-3build2_BUILDING.txt.gz

Related branches

Changed in backuppc-rsync (Ubuntu):
status: New → In Progress
Changed in backuppc-rsync (Ubuntu):
status: In Progress → New
assignee: Miriam España Acebal (mirespace) → nobody
Changed in backuppc-rsync (Ubuntu):
assignee: nobody → Miriam España Acebal (mirespace)
status: New → In Progress
Revision history for this message
Miriam España Acebal (mirespace) wrote :

I found a promising fix upstream for "update autoconfig files":

https://github.com/backuppc/rsync-bpc/commit/ce3ce3061c2acc4c78693953d6a1a2cf50145fe2#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810L855

with a lot of changes of "main" by "int main(void)" as can be seen i.e. at:

https://github.com/backuppc/rsync-bpc/commit/ce3ce3061c2acc4c78693953d6a1a2cf50145fe2#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810L878

and with a later commit for one more missing:

https://github.com/backuppc/rsync-bpc/pull/34/files

The first commit is big: checking if all the changes are needed

Changed in backuppc-rsync (Debian):
status: Unknown → Confirmed
tags: added: update-excuse
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

The configure check is failing due to a missing include:
conftest.c: In function 'main':
conftest.c:177:20: error: implicit declaration of function 'exit' [-Werror=implicit-function-declaration]
  177 | struct timeval tv; exit(gettimeofday(&tv, NULL));
      | ^~~~
conftest.c:174:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
  173 | #include <unistd.h>
  174 | int
conftest.c:177:20: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
  177 | struct timeval tv; exit(gettimeofday(&tv, NULL));
      | ^~~~
conftest.c:177:20: note: include '<stdlib.h>' or provide a declaration of 'exit'
cc1: some warnings being treated as errors

Since the failure is due to that missing include, instead of the gettimeofday() function, the check reaches the incorrect answer to the question "checking if gettimeofday takes tz argument ".

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Uploaded to noble unapproved.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package backuppc-rsync - 3.1.3.0-3ubuntu1

---------------
backuppc-rsync (3.1.3.0-3ubuntu1) noble; urgency=medium

  * d/p/fix-gettimeofday-detection.patch: fix configure check for
    gettimeofday() (LP: #2061966)

 -- Andreas Hasenack <email address hidden> Wed, 17 Apr 2024 19:25:18 -0300

Changed in backuppc-rsync (Ubuntu):
status: In Progress → Fix Released
Changed in backuppc-rsync (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.