unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Ivan Vilata i Balaguer <ivan@selidor.net>
To: 53424@debbugs.gnu.org
Subject: bug#53424: tftp-hpa: Fails to build (multiple definition of 'toplevel' when linking)
Date: Fri, 21 Jan 2022 22:06:08 +0100	[thread overview]
Message-ID: <YesgQAyacHnPNMK+@sax.terramar.selidor.net> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 4880 bytes --]

Hi!  When trying to upgrade package `tftp-hpa 5.2` from Guix commit `404f6953`
to that of commit `4a943cfd`, the build fails showing these warnings and
error:

```
starting phase `build'
[…]
gcc -g -O2 -W -Wall -Wpointer-arith -Wbad-function-cast -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wwrite-strings -Wundef -Wshadow -Wsign-compare -pipe -fno-strict-aliasing -I/tmp/guix-build-tftp-hpa-5.2.drv-0/tftp-hpa-5.2 -c main.c
tftp.c: In function ‘tftp_sendfile’:
tftp.c:88:5: warning: implicit declaration of function ‘bsd_signal’; did you mean ‘ssignal’? [-Wimplicit-function-declaration]
   88 |     bsd_signal(SIGALRM, timer);
      |     ^~~~~~~~~~
      |     ssignal
tftp.c:88:5: warning: nested extern declaration of ‘bsd_signal’ [-Wnested-externs]
main.c: In function ‘main’:
main.c:308:5: warning: implicit declaration of function ‘bsd_signal’; did you mean ‘ssignal’? [-Wimplicit-function-declaration]
  308 |     bsd_signal(SIGINT, intr);
      |     ^~~~~~~~~~
      |     ssignal
main.c:308:5: warning: nested extern declaration of ‘bsd_signal’ [-Wnested-externs]
gcc -g -O2 -W -Wall -Wpointer-arith -Wbad-function-cast -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wwrite-strings -Wundef -Wshadow -Wsign-compare -pipe -fno-strict-aliasing -I/tmp/guix-build-tftp-hpa-5.2.drv-0/tftp-hpa-5.2 -c misc.c
sed -e 's/@@VERSION@@/5.2/g' < tftp.1.in > tftp.1
gcc -g -O2 -W -Wall -Wpointer-arith -Wbad-function-cast -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wwrite-strings -Wundef -Wshadow -Wsign-compare -pipe -fno-strict-aliasing -I/tmp/guix-build-tftp-hpa-5.2.drv-0/tftp-hpa-5.2 -c remap.c
sed -e 's/@@VERSION@@/5.2/g' < tftpd.8.in > tftpd.8
tftpd.c: In function ‘tftp_recvfile’:
tftpd.c:1647:69: warning: argument ‘oap’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
 1647 | static void tftp_recvfile(const struct formats *pf, struct tftphdr *oap, int oacklen)
      |                                                     ~~~~~~~~~~~~~~~~^~~
main.c:191:20: warning: inlining failed in call to ‘usage’: call is unlikely and code size would grow [-Winline]
  191 | static inline void usage(int errcode)
      |                    ^~~~~
main.c:244:25: note: called from here
  244 |                         usage(EX_USAGE);
      |                         ^~~~~~~~~~~~~~~
main.c:191:20: warning: inlining failed in call to ‘usage’: call is unlikely and code size would grow [-Winline]
  191 | static inline void usage(int errcode)
      |                    ^~~~~
main.c:266:25: note: called from here
  266 |                         usage(EX_USAGE);
      |                         ^~~~~~~~~~~~~~~
main.c:191:20: warning: inlining failed in call to ‘usage’: call is unlikely and code size would grow [-Winline]
  191 | static inline void usage(int errcode)
      |                    ^~~~~
main.c:279:21: note: called from here
  279 |                     usage(*optx == 'h' ? 0 : EX_USAGE);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:191:20: warning: inlining failed in call to ‘usage’: call is unlikely and code size would grow [-Winline]
  191 | static inline void usage(int errcode)
      |                    ^~~~~
main.c:284:17: note: called from here
  284 |                 usage(EX_USAGE);
      |                 ^~~~~~~~~~~~~~~
gcc  tftp.o main.o ../common/libcommon.a  /tmp/guix-build-tftp-hpa-5.2.drv-0/tftp-hpa-5.2/lib/libxtra.a  -o tftp
ld: main.o:/tmp/guix-build-tftp-hpa-5.2.drv-0/tftp-hpa-5.2/tftp/main.c:98: multiple definition of `toplevel'; tftp.o:/tmp/guix-build-tftp-hpa-5.2.drv-0/tftp-hpa-5.2/tftp/tftp.c:51: first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:12: tftp] Error 1
make[1]: Leaving directory '/tmp/guix-build-tftp-hpa-5.2.drv-0/tftp-hpa-5.2/tftp'
make: *** [Makefile:7: tftp.build] Error 2
make: *** Waiting for unfinished jobs....
gcc  tftpd.o recvfrom.o misc.o remap.o ../common/libcommon.a  /tmp/guix-build-tftp-hpa-5.2.drv-0/tftp-hpa-5.2/lib/libxtra.a  -o tftpd
make[1]: Leaving directory '/tmp/guix-build-tftp-hpa-5.2.drv-0/tftp-hpa-5.2/tftpd'
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("-j" "4") exit-status: 2 term-signal: #f stop-signal: #f> 
phase `build' failed after 0.8 seconds
command "make" "-j" "4" failed with status 2
```

Maybe something changed with the compiler which causes `toplevel` to be
defined twice, not sure whether the warnings are relevant.  Attaching whole
`/var/log/guix/drvs/n7/mi9pqbpgad3gnz97s02zd056qnzcfg-tftp-hpa-5.2.drv.bz2`.

Thanks a lot!

-- 
Ivan Vilata i Balaguer -- https://elvil.net/

[-- Attachment #1.2: mi9pqbpgad3gnz97s02zd056qnzcfg-tftp-hpa-5.2.drv.bz2 --]
[-- Type: application/octet-stream, Size: 4892 bytes --]

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2022-01-21 21:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-21 21:06 Ivan Vilata i Balaguer [this message]
2022-01-21 21:20 ` bug#53424: tftp-hpa: Fails to build (multiple definition of 'toplevel' when linking) Tobias Geerinckx-Rice via Bug reports for GNU Guix
2022-01-22 21:08   ` Ivan Vilata i Balaguer
2022-01-22 21:39     ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2022-01-21 22:14 ` Maxime Devos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YesgQAyacHnPNMK+@sax.terramar.selidor.net \
    --to=ivan@selidor.net \
    --cc=53424@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).