[GH-ISSUE #214] Build failed with GCC 14+ #121

Open
opened 2026-10-13 21:06:46 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @Hellseher on GitHub (Aug 14, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/214

Hi,

I try to refresh amneziawg-linux-kernel-module to 3.1.20260812 in Guix but it fails on build time with the following error:

make: Entering directory '/gnu/store/7v5k4wy625sl3d66hvg37xwm3s3ckry6-linux-libre-module-builder-7.1.8/lib/modules/build'
make[1]: Entering directory '/tmp/guix-build-amneziawg-linux-kernel-module-1.0.20260329.drv-0/source/src'
  CC [M]  main.o
  CC [M]  noise.o
  CC [M]  device.o
  CC [M]  peer.o
  CC [M]  timers.o
  CC [M]  queueing.o
  CC [M]  send.o
  CC [M]  receive.o
  CC [M]  socket.o
  CC [M]  peerlookup.o
  CC [M]  allowedips.o
  CC [M]  ratelimiter.o
  CC [M]  cookie.o
  CC [M]  netlink.o
  CC [M]  junk.o
  CC [M]  magic_header.o
socket.c: In function ‘send6’:
socket.c:139:23: error: ‘ipv6_stub’ undeclared (first use in this function); did you mean ‘ipv4_mtu’?
  139 |                 dst = ipv6_stub->ipv6_dst_lookup_flow(sock_net(sock), sock, &fl,
      |                       ^~~~~~~~~
      |                       ipv4_mtu
socket.c:139:23: note: each undeclared identifier is reported only once for each function it appears in
socket.c: In function ‘sock_free’:
socket.c:345:37: error: passing argument 1 of ‘udp_tunnel_sock_release’ from incompatible pointer type [-Wincompatible-pointer-types]
  345 |         udp_tunnel_sock_release(sock->sk_socket);
      |                                 ~~~~^~~~~~~~~~~
      |                                     |
      |                                     struct socket *
In file included from socket.c:17:
/gnu/store/7v5k4wy625sl3d66hvg37xwm3s3ckry6-linux-libre-module-builder-7.1.8/lib/modules/build/include/net/udp_tunnel.h:179:43: note: expected ‘struct sock *’ but argument is of type ‘struct socket *’
  179 | void udp_tunnel_sock_release(struct sock *sk);
      |                              ~~~~~~~~~~~~~^~
socket.c: In function ‘wg_socket_init’:
socket.c:399:36: error: passing argument 2 of ‘setup_udp_tunnel_sock’ from incompatible pointer type [-Wincompatible-pointer-types]
  399 |         setup_udp_tunnel_sock(net, new4, &cfg);
      |                                    ^~~~
      |                                    |
      |                                    struct socket *
/gnu/store/7v5k4wy625sl3d66hvg37xwm3s3ckry6-linux-libre-module-builder-7.1.8/lib/modules/build/include/net/udp_tunnel.h:97:58: note: expected ‘struct sock *’ but argument is of type ‘struct socket *’
   97 | void setup_udp_tunnel_sock(struct net *net, struct sock *sk,
      |                                             ~~~~~~~~~~~~~^~
socket.c:406:49: error: passing argument 1 of ‘udp_tunnel_sock_release’ from incompatible pointer type [-Wincompatible-pointer-types]
  406 |                         udp_tunnel_sock_release(new4);
      |                                                 ^~~~
      |                                                 |
      |                                                 struct socket *
/gnu/store/7v5k4wy625sl3d66hvg37xwm3s3ckry6-linux-libre-module-builder-7.1.8/lib/modules/build/include/net/udp_tunnel.h:179:43: note: expected ‘struct sock *’ but argument is of type ‘struct socket *’
  179 | void udp_tunnel_sock_release(struct sock *sk);
      |                              ~~~~~~~~~~~~~^~
socket.c:414:44: error: passing argument 2 of ‘setup_udp_tunnel_sock’ from incompatible pointer type [-Wincompatible-pointer-types]
  414 |                 setup_udp_tunnel_sock(net, new6, &cfg);
      |                                            ^~~~
      |                                            |
      |                                            struct socket *
/gnu/store/7v5k4wy625sl3d66hvg37xwm3s3ckry6-linux-libre-module-builder-7.1.8/lib/modules/build/include/net/udp_tunnel.h:97:58: note: expected ‘struct sock *’ but argument is of type ‘struct socket *’
   97 | void setup_udp_tunnel_sock(struct net *net, struct sock *sk,
      |                                             ~~~~~~~~~~~~~^~
make[3]: *** [/gnu/store/7v5k4wy625sl3d66hvg37xwm3s3ckry6-linux-libre-module-builder-7.1.8/lib/modules/build/scripts/Makefile.build:289: socket.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/gnu/store/7v5k4wy625sl3d66hvg37xwm3s3ckry6-linux-libre-module-builder-7.1.8/lib/modules/build/Makefile:2165: .] Error 2
make[1]: *** [/gnu/store/7v5k4wy625sl3d66hvg37xwm3s3ckry6-linux-libre-module-builder-7.1.8/lib/modules/build/Makefile:248: __sub-make] Error 2
make[1]: Leaving directory '/tmp/guix-build-amneziawg-linux-kernel-module-1.0.20260329.drv-0/source/src'
make: *** [Makefile:248: __sub-make] Error 2
make: Leaving directory '/gnu/store/7v5k4wy625sl3d66hvg37xwm3s3ckry6-linux-libre-module-builder-7.1.8/lib/modules/build'
error: in phase 'build': uncaught exception:

Common "fix" for GCC strictness would be to provide CFLAGS:

"CFLAGS=-g -O2"
" -Wno-error=implicit-function-declaration"
" -Wno-error=implicit-int"
" -Wno-error=incompatible-pointer-types"

But current Make file does not support it for some reason.

Originally created by @Hellseher on GitHub (Aug 14, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/214 Hi, I try to refresh amneziawg-linux-kernel-module to 3.1.20260812 in Guix but it fails on build time with the following error: ``` make: Entering directory '/gnu/store/7v5k4wy625sl3d66hvg37xwm3s3ckry6-linux-libre-module-builder-7.1.8/lib/modules/build' make[1]: Entering directory '/tmp/guix-build-amneziawg-linux-kernel-module-1.0.20260329.drv-0/source/src' CC [M] main.o CC [M] noise.o CC [M] device.o CC [M] peer.o CC [M] timers.o CC [M] queueing.o CC [M] send.o CC [M] receive.o CC [M] socket.o CC [M] peerlookup.o CC [M] allowedips.o CC [M] ratelimiter.o CC [M] cookie.o CC [M] netlink.o CC [M] junk.o CC [M] magic_header.o socket.c: In function ‘send6’: socket.c:139:23: error: ‘ipv6_stub’ undeclared (first use in this function); did you mean ‘ipv4_mtu’? 139 | dst = ipv6_stub->ipv6_dst_lookup_flow(sock_net(sock), sock, &fl, | ^~~~~~~~~ | ipv4_mtu socket.c:139:23: note: each undeclared identifier is reported only once for each function it appears in socket.c: In function ‘sock_free’: socket.c:345:37: error: passing argument 1 of ‘udp_tunnel_sock_release’ from incompatible pointer type [-Wincompatible-pointer-types] 345 | udp_tunnel_sock_release(sock->sk_socket); | ~~~~^~~~~~~~~~~ | | | struct socket * In file included from socket.c:17: /gnu/store/7v5k4wy625sl3d66hvg37xwm3s3ckry6-linux-libre-module-builder-7.1.8/lib/modules/build/include/net/udp_tunnel.h:179:43: note: expected ‘struct sock *’ but argument is of type ‘struct socket *’ 179 | void udp_tunnel_sock_release(struct sock *sk); | ~~~~~~~~~~~~~^~ socket.c: In function ‘wg_socket_init’: socket.c:399:36: error: passing argument 2 of ‘setup_udp_tunnel_sock’ from incompatible pointer type [-Wincompatible-pointer-types] 399 | setup_udp_tunnel_sock(net, new4, &cfg); | ^~~~ | | | struct socket * /gnu/store/7v5k4wy625sl3d66hvg37xwm3s3ckry6-linux-libre-module-builder-7.1.8/lib/modules/build/include/net/udp_tunnel.h:97:58: note: expected ‘struct sock *’ but argument is of type ‘struct socket *’ 97 | void setup_udp_tunnel_sock(struct net *net, struct sock *sk, | ~~~~~~~~~~~~~^~ socket.c:406:49: error: passing argument 1 of ‘udp_tunnel_sock_release’ from incompatible pointer type [-Wincompatible-pointer-types] 406 | udp_tunnel_sock_release(new4); | ^~~~ | | | struct socket * /gnu/store/7v5k4wy625sl3d66hvg37xwm3s3ckry6-linux-libre-module-builder-7.1.8/lib/modules/build/include/net/udp_tunnel.h:179:43: note: expected ‘struct sock *’ but argument is of type ‘struct socket *’ 179 | void udp_tunnel_sock_release(struct sock *sk); | ~~~~~~~~~~~~~^~ socket.c:414:44: error: passing argument 2 of ‘setup_udp_tunnel_sock’ from incompatible pointer type [-Wincompatible-pointer-types] 414 | setup_udp_tunnel_sock(net, new6, &cfg); | ^~~~ | | | struct socket * /gnu/store/7v5k4wy625sl3d66hvg37xwm3s3ckry6-linux-libre-module-builder-7.1.8/lib/modules/build/include/net/udp_tunnel.h:97:58: note: expected ‘struct sock *’ but argument is of type ‘struct socket *’ 97 | void setup_udp_tunnel_sock(struct net *net, struct sock *sk, | ~~~~~~~~~~~~~^~ make[3]: *** [/gnu/store/7v5k4wy625sl3d66hvg37xwm3s3ckry6-linux-libre-module-builder-7.1.8/lib/modules/build/scripts/Makefile.build:289: socket.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [/gnu/store/7v5k4wy625sl3d66hvg37xwm3s3ckry6-linux-libre-module-builder-7.1.8/lib/modules/build/Makefile:2165: .] Error 2 make[1]: *** [/gnu/store/7v5k4wy625sl3d66hvg37xwm3s3ckry6-linux-libre-module-builder-7.1.8/lib/modules/build/Makefile:248: __sub-make] Error 2 make[1]: Leaving directory '/tmp/guix-build-amneziawg-linux-kernel-module-1.0.20260329.drv-0/source/src' make: *** [Makefile:248: __sub-make] Error 2 make: Leaving directory '/gnu/store/7v5k4wy625sl3d66hvg37xwm3s3ckry6-linux-libre-module-builder-7.1.8/lib/modules/build' error: in phase 'build': uncaught exception: ``` Common "fix" for GCC strictness would be to provide CFLAGS: ``` "CFLAGS=-g -O2" " -Wno-error=implicit-function-declaration" " -Wno-error=implicit-int" " -Wno-error=incompatible-pointer-types" ``` But current Make file does not support it for some reason.
Author
Owner

@RadxaYuntian commented on GitHub (Aug 17, 2026):

#194 might be related.

<!-- gh-comment-id:5312646621 --> @RadxaYuntian commented on GitHub (Aug 17, 2026): #194 might be related.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-linux-kernel-module#121
No description provided.