All of lore.kernel.org
 help / color / mirror / Atom feed
* RHEL-8.1 compile problem
@ 2019-11-27 17:21 Sergey Ivanov
  2019-12-05 12:55 ` RHEL-8.1 backported a couple features breaking wireguard compilation Sergey Ivanov
  0 siblings, 1 reply; 5+ messages in thread
From: Sergey Ivanov @ 2019-11-27 17:21 UTC (permalink / raw)
  To: wireguard


[-- Attachment #1.1: Type: text/plain, Size: 2429 bytes --]

Hi,
I have used wireguard version 0.0.20191012 on RHEL-8.0, but after
upgrade to RHEL-8.1 with kernel 4.18.0-147.el8.x86_64 dkms failed
to install to the new kernel. I am trying now to reinstall
manually compiling from tag 4.18.0-147.el8.x86_64:
===
sh-4.4$ git clone https://git.zx2c4.com/WireGuard
Cloning into 'WireGuard'...
...
Resolving deltas: 100% (8471/8471), done.
sh-4.4$ cd WireGuard/
sh-4.4$ git checkout 0.0.20191127
Note: checking out '0.0.20191127'.
...

HEAD is now at 7fc30dd version: bump snapshot
sh-4.4$ git checkout -b b_0.0.20191127
Switched to a new branch 'b_0.0.20191127'
sh-4.4$ cd src/
sh-4.4$ make
   CC [M]  /var/home/seriv/work/git/WireGuard/src/main.o
In file included from <command-line>:
/var/home/seriv/work/git/WireGuard/src/compat/compat.h:342:20:
error: static declaration of ‘rng_is_initialized’ follows
non-static declaration
  static inline bool rng_is_initialized(void)
                     ^~~~~~~~~~~~~~~~~~
In file included from
/var/home/seriv/work/git/WireGuard/src/compat/compat.h:330,
                  from <command-line>:
./include/linux/random.h:40:13: note: previous declaration of
‘rng_is_initialized’ was here
  extern bool rng_is_initialized(void);
              ^~~~~~~~~~~~~~~~~~
In file included from <command-line>:
/var/home/seriv/work/git/WireGuard/src/compat/compat.h:835:23:
error: redeclaration of enumerator ‘NLA_UNSPEC’
  #define NLA_EXACT_LEN NLA_UNSPEC
                        ^~~~~~~~~~
./include/net/netlink.h:184:2: note: in expansion of macro
‘NLA_EXACT_LEN’
   NLA_EXACT_LEN,
   ^~~~~~~~~~~~~
In file included from ./include/net/rtnetlink.h:6,
                  from ./include/net/sch_generic.h:17,
                  from ./include/linux/filter.h:24,
                  from ./include/net/sock.h:64,
                  from ./include/linux/tcp.h:23,
                  from ./include/linux/ipv6.h:106,
                  from ./include/net/ipv6.h:16,
                  from 
/var/home/seriv/work/git/WireGuard/src/compat/compat.h:874,
                  from <command-line>:
./include/net/netlink.h:166:2: note: previous definition of
‘NLA_UNSPEC’ was here
   NLA_UNSPEC,
   ^~~~~~~~~~
make[2]: *** [scripts/Makefile.build:313:
/var/home/seriv/work/git/WireGuard/src/main.o] Error 1 make[1]:
*** [Makefile:1547:
_module_/var/home/seriv/work/git/WireGuard/src] Error 2 make: ***
[Makefile:38: module] Error 2
-- 
   Regards,
   Sergey Ivanov

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RHEL-8.1 backported a couple features breaking wireguard compilation.
  2019-11-27 17:21 RHEL-8.1 compile problem Sergey Ivanov
@ 2019-12-05 12:55 ` Sergey Ivanov
  2019-12-08 10:44   ` Jason A. Donenfeld
  0 siblings, 1 reply; 5+ messages in thread
From: Sergey Ivanov @ 2019-12-05 12:55 UTC (permalink / raw)
  To: wireguard

Hi,

on kernel 4.18.0-147.el8.x86_64 I am not able to compile 
https://git.zx2c4.com/WireGuard sources, tried tags 0.0.20191127 and  
0.0.20191205 and master at 5eb87fb649.

To compile it I did the following workaround:

===


$ git diff
diff --git a/src/compat/compat.h b/src/compat/compat.h
index ab22fa4..6e034b5 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -326,7 +326,7 @@ static inline int wait_for_random_bytes(void)
  }
  #endif

-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) && LINUX_VERSION_CODE 
 >= KERNEL_VERSION(4, 2, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) && defined(ISRHEL8) 
&& RHEL_MINOR < 1 && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
  #include <linux/random.h>
  #include <linux/slab.h>
  struct rng_is_initialized_callback {
@@ -831,7 +831,7 @@ static inline void skb_mark_not_on_list(struct 
sk_buff *skb)
  }
  #endif

-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0) && (!defined(ISRHEL8) 
|| RHEL_MINOR < 1)
  #define NLA_EXACT_LEN NLA_UNSPEC
  #endif
  #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)
===

-- 

   Regards,

   Sergey Ivanov

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: RHEL-8.1 backported a couple features breaking wireguard compilation.
  2019-12-05 12:55 ` RHEL-8.1 backported a couple features breaking wireguard compilation Sergey Ivanov
