Bug 250554 - net/wmnd: Broken on CURRENT after update to 0.4.18
Summary: net/wmnd: Broken on CURRENT after update to 0.4.18
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Renato Botelho
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-23 05:58 UTC by Rainer Hurling
Modified: 2020-10-26 12:26 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (garga)


Attachments
patch (375 bytes, patch)
2020-10-23 19:51 UTC, Renato Botelho
no flags Details | Diff
config.log containing NetBSD ioctl availability (105.22 KB, text/plain)
2020-10-23 19:54 UTC, Rainer Hurling
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Hurling freebsd_committer 2020-10-23 05:58:36 UTC
After the update of net/wmnd to 0.4.18, the build is broken on **CURRENT** with Poudriere and in 'real life' boxes with the following errors for drivers.c:


===>  Building for wmnd-0.4.18
gmake[1]: Entering directory '/wrkdirs/usr/ports/net/wmnd/work/wmnd-0.4.18'
gmake  all-recursive
gmake[2]: Entering directory '/wrkdirs/usr/ports/net/wmnd/work/wmnd-0.4.18'
Making all in src
gmake[3]: Entering directory '/wrkdirs/usr/ports/net/wmnd/work/wmnd-0.4.18/src'
cc -DHAVE_CONFIG_H -I. -I..     -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing   -I/usr/local/include -MT cfgdata.o -MD -MP -MF .deps/cfgdata.Tpo -c -o cfgdata.o cfgdata.c
mv -f .deps/cfgdata.Tpo .deps/cfgdata.Po
cc -DHAVE_CONFIG_H -I. -I..     -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing   -I/usr/local/include -MT display.o -MD -MP -MF .deps/display.Tpo -c -o display.o display.c
mv -f .deps/display.Tpo .deps/display.Po
cc -DHAVE_CONFIG_H -I. -I..     -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing   -I/usr/local/include -MT drivers.o -MD -MP -MF .deps/drivers.Tpo -c -o drivers.o drivers.c
drivers.c:1260:17: error: incomplete definition of type 'struct ifdatareq'
  strncpy(ifdreq.ifdr_name, dev->name, IFNAMSIZ - 1);
          ~~~~~~^
drivers.c:1206:8: note: forward declaration of 'struct ifdatareq'
struct ifdatareq ifdreq;
       ^
drivers.c:1264:15: error: incomplete definition of type 'struct ifdatareq'
  *ip = ifdreq.ifdr_data.ifi_ipackets;
        ~~~~~~^
drivers.c:1206:8: note: forward declaration of 'struct ifdatareq'
struct ifdatareq ifdreq;
       ^
drivers.c:1265:15: error: incomplete definition of type 'struct ifdatareq'
  *ib = ifdreq.ifdr_data.ifi_ibytes;
        ~~~~~~^
drivers.c:1206:8: note: forward declaration of 'struct ifdatareq'
struct ifdatareq ifdreq;
       ^
drivers.c:1266:15: error: incomplete definition of type 'struct ifdatareq'
  *op = ifdreq.ifdr_data.ifi_opackets;
        ~~~~~~^
drivers.c:1206:8: note: forward declaration of 'struct ifdatareq'
struct ifdatareq ifdreq;
       ^
drivers.c:1267:15: error: incomplete definition of type 'struct ifdatareq'
  *ob = ifdreq.ifdr_data.ifi_obytes;
        ~~~~~~^
drivers.c:1206:8: note: forward declaration of 'struct ifdatareq'
struct ifdatareq ifdreq;
       ^
drivers.c:1206:18: error: tentative definition has type 'struct ifdatareq' that is never completed
struct ifdatareq ifdreq;
                 ^
drivers.c:1206:8: note: forward declaration of 'struct ifdatareq'
struct ifdatareq ifdreq;
       ^
