Opened 11 months ago
Closed 11 months ago
#68896 closed defect (fixed)
collectd @5.12.0: error: variable 'num_entries' set but not used
Reported by: | FranklinYu (Franklin Yu) | Owned by: | neverpanic (Clemens Lang) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | raimue (Rainer Müller) | |
Port: | collectd |
Description
Relevant error message (from the MacPorts log file):
src/bind.c:473:7: error: variable 'num_entries' set but not used [-Werror,-Wunused-but-set-variable] int num_entries = 0; ^ src/bind.c:552:7: error: variable 'num_entries' set but not used [-Werror,-Wunused-but-set-variable] int num_entries = 0; ^ src/bind.c:612:7: error: variable 'num_entries' set but not used [-Werror,-Wunused-but-set-variable] int num_entries = 0; ^ 3 errors generated. make[1]: *** [src/bind_la-bind.lo] Error 1 make: *** [all] Error 2
I was able to reproduce this after running sudo -u macports make
in the build-directory.
Change History (5)
comment:1 Changed 11 months ago by FranklinYu (Franklin Yu)
comment:2 Changed 11 months ago by ryandesign (Ryan Carsten Schmidt)
Cc: | raimue added |
---|---|
Owner: | set to neverpanic |
Status: | new → assigned |
Summary: | collectd 5.12.0: doesn’t build → collectd @5.12.0: error: variable 'num_entries' set but not used |
comment:3 Changed 11 months ago by FranklinYu (Franklin Yu)
I noticed that the AUR package has --disable-werror
: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=collectd#n67
Maybe it can help?
comment:4 Changed 11 months ago by neverpanic (Clemens Lang)
comment:5 Changed 11 months ago by neverpanic (Clemens Lang)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
I feel that
-Werror
is only useful in./configure
(to detect features), or during CI build (for development). Building on end-user machine sounds more harmful than helpful.I found that it was specified in
Makefile
:I removed
-Werror
from theMakefile
, which allows me to build. I also noticed https://github.com/macports/macports-ports/blob/64319d031f9710587acc643b6a7eace717261a23/sysutils/collectd/Portfile#L34. Have we escalated to upstream about this issue (to see whether they are willing to make-Werror
optional)?