Не собирается под Debian10

Compilation and installation questions and stories
Post Reply
Breaker
Posts: 2
Joined: 23 Apr 2020, 20:18

Не собирается под Debian10

Post by Breaker » 23 Apr 2020, 20:21

Всем привет
собираю следующим образом:
cmake -DCPACK_TYPE=Debian10 -DBUILD_PPTP_DRIVER=TRUE -DBUILD_VLAN_MON_DRIVER=TRUE -DNETSNMP=TRUE -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr -DKDIR=/usr/src/linux-headers-$(uname -r) ../accel-ppp

получаю:

Code: Select all

Scanning dependencies of target pptp_drv
[ 99%] Generating driver/pptp.ko
/opt/accel/build/drivers/pptp/driver/pptp.c: In function ‘pptp_xmit’:
/opt/accel/build/drivers/pptp/driver/pptp.c:388:24: error: ‘struct flowi’ has no member named ‘oif’
   struct flowi fl = { .oif = 0,
                        ^~~
/opt/accel/build/drivers/pptp/driver/pptp.c:389:10: error: ‘struct flowi’ has no member named ‘nl_u’
         .nl_u = { .ip4_u =
          ^~~~
/opt/accel/build/drivers/pptp/driver/pptp.c:389:17: error: extra brace group at end of initializer
         .nl_u = { .ip4_u =
                 ^
/opt/accel/build/drivers/pptp/driver/pptp.c:389:17: note: (near initialization for ‘fl’)
/opt/accel/build/drivers/pptp/driver/pptp.c:390:12: error: extra brace group at end of initializer
            { .daddr = opt->dst_addr.sin_addr.s_addr,
            ^
/opt/accel/build/drivers/pptp/driver/pptp.c:390:12: note: (near initialization for ‘fl’)
/opt/accel/build/drivers/pptp/driver/pptp.c:389:17: warning: excess elements in struct initializer
         .nl_u = { .ip4_u =
                 ^
/opt/accel/build/drivers/pptp/driver/pptp.c:389:17: note: (near initialization for ‘fl’)
/opt/accel/build/drivers/pptp/driver/pptp.c:393:10: error: ‘struct flowi’ has no member named ‘proto’
         .proto = IPPROTO_GRE };
          ^~~~~
In file included from /usr/src/linux-headers-4.19.0-8-common/include/linux/in.h:23,
                 from /usr/src/linux-headers-4.19.0-8-common/include/uapi/linux/netfilter.h:7,
                 from /usr/src/linux-headers-4.19.0-8-common/include/linux/netfilter_defs.h:5,
                 from /usr/src/linux-headers-4.19.0-8-common/include/net/netns/netfilter.h:5,
                 from /usr/src/linux-headers-4.19.0-8-common/include/net/net_namespace.h:25,
                 from /usr/src/linux-headers-4.19.0-8-common/include/linux/netdevice.h:42,
                 from /opt/accel/build/drivers/pptp/driver/pptp.c:18:
/usr/src/linux-headers-4.19.0-8-common/include/uapi/linux/in.h:56:22: warning: excess elements in struct initializer
 #define IPPROTO_GRE  IPPROTO_GRE
                      ^~~~~~~~~~~
/opt/accel/build/drivers/pptp/driver/pptp.c:393:18: note: in expansion of macro ‘IPPROTO_GRE’
         .proto = IPPROTO_GRE };
                  ^~~~~~~~~~~
/usr/src/linux-headers-4.19.0-8-common/include/uapi/linux/in.h:56:22: note: (near initialization for ‘fl’)
 #define IPPROTO_GRE  IPPROTO_GRE
                      ^~~~~~~~~~~
/opt/accel/build/drivers/pptp/driver/pptp.c:393:18: note: in expansion of macro ‘IPPROTO_GRE’
         .proto = IPPROTO_GRE };
                  ^~~~~~~~~~~
/opt/accel/build/drivers/pptp/driver/pptp.c:388:21: warning: missing braces around initializer [-Wmissing-braces]
   struct flowi fl = { .oif = 0,
                     ^
                              -
                              {{0}}
/opt/accel/build/drivers/pptp/driver/pptp.c:397:42: error: passing argument 2 of ‘ip_route_output_key’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   if ((err=ip_route_output_key(&init_net,&rt, &fl))) {
                                          ^~~
In file included from /usr/src/linux-headers-4.19.0-8-common/include/net/ip.h:32,
                 from /opt/accel/build/drivers/pptp/driver/pptp.c:40:
/usr/src/linux-headers-4.19.0-8-common/include/net/route.h:132:82: note: expected ‘struct flowi4 *’ but argument is of type ‘struct rtable **’
 static inline struct rtable *ip_route_output_key(struct net *net, struct flowi4 *flp)
                                                                   ~~~~~~~~~~~~~~~^~~
/opt/accel/build/drivers/pptp/driver/pptp.c:397:12: error: too many arguments to function ‘ip_route_output_key’
   if ((err=ip_route_output_key(&init_net,&rt, &fl))) {
            ^~~~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-headers-4.19.0-8-common/include/net/ip.h:32,
                 from /opt/accel/build/drivers/pptp/driver/pptp.c:40:
/usr/src/linux-headers-4.19.0-8-common/include/net/route.h:132:30: note: declared here
 static inline struct rtable *ip_route_output_key(struct net *net, struct flowi4 *flp)
                              ^~~~~~~~~~~~~~~~~~~
/opt/accel/build/drivers/pptp/driver/pptp.c:397:11: warning: assignment to ‘int’ from ‘struct rtable *’ makes integer from pointer without a cast [-Wint-conversion]
   if ((err=ip_route_output_key(&init_net,&rt, &fl))) {
           ^
/opt/accel/build/drivers/pptp/driver/pptp.c:524:20: error: ‘struct rtable’ has no member named ‘rt_dst’; did you mean ‘dst’?
  iph->daddr  = rt->rt_dst;
                    ^~~~~~
                    dst
/opt/accel/build/drivers/pptp/driver/pptp.c:525:20: error: ‘struct rtable’ has no member named ‘rt_src’; did you mean ‘rt_iif’?
  iph->saddr  = rt->rt_src;
                    ^~~~~~
                    rt_iif
/opt/accel/build/drivers/pptp/driver/pptp.c:555:18: error: passing argument 1 of ‘ip_select_ident’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  ip_select_ident(iph, &rt->dst, NULL);
                  ^~~
In file included from /opt/accel/build/drivers/pptp/driver/pptp.c:40:
/usr/src/linux-headers-4.19.0-8-common/include/net/ip.h:451:48: note: expected ‘struct net *’ but argument is of type ‘struct iphdr *’
 static inline void ip_select_ident(struct net *net, struct sk_buff *skb,
                                    ~~~~~~~~~~~~^~~
/opt/accel/build/drivers/pptp/driver/pptp.c:555:23: error: passing argument 2 of ‘ip_select_ident’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  ip_select_ident(iph, &rt->dst, NULL);
                       ^~~~~~~~
In file included from /opt/accel/build/drivers/pptp/driver/pptp.c:40:
/usr/src/linux-headers-4.19.0-8-common/include/net/ip.h:451:69: note: expected ‘struct sk_buff *’ but argument is of type ‘struct dst_entry *’
 static inline void ip_select_ident(struct net *net, struct sk_buff *skb,
                                                     ~~~~~~~~~~~~~~~~^~~
/opt/accel/build/drivers/pptp/driver/pptp.c:564:22: error: passing argument 1 of ‘ip_local_out’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   err = ip_local_out(skb);
                      ^~~
In file included from /opt/accel/build/drivers/pptp/driver/pptp.c:40:
/usr/src/linux-headers-4.19.0-8-common/include/net/ip.h:165:30: note: expected ‘struct net *’ but argument is of type ‘struct sk_buff *’
 int ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb);
                  ~~~~~~~~~~~~^~~
/opt/accel/build/drivers/pptp/driver/pptp.c:564:9: error: too few arguments to function ‘ip_local_out’
   err = ip_local_out(skb);
         ^~~~~~~~~~~~
In file included from /opt/accel/build/drivers/pptp/driver/pptp.c:40:
/usr/src/linux-headers-4.19.0-8-common/include/net/ip.h:165:5: note: declared here
 int ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb);
     ^~~~~~~~~~~~
/opt/accel/build/drivers/pptp/driver/pptp.c: In function ‘pptp_rcv_core’:
/opt/accel/build/drivers/pptp/driver/pptp.c:663:20: warning: dereferencing ‘void *’ pointer
    skb_push(skb, 1)[0] = 0;
                    ^
/opt/accel/build/drivers/pptp/driver/pptp.c:663:24: error: invalid use of void expression
    skb_push(skb, 1)[0] = 0;
                        ^
/opt/accel/build/drivers/pptp/driver/pptp.c: In function ‘pptp_connect’:
/opt/accel/build/drivers/pptp/driver/pptp.c:862:10: error: ‘struct flowi’ has no member named ‘nl_u’
         .nl_u = { .ip4_u =
          ^~~~
/opt/accel/build/drivers/pptp/driver/pptp.c:862:20: error: ‘union <anonymous>’ has no member named ‘ip4_u’; did you mean ‘ip4’?
         .nl_u = { .ip4_u =
                    ^~~~~
                    ip4
/opt/accel/build/drivers/pptp/driver/pptp.c:863:15: error: ‘struct flowi_common’ has no member named ‘daddr’
            { .daddr = opt->dst_addr.sin_addr.s_addr,
               ^~~~~
/opt/accel/build/drivers/pptp/driver/pptp.c:864:8: error: ‘struct flowi_common’ has no member named ‘saddr’
       .saddr = opt->src_addr.sin_addr.s_addr,
        ^~~~~
/opt/accel/build/drivers/pptp/driver/pptp.c:865:8: error: ‘struct flowi_common’ has no member named ‘tos’
       .tos = RT_CONN_FLAGS(sk) } },
        ^~~
/opt/accel/build/drivers/pptp/driver/pptp.c:866:10: error: ‘struct flowi’ has no member named ‘proto’
         .proto = IPPROTO_GRE };
          ^~~~~
In file included from /usr/src/linux-headers-4.19.0-8-common/include/linux/in.h:23,
                 from /usr/src/linux-headers-4.19.0-8-common/include/uapi/linux/netfilter.h:7,
                 from /usr/src/linux-headers-4.19.0-8-common/include/linux/netfilter_defs.h:5,
                 from /usr/src/linux-headers-4.19.0-8-common/include/net/netns/netfilter.h:5,
                 from /usr/src/linux-headers-4.19.0-8-common/include/net/net_namespace.h:25,
                 from /usr/src/linux-headers-4.19.0-8-common/include/linux/netdevice.h:42,
                 from /opt/accel/build/drivers/pptp/driver/pptp.c:18:
/usr/src/linux-headers-4.19.0-8-common/include/uapi/linux/in.h:56:22: warning: excess elements in struct initializer
 #define IPPROTO_GRE  IPPROTO_GRE
                      ^~~~~~~~~~~
/opt/accel/build/drivers/pptp/driver/pptp.c:866:18: note: in expansion of macro ‘IPPROTO_GRE’
         .proto = IPPROTO_GRE };
                  ^~~~~~~~~~~
/usr/src/linux-headers-4.19.0-8-common/include/uapi/linux/in.h:56:22: note: (near initialization for ‘fl’)
 #define IPPROTO_GRE  IPPROTO_GRE
                      ^~~~~~~~~~~
/opt/accel/build/drivers/pptp/driver/pptp.c:866:18: note: in expansion of macro ‘IPPROTO_GRE’
         .proto = IPPROTO_GRE };
                  ^~~~~~~~~~~
/opt/accel/build/drivers/pptp/driver/pptp.c:873:38: error: passing argument 2 of ‘ip_route_output_key’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   if (ip_route_output_key(&init_net, &rt, &fl)){
                                      ^~~
In file included from /usr/src/linux-headers-4.19.0-8-common/include/net/ip.h:32,
                 from /opt/accel/build/drivers/pptp/driver/pptp.c:40:
/usr/src/linux-headers-4.19.0-8-common/include/net/route.h:132:82: note: expected ‘struct flowi4 *’ but argument is of type ‘struct rtable **’
 static inline struct rtable *ip_route_output_key(struct net *net, struct flowi4 *flp)
                                                                   ~~~~~~~~~~~~~~~^~~
/opt/accel/build/drivers/pptp/driver/pptp.c:873:7: error: too many arguments to function ‘ip_route_output_key’
   if (ip_route_output_key(&init_net, &rt, &fl)){
       ^~~~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-headers-4.19.0-8-common/include/net/ip.h:32,
                 from /opt/accel/build/drivers/pptp/driver/pptp.c:40:
/usr/src/linux-headers-4.19.0-8-common/include/net/route.h:132:30: note: declared here
 static inline struct rtable *ip_route_output_key(struct net *net, struct flowi4 *flp)
                              ^~~~~~~~~~~~~~~~~~~
/opt/accel/build/drivers/pptp/driver/pptp.c:893:34: error: ‘PPP_MTU’ undeclared (first use in this function); did you mean ‘PPP_MRU’?
  if (!po->chan.mtu) po->chan.mtu=PPP_MTU;
                                  ^~~~~~~
                                  PPP_MRU
/opt/accel/build/drivers/pptp/driver/pptp.c:893:34: note: each undeclared identifier is reported only once for each function it appears in
/opt/accel/build/drivers/pptp/driver/pptp.c: At top level:
/opt/accel/build/drivers/pptp/driver/pptp.c:992:17: error: initialization of ‘int (*)(struct socket *, struct sockaddr *, int)’ from incompatible pointer type ‘int (*)(struct socket *, struct sockaddr *, int *, int)’ [-Werror=incompatible-pointer-types]
     .getname  = pptp_getname,
                 ^~~~~~~~~~~~
/opt/accel/build/drivers/pptp/driver/pptp.c:992:17: note: (near initialization for ‘pptp_ops.getname’)
/opt/accel/build/drivers/pptp/driver/pptp.c:993:14: error: ‘sock_no_poll’ undeclared here (not in a function); did you mean ‘sock_no_ioctl’?
     .poll  = sock_no_poll,
              ^~~~~~~~~~~~
              sock_no_ioctl
/opt/accel/build/drivers/pptp/driver/pptp.c: In function ‘pptp_create’:
/opt/accel/build/drivers/pptp/driver/pptp.c:1083:7: error: too few arguments to function ‘sk_alloc’
  sk = sk_alloc(net,PF_PPPOX, GFP_KERNEL, &pptp_sk_proto);
       ^~~~~~~~
In file included from /opt/accel/build/drivers/pptp/driver/if_pppox.h:150,
                 from /opt/accel/build/drivers/pptp/driver/pptp.c:24:
/usr/src/linux-headers-4.19.0-8-common/include/net/sock.h:1576:14: note: declared here
 struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
              ^~~~~~~~
cc1: some warnings being treated as errors
make[6]: *** [/usr/src/linux-headers-4.19.0-8-common/scripts/Makefile.build:315: /opt/accel/build/drivers/pptp/driver/pptp.o] Error 1
make[5]: *** [/usr/src/linux-headers-4.19.0-8-common/Makefile:1537: _module_/opt/accel/build/drivers/pptp/driver] Error 2
make[4]: *** [Makefile:146: sub-make] Error 2
make[3]: *** [Makefile:8: all] Error 2
make[2]: *** [drivers/pptp/CMakeFiles/pptp_drv.dir/build.make:64: drivers/pptp/driver/pptp.ko] Error 2
make[1]: *** [CMakeFiles/Makefile2:1515: drivers/pptp/CMakeFiles/pptp_drv.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

чего не хватает?

dimka88
Posts: 722
Joined: 13 Oct 2014, 05:51
Contact:

Re: Не собирается под Debian10

Post by dimka88 » 24 Apr 2020, 07:22

Вам не нужно собирать PPTP драйвер.

Все ли зависимости устанавливали? https://accel-ppp.readthedocs.io/en/lat ... ebian.html

Breaker
Posts: 2
Joined: 23 Apr 2020, 20:18

Re: Не собирается под Debian10

Post by Breaker » 24 Apr 2020, 08:28

Да, всё делал по инструкции

Не понял почему не надо собирать pptp...

dimka88
Posts: 722
Joined: 13 Oct 2014, 05:51
Contact:

Re: Не собирается под Debian10

Post by dimka88 » 24 Apr 2020, 13:48

PPTP уже давно в ядре, начиная с 2.6.36 если не ошибаюсь

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests