Bug 250219

Summary: net/nifmon build failure on current (fcommon problem)
Product: Ports & Packages Reporter: tech-lists
Component: Individual Port(s)Assignee: Alexey Dokuchaev <danfe>
Status: Closed FIXED    
Severity: Affects Only Me CC: danfe, mikael
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description tech-lists 2020-10-09 12:09:42 UTC
Hi,

context: poudriere-devel on rpi4/aarch64@r366312 system building natively (poudriere jail is @r365846), and ports@551758. It builds *fine* on amd64.

from 'poudriere testport'

[00:00:38] --- nifmon ---
[00:00:38] cc -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -std=gnu99 -Wno-format-zero-length -nobuiltininc -idirafter /usr/
lib/clang/11.0.0/include -fstack-protector-strong -Qunused-arguments  -fstack-protector-strong    -o nifmon main.o curses.o if.o proces
s.o  -lncurses   
[00:00:38] ld: error: duplicate symbol: background
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(background)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x40)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: curses_ready
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(curses_ready)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x14)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: do_bell
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(do_bell)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x20)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: has_rdev
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(has_rdev)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x44)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: has_term
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(has_term)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x48)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: hostname
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(hostname)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x18)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: if_flags
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(if_flags)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x10)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: lower_w
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(lower_w)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x8)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: pfp
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(pfp)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x28)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: pidfile
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(pidfile)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x4C)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: rdev
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(rdev)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x30)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: term
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(term)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x38)
[00:00:38]


[00:00:38] --- nifmon.8.gz ---
[00:00:38] gzip -cn nifmon.8 > nifmon.8.gz
[00:00:38] --- nifmon ---
[00:00:38] cc -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -std=gnu99 -Wno-format-zero-length -nobuiltininc -idirafter /usr/
lib/clang/11.0.0/include -fstack-protector-strong -Qunused-arguments  -fstack-protector-strong    -o nifmon main.o curses.o if.o proces
s.o  -lncurses
[00:00:38] ld: error: duplicate symbol: background
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(background)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x40)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: curses_ready
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(curses_ready)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x14)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: do_bell
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(do_bell)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x20)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: has_rdev
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(has_rdev)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x44)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: has_term
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(has_term)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x48)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: hostname
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(hostname)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x18)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: if_flags
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(if_flags)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x10)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: lower_w
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(lower_w)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x8)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: pfp
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(pfp)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x28)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: pidfile
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(pidfile)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x4C)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: rdev
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(rdev)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x30)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: term
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(term)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x38)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: upper_w
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(upper_w)
[00:00:38] >>> defined at curses.c
[00:00:38] >>>            curses.o:(.bss+0x0)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: background
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(background)
[00:00:38] >>> defined at if.c
[00:00:38] >>>            if.o:(.bss+0xA28)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: curses_ready
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(curses_ready)
[00:00:38] >>> defined at if.c
[00:00:38] >>>            if.o:(.bss+0xA00)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: do_bell
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(do_bell)
[00:00:38] >>> defined at if.c
[00:00:38] >>>            if.o:(.bss+0xA04)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: has_rdev
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(has_rdev)
[00:00:38] >>> defined at if.c
[00:00:38] >>>            if.o:(.bss+0xA2C)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: has_term
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(has_term)
[00:00:38] >>> defined at if.c
[00:00:38] >>>            if.o:(.bss+0xA30)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: hostname
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(hostname)
[00:00:38] >>> defined at if.c
[00:00:38] >>>            if.o:(.bss+0x9E0)
[00:00:38]
[00:00:38] ld: error: duplicate symbol: if_flags
[00:00:38] >>> defined at main.c
[00:00:38] >>>            main.o:(if_flags)
[00:00:38] >>> defined at if.c
[00:00:38] >>>            if.o:(.bss+0x838)
[00:00:38]
[00:00:38] ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
[00:00:38] cc: error: linker command failed with exit code 1 (use -v to see invocation)
[00:00:38] *** [nifmon] Error code 1
[00:00:38]
[00:00:38] make[1]: stopped in /wrkdirs/usr/ports/net/nifmon/work/nifmon-1.4
[00:00:38] 1 error
[00:00:38]
[00:00:38] make[1]: stopped in /wrkdirs/usr/ports/net/nifmon/work/nifmon-1.4
[00:00:38] ===> Compilation failed unexpectedly.
[00:00:39] Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
[00:00:39] the maintainer.
[00:00:39] *** Error code 1
[00:00:39]
[00:00:39] Stop.
[00:00:39] make: stopped in /usr/ports/net/nifmon
[00:00:39] build of net/nifmon | nifmon-1.4 ended at Fri Oct  9 12:46:06 BST 2020
[00:00:39] build time: 00:00:14
[00:00:39] !!! build failure encountered !!!
[00:00:39] Error: Build failed in phase: build
Comment 1 commit-hook freebsd_committer 2020-10-14 06:41:41 UTC
A commit references this bug:

Author: danfe
Date: Wed Oct 14 06:41:25 UTC 2020
New revision: 552302
URL: https://svnweb.freebsd.org/changeset/ports/552302

Log:
  Force -fcommon to unbreak the build against Clang 11 and GCC 10.

  PR:	250219

Changes:
  head/net/nifmon/files/patch-Makefile
Comment 2 Alexey Dokuchaev freebsd_committer 2020-10-14 06:43:13 UTC
Should be fixed as of ports r552302, thanks for reporting!