@ 2019-12-08 10:44   ` Jason A. Donenfeld
  2019-12-09 19:53     ` [PATCH 1/1] Support building for RHEL-8.1 instead of RHEL-8.0 Sergey Ivanov
  0 siblings, 1 reply; 5+ messages in thread
From: Jason A. Donenfeld @ 2019-12-08 10:44 UTC (permalink / raw)
  To: Sergey Ivanov; +Cc: WireGuard mailing list


[-- Attachment #1.1: Type: text/plain, Size: 1711 bytes --]

Thanks. The rhel backporting policy has generally been to not support older
point releases once new ones exist. So we'll move to supporting rhel 8.1
and drop 8.0. If you submit a properly formatted git patch with a sign off
line, I can apply it.

On Sun, Dec 8, 2019, 11:41 Sergey Ivanov <seriv@cs.umd.edu> wrote:

> Hi,
>
> on kernel 4.18.0-147.el8.x86_64 I am not able to compile
> https://git.zx2c4.com/WireGuard sources, tried tags 0.0.20191127 and
> 0.0.20191205 and master at 5eb87fb649.
>
> To compile it I did the following workaround:
>
> ===
>
>
> $ git diff
> diff --git a/src/compat/compat.h b/src/compat/compat.h
> index ab22fa4..6e034b5 100644
> --- a/src/compat/compat.h
> +++ b/src/compat/compat.h
> @@ -326,7 +326,7 @@ static inline int wait_for_random_bytes(void)
>   }
>   #endif
>
> -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) && LINUX_VERSION_CODE
>  >= KERNEL_VERSION(4, 2, 0)
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) && defined(ISRHEL8)
> && RHEL_MINOR < 1 && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
>   #include <linux/random.h>
>   #include <linux/slab.h>
>   struct rng_is_initialized_callback {
> @@ -831,7 +831,7 @@ static inline void skb_mark_not_on_list(struct
> sk_buff *skb)
>   }
>   #endif
>
> -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0)
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0) && (!defined(ISRHEL8)
> || RHEL_MINOR < 1)
>   #define NLA_EXACT_LEN NLA_UNSPEC
>   #endif
>   #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)
> ===
>
> --
>
>    Regards,
>
>    Sergey Ivanov
>
> _______________________________________________
> WireGuard mailing list
> WireGuard@lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/wireguard
>

[-- Attachment #1.2: Type: text/html, Size: 2539 bytes --]

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/1] Support building for RHEL-8.1 instead of RHEL-8.0
  2019-12-08 10:44   ` Jason A. Donenfeld
@ 2019-12-09 19:53     ` Sergey Ivanov
  2019-12-09 21:54       ` Jason A. Donenfeld
  0 siblings, 1 reply; 5+ messages in thread
From: Sergey Ivanov @ 2019-12-09 19:53 UTC (permalink / raw)
  To: wireguard

RedHat backported to their kernel 4.18.0-147.el8 a couple features.
This patch enables compiling for this kernel.

Signed-off-by: Sergey Ivanov <seriv@cs.umd.edu>
---
 src/compat/compat.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compat/compat.h b/src/compat/compat.h
index b4a8f8b..6808259 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -326,7 +326,7 @@ static inline int wait_for_random_bytes(void)
 }
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) && !defined(ISRHEL8) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
 #include <linux/random.h>
 #include <linux/slab.h>
 struct rng_is_initialized_callback {
@@ -831,7 +831,7 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb)
 }
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0) && !defined(ISRHEL8)
 #define NLA_EXACT_LEN NLA_UNSPEC
 #endif
 #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)
-- 
2.18.1

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] Support building for RHEL-8.1 instead of RHEL-8.0
  2019-12-09 19:53     ` [PATCH 1/1] Support building for RHEL-8.1 instead of RHEL-8.0 Sergey Ivanov
@ 2019-12-09 21:54       ` Jason A. Donenfeld
  0 siblings, 0 replies; 5+ messages in thread
From: Jason A. Donenfeld @ 2019-12-09 21:54 UTC (permalink / raw)
  To: Sergey Ivanov; +Cc: WireGuard mailing list

Thanks! Merged:
https://git.zx2c4.com/WireGuard/commit/?id=77da189d3399ca4e6c8f016726b6fc3b5dfe91cd
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-12-09 21:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-27 17:21 RHEL-8.1 compile problem Sergey Ivanov
2019-12-05 12:55 ` RHEL-8.1 backported a couple features breaking wireguard compilation Sergey Ivanov
2019-12-08 10:44   ` Jason A. Donenfeld
2019-12-09 19:53     ` [PATCH 1/1] Support building for RHEL-8.1 instead of RHEL-8.0 Sergey Ivanov
2019-12-09 21:54       ` Jason A. Donenfeld

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.