Re: [Swan] Compiling on Ubuntu 16.04

2018-08-12 Thread Whit Blauvelt
Paul,

This turns out to work now, by itself, for "make deb" against the current
git:

echo USE_GLIBC_KERN_FLIP_HEADERS=true >> Makefile.inc.local

Thanks again for the help,

Whit
___
Swan mailing list
Swan@lists.libreswan.org
https://lists.libreswan.org/mailman/listinfo/swan


Re: [Swan] Compiling on Ubuntu 16.04

2018-08-12 Thread Whit Blauvelt
On Sun, Aug 12, 2018 at 12:20:18PM -0400, Paul Wouters wrote:

> >/usr/src/libreswan/programs/pluto/kernel_pfkey.c:754:13: error: 
> >‘pfkey_register_proto’ defined but not used [-Werror=unused-function]
> >static void pfkey_register_proto(unsigned int sadb_register,
> 
> I pushed a fix for that. XFRM/NETKEY no longer uses this function, so
> it was throwing an error when using USE_KLIPS=false which the debian
> build uses.

Thanks Paul,

Now on first attempt from virgin git using "make deb" we're back to:

-

In file included from 
/usr/src/libreswan/programs/pluto/linux-copy/linux/xfrm.h:5:0,
 from /usr/src/libreswan/programs/pluto/kernel_netlink.c:56:
/usr/include/netinet/in.h:101:5: error: expected identifier before numeric 
constant
 IPPROTO_HOPOPTS = 0,   /* IPv6 Hop-by-Hop options.  */
 ^

-

So again used:

echo USE_XFRM_HEADER_COPY=false >> Makefile.inc.local

and end up halted at:

-

In file included from /usr/include/linux/xfrm.h:4:0,
 from /usr/src/libreswan/programs/pluto/kernel_netlink.c:56:
/usr/include/netinet/in.h:101:5: error: expected identifier before numeric 
constant
 IPPROTO_HOPOPTS = 0,   /* IPv6 Hop-by-Hop options.  */
 ^
-

Best,
Whit
___
Swan mailing list
Swan@lists.libreswan.org
https://lists.libreswan.org/mailman/listinfo/swan


Re: [Swan] Compiling on Ubuntu 16.04

2018-08-12 Thread Whit Blauvelt
On Sat, Aug 11, 2018 at 11:06:11PM -0400, Paul Wouters wrote:

Trying from the tar again now:

> echo USE_XFRM_HEADER_COPY=false >> Makefile.inc.local

OK.

> The patch was removed from our debian patches directory, but the entry
> for the patch was not removed from the list in packaging/debian/patches/series
> (we since recreated the patch because it changes paths in the documentation)

> You can just remove the entry from packaging/debian/patches/series as it only
> patches a README file. (or grab the latest git master from github)

Copied the patch over from the git master, and ... same stopping place as
with "make deb" on the git master itself:

-

/usr/src/libreswan/programs/pluto/kernel_pfkey.c:754:13: error: 
‘pfkey_register_proto’ defined but not used [-Werror=unused-function]
 static void pfkey_register_proto(unsigned int sadb_register,
 ^
cc1: all warnings being treated as errors
../../mk/depend.mk:34: recipe for target 'kernel_pfkey.o' failed
make[5]: *** [kernel_pfkey.o] Error 1
../../mk/targets.mk:82: recipe for target 'all' failed
make[4]: *** [all] Error 2
make[4]: Leaving directory '/usr/src/libreswan/programs/pluto'
../mk/targets.mk:82: recipe for target 'recursive-all' failed
make[3]: *** [recursive-all] Error 2
make[3]: Leaving directory '/usr/src/libreswan/programs'
mk/targets.mk:82: recipe for target 'recursive-all' failed
make[2]: *** [recursive-all] Error 2
make[2]: Leaving directory '/usr/src/libreswan'
debian/rules:23: recipe for target 'override_dh_auto_build' failed
make[1]: *** [override_dh_auto_build] Error 2
make[1]: Leaving directory '/usr/src/libreswan'
debian/rules:6: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1376:
dpkg-buildpackage -rfakeroot -D -us -uc -i -b failed
Makefile:598: recipe for target 'deb' failed
make: *** [deb] Error 29

-

Best,
Whit
___
Swan mailing list
Swan@lists.libreswan.org
https://lists.libreswan.org/mailman/listinfo/swan


Re: [Swan] Compiling on Ubuntu 16.04

2018-08-11 Thread Paul Wouters

On Sat, 11 Aug 2018, Whit Blauvelt wrote:


Thanks for instant response. That page refers to old versions of 3 things.
"The workaround #1 is very specific to Wheezy (libc < 2.19 and kernel <
3.12). Later distributions fixed issues #1 and #2. #3 is because libunbound
is too old."

The Ubuntu 16.04 box in question has:


It is still a combination of things.


In file included from 
/usr/src/libreswan-3.25/programs/pluto/linux-copy/linux/xfrm.h:5:0,


It is using the linux-copy instead of the system one. If your system is
that new, you can try:

echo USE_XFRM_HEADER_COPY=false >> Makefile.inc.local


Sorry if I'm being dense. But I'm not sure what that page is suggesting I
need to do. Following the Executive Summary with its Makefile.inc.local
creating, then "make deb," is not it, and fails in same way I reported
before:

...
dpkg-source: warning: unknown information field 'Rules-Requires-Root' in input 
data in general section of control info file
dpkg-source: error: cannot read 
libreswan-3.25/debian/patches/0003-update-README.nss-to-match-debian-defaults-for-IPSEC.patch:
 No such file or directory
dpkg-buildpackage: error: dpkg-source -i --before-build libreswan-3.25 gave 
error exit status 2
debuild: fatal error at line 1376:
dpkg-buildpackage -rfakeroot -D -us -uc -i -b failed
Makefile:608: recipe for target 'deb' failed
make: *** [deb] Error 29


The patch was removed from our debian patches directory, but the entry
for the patch was not removed from the list in packaging/debian/patches/series
(we since recreated the patch because it changes paths in the documentation)

You can just remove the entry from packaging/debian/patches/series as it only
patches a README file. (or grab the latest git master from github)

Paul
___
Swan mailing list
Swan@lists.libreswan.org
https://lists.libreswan.org/mailman/listinfo/swan


Re: [Swan] Compiling on Ubuntu 16.04

2018-08-11 Thread Whit Blauvelt
Paul,

Thanks for instant response. That page refers to old versions of 3 things.
"The workaround #1 is very specific to Wheezy (libc < 2.19 and kernel <
3.12). Later distributions fixed issues #1 and #2. #3 is because libunbound
is too old."