6 errors generated.
gmake[3]: *** [Makefile:392: drivers.o] Error 1
gmake[3]: Leaving directory '/wrkdirs/usr/ports/net/wmnd/work/wmnd-0.4.18/src'
gmake[2]: *** [Makefile:478: all-recursive] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/net/wmnd/work/wmnd-0.4.18'
gmake[1]: *** [Makefile:355: all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/net/wmnd/work/wmnd-0.4.18'
*** Error code 1

Stop.
make: stopped in /usr/ports/net/wmnd
Comment 1 Renato Botelho freebsd_committer 2020-10-23 12:23:25 UTC
0.4.17 was failing on current (same issue) then I noted a new version was available and decided to test before dig into the issue.  For my surprise it worked, as you can see at [1].  So I just went ahead and upgraded the port.

What is the revision of your -CURRENT?  I'm going to try to reproduce it.


[1] https://bast.garga.net.br/build.html?mastername=13-amd64-default&build=2020-10-22_14h10m19s
Comment 2 Rainer Hurling freebsd_committer 2020-10-23 14:29:39 UTC
(In reply to Renato Botelho from comment #1)
Hi Renato,

This is the head of my Poudriere build process:

=>> Building net/wmnd
build started at Fri Oct 23 16:26:52 CEST 2020
port directory: /usr/ports/net/wmnd
package name: wmnd-0.4.18
building for: FreeBSD HEADamd64-default-qgis-job-01 13.0-CURRENT FreeBSD 13.0-CURRENT 1300122 amd64
maintained by: garga@FreeBSD.org
Makefile ident:      $FreeBSD: head/net/wmnd/Makefile 552998 2020-10-22 17:29:22Z garga $
Poudriere version: 3.3.4
Host OSVERSION: 1300122
Jail OSVERSION: 1300122

Thanks for investigating into it :)
Comment 3 Renato Botelho freebsd_committer 2020-10-23 15:48:05 UTC
(In reply to Rainer Hurling from comment #2)
I've upgraded current to latest revision and also upgraded ports tree and it still builds fine as you can see:

https://bast.garga.net.br/data/13-amd64-default/2020-10-23_12h18m33s/logs/wmnd-0.4.18.log

Maybe you have a local issue?
Comment 4 Rainer Hurling freebsd_committer 2020-10-23 19:26:21 UTC
(In reply to Renato Botelho from comment #3)
Very interesting, that your build on Poudriere went fine. It is likely that there is a local issue at my side.

Comparing your configure phase and the one from my build, the following differs:

#diff -urN wmnd_Renato.txt wmnd_Rainer.txt
--- wmnd_Renato.txt	2020-10-23 21:17:33.933080000 +0200
+++ wmnd_Rainer.txt	2020-10-23 21:23:43.428087000 +0200
@@ -70,7 +70,7 @@
 checking kstat.h usability... no
 checking kstat.h presence... no
 checking for kstat.h... no
-checking for NetBSD ioctl availability... no
+checking for NetBSD ioctl availability... yes
 checking pcp/pmapi.h usability... no
 checking pcp/pmapi.h presence... no
 checking for pcp/pmapi.h... no
@@ -89,6 +89,6 @@
 configure: configuration:
 
 disable trend support: no
-enabled drivers:       freebsd_sysctl
+enabled drivers:       freebsd_sysctl netbsd_ioctl
 enabled display modes: traditional mgraph waveform wmwave wmnet sepgraphs twisted charts needle lines
 

This NetBSD ioctl availability is also found on my boxes outside of Poudriere. Don't know, if this is the reason for the breakage on my side ...
Comment 5 Renato Botelho freebsd_committer 2020-10-23 19:42:25 UTC
(In reply to Rainer Hurling from comment #4)
it would be interesting to capture config.log from your build and understand why it was not found
Comment 6 Renato Botelho freebsd_committer 2020-10-23 19:50:37 UTC
(In reply to Rainer Hurling from comment #4)
Sorry, I read the information reversed and now I see your environment ends up detecting netbsd_ioctl.

Please try attached patch
Comment 7 Renato Botelho freebsd_committer 2020-10-23 19:51:02 UTC
Created attachment 219017 [details]
patch
Comment 8 Rainer Hurling freebsd_committer 2020-10-23 19:54:08 UTC
Created attachment 219018 [details]
config.log containing NetBSD ioctl availability

This is my config.log, which hopefully shows the decisive difference ;)
Comment 9 Rainer Hurling freebsd_committer 2020-10-23 20:02:14 UTC
(In reply to Renato Botelho from comment #6)
Our contributions have overlapped in time ;)

I applied your patch and can confirm: it works!

Many thanks and regards,
Rainer
Comment 10 Rainer Hurling freebsd_committer 2020-10-24 14:49:59 UTC
Hi Renato,

do you plan to commit the patch in the near future?

As far as I can say, it is not only ok for CURRENT, but also for 11.4 and 12.1 (amd64 and i386).

Thanks in advance,
Rainer
Comment 11 commit-hook freebsd_committer 2020-10-26 12:26:13 UTC
A commit references this bug:

Author: garga
Date: Mon Oct 26 12:25:50 UTC 2020
New revision: 553349
URL: https://svnweb.freebsd.org/changeset/ports/553349

Log:
  Force build to use only freebsd bits

  For some unknwon reason in some cases configure detects netbsd_ioctl in
  addition to freebsd_sysctl and it breaks build.  Force it to use only
  freebsd_sysctl

  PR:		250554
  Reported by:	rhurlin
  Sponsored by:	Rubicon Communications, LLC (Netgate)

Changes:
  head/net/wmnd/Makefile