Bug 198657 - net/vde2 can't compile
Summary: net/vde2 can't compile
Status: Closed Unable to Reproduce
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Bartek Rutkowski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-17 14:21 UTC by Nick
Modified: 2018-07-05 05:00 UTC (History)
4 users (show)

See Also:


Attachments
build log (59.85 KB, text/x-log)
2015-03-17 14:21 UTC, Nick
no flags Details
build log (59.50 KB, text/plain)
2015-06-26 11:12 UTC, Nick
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick 2015-03-17 14:21:13 UTC
Created attachment 154454 [details]
build log

Can't compile, full log attached.

vde_pcapplug.c:204:34: error: use of undeclared identifier 'BIOCSHDRCMPLT'
        { unsigned int i = 1; ioctl(fd, BIOCSHDRCMPLT, &i); }
                                        ^
vde_pcapplug.c:208:34: error: use of undeclared identifier 'BIOCIMMEDIATE'
        { unsigned int i = 1; ioctl(fd, BIOCIMMEDIATE, &i); }
                                        ^
vde_pcapplug.c:212:34: error: use of undeclared identifier 'BIOCFEEDBACK'
        { unsigned int i = 1; ioctl(fd, BIOCFEEDBACK, &i); }
                                        ^
3 errors generated.
Makefile:499: recipe for target 'vde_pcapplug.o' failed
gmake[5]: *** [vde_pcapplug.o] Error 1
gmake[5]: Leaving directory '/usr/ports/net/vde2/work/vde2-2.3.2/src'
Makefile:538: recipe for target 'all-recursive' failed
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory '/usr/ports/net/vde2/work/vde2-2.3.2/src'
Makefile:309: recipe for target 'all-recursive' failed
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory '/usr/ports/net/vde2/work/vde2-2.3.2'
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/net/vde2
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/vde2
*** Error code 1

Stop.
make: stopped in /usr/ports/net/vde2
Comment 1 Bartek Rutkowski freebsd_committer freebsd_triage 2015-04-02 20:58:30 UTC
Can you provide more details about your system, make.conf settings, port version and so on? I've tested building that port on 8.4, 9.3 and 10.1 amd64/i386 and it builds just fine.
Comment 2 Bartek Rutkowski freebsd_committer freebsd_triage 2015-04-10 13:41:26 UTC
Since the port builds fine on all supported platforms (I've tested it again) I am closing this PR since the submitter doesnt respond with more information and I can't reproduce the issue.
Comment 3 Nick 2015-06-26 11:10:56 UTC
Just the same problem on my machine

10.1-RELEASE-p10 FreeBSD /usr/obj/usr/src/sys/GENERIC amd64
Comment 4 Nick 2015-06-26 11:12:52 UTC
Created attachment 158071 [details]
build log
Comment 5 Bartek Rutkowski freebsd_committer freebsd_triage 2016-04-17 11:51:28 UTC
Since I cant reproduce the issue on any supported OS version, and you have not provided all requested information (make.conf settings, port version and so on) I am closing this PR.
Comment 6 dewayne 2018-01-20 04:09:56 UTC
On 11.1-STABLE FreeBSD 11.1-STABLE  r327954M amd64 1101506 1101506

I'm experiencing the same problem, with clang 5.0.1
----------------
vde_pcapplug.c:204:34: error: use of undeclared identifier 'BIOCSHDRCMPLT'
        { unsigned int i = 1; ioctl(fd, BIOCSHDRCMPLT, &i); }
                                        ^
vde_pcapplug.c:208:34: error: use of undeclared identifier 'BIOCIMMEDIATE'
        { unsigned int i = 1; ioctl(fd, BIOCIMMEDIATE, &i); }
                                        ^
vde_pcapplug.c:212:34: error: use of undeclared identifier 'BIOCFEEDBACK'
        { unsigned int i = 1; ioctl(fd, BIOCFEEDBACK, &i); }

and with gcc7
----------------
vde_pcapplug.c: In function 'setup_fd':
vde_pcapplug.c:204:34: error: 'BIOCSHDRCMPLT' undeclared (first use in this function); did you mean 'SIOCSDRVSPEC'?
  { unsigned int i = 1; ioctl(fd, BIOCSHDRCMPLT, &i); }
                                  ^~~~~~~~~~~~~
                                  SIOCSDRVSPEC
vde_pcapplug.c:204:34: note: each undeclared identifier is reported only once for each function it appears in
vde_pcapplug.c:208:34: error: 'BIOCIMMEDIATE' undeclared (first use in this function); did you mean 'SIOCSIFMEDIA'?
  { unsigned int i = 1; ioctl(fd, BIOCIMMEDIATE, &i); }
                                  ^~~~~~~~~~~~~
                                  SIOCSIFMEDIA
vde_pcapplug.c:212:34: error: 'BIOCFEEDBACK' undeclared (first use in this function); did you mean 'BIOCIMMEDIATE'?
  { unsigned int i = 1; ioctl(fd, BIOCFEEDBACK, &i); }
                                  ^~~~~~~~~~~~
                                  BIOCIMMEDIATE
vde_pcapplug.c: In function 'main':
----------------


it appears that net/vde2's 
work/vde2-2.3.2/src/vde_pcapplug.c
is missing /usr/include/net/bpf.h file.  Inserting the "#include <net/bpf.h>" include file, I then received:

In file included from vde_pcapplug.c:56:
/usr/include/net/bpf.h:65:8: error: redefinition of 'bpf_program'
struct bpf_program {
       ^
/usr/local/include/pcap/bpf.h:108:8: note: previous definition is here
struct bpf_program {
       ^
There is no make.conf involved.  I use
make __MAKE_CONF=/dev/null -C /usr/ports/net/vde2 clean package

However this is performed within a jail, that also builds 1200+ other ports, so its not an environment issue ;)
Comment 7 O. Hartmann 2018-07-05 05:00:40 UTC
The problem is present on CURRENT (as of these days, it is 12-CURRENT, poudriere-jail: head-amd64 12.0-CURRENT 1200065 amd64, hosting host is FreeBSD 12.0-CURRENT #159 r335968: Wed Jul  4 22:02:29 CEST 2018. See Bug 229525.