在高山图像上构建lua-openssl时未定义对`strerror_s'的引用 [英] undefined references to `strerror_s' while building lua-openssl on alpine image

查看:80
本文介绍了在高山图像上构建lua-openssl时未定义对`strerror_s'的引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图像这样用lua-openssl建立一个开放式的高山图像

I am trying to build an openresty alpine image with lua-openssl like so

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

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

But I get the one below and a lot of such errors:

/usr/local/lua-openssl/deps/lua-compat/c-api/compat-5.3.c:74: 对strerror_s' ./libopenssl.a(cms.o): In function compat53_strerror'的未定义引用: /usr/local/lua-openssl/deps/lua-compat/c-api/compat-5.3.c:74: 未定义对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的引用,遵循collect2:错误:ld 返回1个退出状态:*** [Makefile:94:openssl.so]错误1

/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 tostrerror_s' follow collect2: error: ld returned 1 exit status make: *** [Makefile:94: openssl.so] Error 1

我丢失包裹了吗?

推荐答案

(1)我们获取了可信赖的图像,而不是alpine-fat. (2)用使用lcrypto lib进行构建的make文件覆盖.

(1) We grabbed the trusty image instead of alpine-fat. (2) Overrode the make file with one that uses lcrypto lib to build.

这是我知道的唯一可以完成这项工作的设置.

And that is the only setting I know to make this work.

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

I did not try compiling with MSVC++.

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

My issue and it's fix is tracked in https://github.com/zhaozg/lua-openssl/issues/138

这篇关于在高山图像上构建lua-openssl时未定义对`strerror_s'的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