haproxy-1.6.11 make 报错

本文记录了在编译 HAProxy 过程中遇到的多个错误,包括找不到 openssl/ssl.h 文件、类型定义错误及结构体成员访问错误等,并给出了通过安装 openssl-devel 解决这些问题的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

# make TARGET=linux26 USE_OPENSSL=1 ADDLIB=-lz
gcc -Iinclude -Iebtree -Wall  -O2 -g -fno-strict-aliasing -Wdeclaration-after-statement       -DTPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DUSE_GETSOCKNAME -DUSE_OPENSSL  -DUSE_SYSCALL_FUTEX  -DCONFIG_HAPROXY_VERSION=\"1.6.11\" -DCONFIG_HAPROXY_DATE=\"2016/12/25\" \
          -DBUILD_TARGET='"linux26"' \
          -DBUILD_ARCH='""' \
          -DBUILD_CPU='"generic"' \
          -DBUILD_CC='"gcc"' \
          -DBUILD_CFLAGS='"-O2 -g -fno-strict-aliasing -Wdeclaration-after-statement"' \
          -DBUILD_OPTIONS='"USE_OPENSSL=1"' \
           -c -o src/haproxy.o src/haproxy.c
In file included from include/types/acl.h:33,
                 from include/types/proxy.h:38,
                 from include/proto/log.h:32,
                 from include/common/cfgparse.h:29,
                 from src/haproxy.c:63:
include/types/server.h:29:25: error: openssl/ssl.h: No such file or directory
In file included from include/types/connection.h:30,
                 from include/types/server.h:36,
                 from include/types/acl.h:33,
                 from include/types/proxy.h:38,
                 from include/proto/log.h:32,
                 from include/common/cfgparse.h:29,
                 from src/haproxy.c:63:
include/types/listener.h:127: error: expected specifier-qualifier-list before ‘SSL_CTX’
In file included from include/types/acl.h:33,
                 from include/types/proxy.h:38,
                 from include/proto/log.h:32,
                 from include/common/cfgparse.h:29,
                 from src/haproxy.c:63:
include/types/server.h:232: error: expected specifier-qualifier-list before ‘SSL_CTX’
In file included from src/haproxy.c:94:
include/proto/listener.h: In function ‘bind_conf_alloc’:
include/proto/listener.h:130: error: ‘struct bind_conf’ has no member named ‘file’
include/proto/listener.h:131: error: ‘struct bind_conf’ has no member named ‘line’
include/proto/listener.h:133: error: ‘struct bind_conf’ has no member named ‘by_fe’
include/proto/listener.h:133: error: ‘struct bind_conf’ has no member named ‘by_fe’
include/proto/listener.h:133: error: ‘struct bind_conf’ has no member named ‘by_fe’
include/proto/listener.h:133: error: ‘struct bind_conf’ has no member named ‘by_fe’
include/proto/listener.h:133: error: ‘struct bind_conf’ has no member named ‘by_fe’
include/proto/listener.h:135: error: ‘struct bind_conf’ has no member named ‘arg’
include/proto/listener.h:137: error: ‘struct bind_conf’ has no member named ‘ux’
include/proto/listener.h:138: error: ‘struct bind_conf’ has no member named ‘ux’
include/proto/listener.h:139: error: ‘struct bind_conf’ has no member named ‘ux’
include/proto/listener.h:141: error: ‘struct bind_conf’ has no member named ‘listeners’
include/proto/listener.h:141: error: ‘struct bind_conf’ has no member named ‘listeners’
include/proto/listener.h:141: error: ‘struct bind_conf’ has no member named ‘listeners’
In file included from src/haproxy.c:109:
include/proto/ssl_sock.h: At top level:
include/proto/ssl_sock.h:46: error: expected declaration specifiers or ‘...’ before ‘SSL_CTX’
include/proto/ssl_sock.h:74: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
include/proto/ssl_sock.h:75: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
include/proto/ssl_sock.h:76: error: expected ‘)’ before ‘*’ token
src/haproxy.c: In function ‘display_build_opts’:
src/haproxy.c:314: error: expected ‘)’ before ‘OPENSSL_VERSION_TEXT’
src/haproxy.c:316: warning: implicit declaration of function ‘SSLeay_version’
src/haproxy.c:316: error: ‘SSLEAY_VERSION’ undeclared (first use in this function)
src/haproxy.c:316: error: (Each undeclared identifier is reported only once
src/haproxy.c:316: error: for each function it appears in.)
src/haproxy.c:317: error: ‘OPENSSL_VERSION_NUMBER’ undeclared (first use in this function)
src/haproxy.c:317: warning: implicit declaration of function ‘SSLeay’
src/haproxy.c: In function ‘deinit’:
src/haproxy.c:1467: error: ‘struct bind_conf’ has no member named ‘by_fe’
src/haproxy.c:1467: error: ‘struct bind_conf’ has no member named ‘by_fe’
src/haproxy.c:1467: error: ‘struct bind_conf’ has no member named ‘by_fe’
src/haproxy.c:1467: warning: left-hand operand of comma expression has no effect
src/haproxy.c:1467: error: ‘struct bind_conf’ has no member named ‘by_fe’
src/haproxy.c:1467: error: ‘struct bind_conf’ has no member named ‘by_fe’
src/haproxy.c:1467: error: ‘struct bind_conf’ has no member named ‘by_fe’
src/haproxy.c:1472: error: ‘struct bind_conf’ has no member named ‘ca_sign_file’
src/haproxy.c:1473: error: ‘struct bind_conf’ has no member named ‘ca_sign_pass’
src/haproxy.c:1478: error: ‘struct bind_conf’ has no member named ‘file’
src/haproxy.c:1479: error: ‘struct bind_conf’ has no member named ‘arg’
src/haproxy.c:1480: error: ‘struct bind_conf’ has no member named ‘by_fe’
src/haproxy.c:1480: warning: type defaults to ‘intin declaration of ‘__ret’
src/haproxy.c:1480: error: ‘struct bind_conf’ has no member named ‘by_fe’
src/haproxy.c:1480: error: ‘struct bind_conf’ has no member named ‘by_fe’
src/haproxy.c:1480: error: ‘struct bind_conf’ has no member named ‘by_fe’
src/haproxy.c:1480: error: ‘struct bind_conf’ has no member named ‘by_fe’
src/haproxy.c:1480: error: ‘struct bind_conf’ has no member named ‘by_fe’
make: *** [src/haproxy.o] Error 1
# yum install openssl-devel
#问题解决!

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值