关于C#:在高山图像上构建lua-openssl时对’strerror_s’的未定义引用

undefined references to `strerror_s' while building lua-openssl on alpine image

我正在尝试使用lua-openssl建立一个openresty高山图像

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM openresty/openresty:alpine-fat

# Set the version
ENV RESTY_CONFIG_OPTIONS_MORE"--with-ngx_http_ssl_module"
EXPOSE 80
EXPOSE 443

RUN ls /usr/local/openresty/nginx/logs

COPY lualib /usr/local/openresty/nginx/lualib
RUN chown -R nobody:root /usr/local/openresty/nginx/lualib

RUN apk add --update \\
    openssl openssl-dev \\
    lua5.3 luajit-dev  lua-socket   \\
    git

RUN git clone https://github.com/zhaozg/lua-openssl.git /usr/local/lua-openssl;     \\
    cd /usr/local/lua-openssl;  \\
    git checkout e923252b28cff43add6382853cc85ed888c4474b;   \\
    make

但是我得到下面的错误和很多这样的错误:

/usr/local/lua-openssl/deps/lua-compat/c-api/compat-5.3.c:74:
undefined reference to strerror_s' ./libopenssl.a(cms.o): In function
compat53_strerror':
/usr/local/lua-openssl/deps/lua-compat/c-api/compat-5.3.c:74:
undefined reference to strerror_s'
./libopenssl.a(compat.o):/usr/local/lua-openssl/deps/lua-compat/c-api/compat-5.3.c:74:
more undefined references to
strerror_s' follow collect2: error: ld
returned 1 exit status make: *** [Makefile:94: openssl.so] Error 1

我是否缺少包裹?


(1)我们抓住了值得信赖的形象,而不是高山胖子。
(2)用使用lcrypto lib进行构建的make文件覆盖。

这是我知道可以进行此工作的唯一设置。

我没有尝试使用MSVC ++进行编译。

我的问题及其修复程序在https://github.com/zhaozg/lua-openssl/issues/138中进行了跟踪