The Ubuntu 16.04 box in question has:

  libc = 2.23-0ubuntu10 
  kernel = 4.4.0-93-generic
  libunbound2 = 1.5.8-1ubuntu1.1 

All of these are new enough, according to that page, to not be a problem.

At the bottom of that page there's an apparently unrelated section about
"Kernel 4.16 got a fix that could cause error". Make all does throw some
nonfatal errors before what I quoted before. The first does look related to
that:

In file included from 
/usr/src/libreswan-3.25/programs/pluto/linux-copy/linux/xfrm.h:5:0,
 from 
/usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c:56:
/usr/include/netinet/in.h:101:5: error: expected identifier before numeric 
constant
 IPPROTO_HOPOPTS = 0,   /* IPv6 Hop-by-Hop options.  */

Is it the patch for that bug, in the linked email, that's pertinent here?
The emails say that patch is already applied though. Was there a regression
in libreswan 3.25? 

Sorry if I'm being dense. But I'm not sure what that page is suggesting I
need to do. Following the Executive Summary with its Makefile.inc.local
creating, then "make deb," is not it, and fails in same way I reported
before:

...
dpkg-source: warning: unknown information field 'Rules-Requires-Root' in input 
data in general section of control info file
dpkg-source: error: cannot read 
libreswan-3.25/debian/patches/0003-update-README.nss-to-match-debian-defaults-for-IPSEC.patch:
 No such file or directory
dpkg-buildpackage: error: dpkg-source -i --before-build libreswan-3.25 gave 
error exit status 2
debuild: fatal error at line 1376:
dpkg-buildpackage -rfakeroot -D -us -uc -i -b failed
Makefile:608: recipe for target 'deb' failed
make: *** [deb] Error 29

Whit


On Sat, Aug 11, 2018 at 05:52:22PM -0400, Paul Wouters wrote:
> See https://libreswan.org/wiki/Libreswan_on_Debian_Wheezy
> 
> And use “make deb”
___
Swan mailing list
Swan@lists.libreswan.org
https://lists.libreswan.org/mailman/listinfo/swan


Re: [Swan] Compiling on Ubuntu 16.04

2018-08-11 Thread Paul Wouters
See https://libreswan.org/wiki/Libreswan_on_Debian_Wheezy

And use “make deb”

Sent from my phone

