我在使用 strongswan、ubuntu 17.10 时遇到了什么问题

我在使用 strongswan、ubuntu 17.10 时遇到了什么问题

这就是我得到的

    root@Dejected-Unicorn:~/strongswan-5.5.2# make
make  all-recursive
make[1]: Entering directory '/root/strongswan-5.5.2'
Making all in src
make[2]: Entering directory '/root/strongswan-5.5.2/src'
Making all in .
make[3]: Entering directory '/root/strongswan-5.5.2/src'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/root/strongswan-5.5.2/src'
Making all in include
make[3]: Entering directory '/root/strongswan-5.5.2/src/include'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/strongswan-5.5.2/src/include'
Making all in libstrongswan
make[3]: Entering directory '/root/strongswan-5.5.2/src/libstrongswan'
make  all-recursive
make[4]: Entering directory '/root/strongswan-5.5.2/src/libstrongswan'
Making all in .
make[5]: Entering directory '/root/strongswan-5.5.2/src/libstrongswan'
depbase=`echo library.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..  -I../../src/libstrongswan -DIPSEC_DIR=\"/usr/lib/ipsec\" -DIPSEC_LIB_DIR=\"/usr/lib/ipsec\" -DPLUGINDIR=\"/usr/lib/ipsec/plugins\" -DSTRONGSWAN_CONF=\"/etc/strongswan.conf\"       -g -O2 -Wall -Wno-format -Wno-format-security -Wno-pointer-sign -include /root/strongswan-5.5.2/config.h -MT library.lo -MD -MP -MF $depbase.Tpo -c -o library.lo library.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/libstrongswan -DIPSEC_DIR=\"/usr/lib/ipsec\" -DIPSEC_LIB_DIR=\"/usr/lib/ipsec\" -DPLUGINDIR=\"/usr/lib/ipsec/plugins\" -DSTRONGSWAN_CONF=\"/etc/strongswan.conf\" -g -O2 -Wall -Wno-format -Wno-format-security -Wno-pointer-sign -include /root/strongswan-5.5.2/config.h -MT library.lo -MD -MP -MF .deps/library.Tpo -c library.c  -fPIC -DPIC -o .libs/library.o
In file included from utils/utils.h:54:0,
                 from library.h:101,
                 from library.c:17:
utils/utils/memory.h: In function ‘memwipe_inline’:
utils/utils/memory.h:99:15: error: ‘uintptr_t’ undeclared (first use in this function); did you mean ‘__intptr_t’?
  for (i = 0; (uintptr_t)&c[i] % sizeof(long) && i < n; i++)
               ^~~~~~~~~
               __intptr_t
utils/utils/memory.h:99:15: note: each undeclared identifier is reported only once for each function it appears in
Makefile:1922: recipe for target 'library.lo' failed
make[5]: *** [library.lo] Error 1
make[5]: Leaving directory '/root/strongswan-5.5.2/src/libstrongswan'
Makefile:2008: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/root/strongswan-5.5.2/src/libstrongswan'
Makefile:1153: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/root/strongswan-5.5.2/src/libstrongswan'
Makefile:518: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/root/strongswan-5.5.2/src'
Makefile:579: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/strongswan-5.5.2'
Makefile:488: recipe for target 'all' failed
make: *** [all] Error 2

感谢您花时间查看

答案1

首先是 strongswan包装在主要的存储库

您可以使用以下命令安装 5.5.1 版本:

sudo apt-get install strongswan

如果您不使用特殊选项,./configure您可以使用这个二进制包。

但如果你确实需要编译它,你可以按如下方式进行:

wget https://download.strongswan.org/strongswan-5.5.2.tar.gz
tar -xvzf strongswan-5.5.2.tar.gz
cd strongswan-5.5.2/
sudo apt-get install build-essential
sudo apt-get build-dep strongswan
./configure
make 

但我在 5.5.2 甚至 5.5.1 中也遇到了同样的错误。似乎strongswan 中的 bug 2425

相关内容