> On Aug 11, 2018, at 16:51, Whit Blauvelt  wrote:
> 
> Hi,
> 
> Trying to compile on Ubuntu 16.04, with "make all" I'm stuck at:
> 
> -
> 
> In file included from /usr/src/libreswan-3.25/linux/include/libreswan.h:78:0,
> from 
> /usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c:57:
> /usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c: In function 
> ‘netlink_raw_eroute’:
> /usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c:709:22: error: 
> ‘IPPROTO_ICMPV6’ undeclared (first use in this function)
>   transport_proto == IPPROTO_ICMPV6) {
>  ^
> /usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c:709:22: note: each 
> undeclared identifier is reported only once for each function it appears in
> /usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c: In function 
> ‘netlink_add_sa’:
> /usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c:1360:4: error: 
> ‘IPPROTO_ICMPV6’ undeclared (first use in this function)
>IPPROTO_ICMPV6 == sa->transport_proto) {
>^
> /usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c: In function 
> ‘netlink_bypass_policy’:
> /usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c:2766:15: error: 
> ‘IPPROTO_ICMPV6’ undeclared (first use in this function)
>  if (proto == IPPROTO_ICMPV6) {
>   ^
> /usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c: In function 
> ‘netlink_v6holes’:
> /usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c:2837:41: error: 
> ‘IPPROTO_ICMPV6’ undeclared (first use in this function)
>   ret = netlink_bypass_policy(AF_INET6, IPPROTO_ICMPV6,
> ^
> ../../mk/depend.mk:34: recipe for target 'kernel_netlink.o' failed
> make[3]: *** [kernel_netlink.o] Error 1
> ../../mk/targets.mk:90: recipe for target 'all' failed
> make[2]: *** [all] Error 2
> make[2]: Leaving directory '/usr/src/libreswan-3.25/programs/pluto'
> ../mk/targets.mk:90: recipe for target 'recursive-all' failed
> make[1]: *** [recursive-all] Error 2
> make[1]: Leaving directory '/usr/src/libreswan-3.25/programs'
> mk/targets.mk:90: recipe for target 'recursive-all' failed
> make: *** [recursive-all] Error 2
> 
> -
> 
> When I try "make deb" instead I get:
> 
> -
> 
> dpkg-source: warning: unknown information field 'Rules-Requires-Root' in 
> input data in general section of control info file
> dpkg-source: error: cannot read 
> libreswan-3.25/debian/patches/0003-update-README.nss-to-match-debian-defaults-for-IPSEC.patch:
>  No such file or directory
> dpkg-buildpackage: error: dpkg-source -i --before-build libreswan-3.25 gave 
> error exit status 2
> debuild: fatal error at line 1376:
> dpkg-buildpackage -rfakeroot -D -us -uc -i -b failed
> Makefile:608: recipe for target 'deb' failed
> make: *** [deb] Error 29
> 
> -
> 
> The "make all" errors look like they're IPv6 related. We don't use IPv6.
> Would leaving out IPv6 support allow compilation? If so, what's the
> invocation for that?
> 
> Thanks,
> Whit
> ___
> Swan mailing list
> Swan@lists.libreswan.org
> https://lists.libreswan.org/mailman/listinfo/swan
___
Swan mailing list
Swan@lists.libreswan.org
https://lists.libreswan.org/mailman/listinfo/swan


[Swan] Compiling on Ubuntu 16.04

2018-08-11 Thread Whit Blauvelt
Hi,

Trying to compile on Ubuntu 16.04, with "make all" I'm stuck at:

-

In file included from /usr/src/libreswan-3.25/linux/include/libreswan.h:78:0,
 from 
/usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c:57:
/usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c: In function 
‘netlink_raw_eroute’:
/usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c:709:22: error: 
‘IPPROTO_ICMPV6’ undeclared (first use in this function)
   transport_proto == IPPROTO_ICMPV6) {
  ^
/usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c:709:22: note: each 
undeclared identifier is reported only once for each function it appears in
/usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c: In function 
‘netlink_add_sa’:
/usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c:1360:4: error: 
‘IPPROTO_ICMPV6’ undeclared (first use in this function)
IPPROTO_ICMPV6 == sa->transport_proto) {
^
/usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c: In function 
‘netlink_bypass_policy’:
/usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c:2766:15: error: 
‘IPPROTO_ICMPV6’ undeclared (first use in this function)
  if (proto == IPPROTO_ICMPV6) {
   ^
/usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c: In function 
‘netlink_v6holes’:
/usr/src/libreswan-3.25/programs/pluto/kernel_netlink.c:2837:41: error: 
‘IPPROTO_ICMPV6’ undeclared (first use in this function)
   ret = netlink_bypass_policy(AF_INET6, IPPROTO_ICMPV6,
 ^
../../mk/depend.mk:34: recipe for target 'kernel_netlink.o' failed
make[3]: *** [kernel_netlink.o] Error 1
../../mk/targets.mk:90: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/usr/src/libreswan-3.25/programs/pluto'
../mk/targets.mk:90: recipe for target 'recursive-all' failed
make[1]: *** [recursive-all] Error 2
make[1]: Leaving directory '/usr/src/libreswan-3.25/programs'
mk/targets.mk:90: recipe for target 'recursive-all' failed
make: *** [recursive-all] Error 2

-

When I try "make deb" instead I get:

-

dpkg-source: warning: unknown information field 'Rules-Requires-Root' in input 
data in general section of control info file
dpkg-source: error: cannot read 
libreswan-3.25/debian/patches/0003-update-README.nss-to-match-debian-defaults-for-IPSEC.patch:
 No such file or directory
dpkg-buildpackage: error: dpkg-source -i --before-build libreswan-3.25 gave 
error exit status 2
debuild: fatal error at line 1376:
dpkg-buildpackage -rfakeroot -D -us -uc -i -b failed
Makefile:608: recipe for target 'deb' failed
make: *** [deb] Error 29

-

The "make all" errors look like they're IPv6 related. We don't use IPv6.
Would leaving out IPv6 support allow compilation? If so, what's the
invocation for that?

Thanks,
Whit
___
Swan mailing list
Swan@lists.libreswan.org
https://lists.libreswan.org/mailman/listinfo/swan