Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building OpenResty on ubi9 failed #59

Open
fjfjfan opened this issue Feb 19, 2024 · 1 comment
Open

Building OpenResty on ubi9 failed #59

fjfjfan opened this issue Feb 19, 2024 · 1 comment

Comments

@fjfjfan
Copy link

fjfjfan commented Feb 19, 2024

Use the similar steps(on RHEL 9.3) to build OpenResty on ubi 9.3, but got error like:

==== Successfully installed LuaJIT 2.1.ROLLING to /usr/local/openresty/luajit ====
export LUAJIT_LIB='/openresty/openresty-1.25.3.1/build/luajit-root/usr/local/openresty/luajit/lib'
export LUAJIT_INC='/openresty/openresty-1.25.3.1/build/luajit-root/usr/local/openresty/luajit/include/luajit-2.1'
cd ..
patching the resty script with hard-coded nginx binary path...
cd nginx-1.25.3
sh ./configure --prefix=/usr/local/openresty/nginx \
  --with-debug \
  --with-cc-opt='-DNGX_LUA_USE_ASSERT -DNGX_LUA_ABORT_AT_PANIC -O2 -I/usr/local/include' \
  --add-module=../ngx_devel_kit-0.3.3 \
  --add-module=../iconv-nginx-module-0.14 \
  --add-module=../echo-nginx-module-0.63 \
  --add-module=../xss-nginx-module-0.06 \
  --add-module=../ngx_coolkit-0.2 \
  --add-module=../set-misc-nginx-module-0.33 \
  --add-module=../form-input-nginx-module-0.12 \
  --add-module=../encrypted-session-nginx-module-0.09 \
  --add-module=../srcache-nginx-module-0.33 \
  --add-module=../ngx_lua-0.10.26 \
  --add-module=../ngx_lua_upstream-0.07 \
  --add-module=../headers-more-nginx-module-0.37 \
  --add-module=../array-var-nginx-module-0.06 \
  --add-module=../memc-nginx-module-0.20 \
  --add-module=../redis2-nginx-module-0.15 \
  --add-module=../redis-nginx-module-0.3.9 \
  --add-module=../rds-json-nginx-module-0.16 \
  --add-module=../rds-csv-nginx-module-0.09 \
  --add-module=../ngx_stream_lua-0.0.14 \
  --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib -L/usr/local/lib -Wl,-rpath,/usr/local/lib' \
  --with-http_ssl_module --with-stream --without-pcre2 --with-stream_ssl_module --with-stream_ssl_preread_module
checking for OS
 + Linux 3.10.0-1160.108.1.el7.s390x s390x
checking for C compiler ... not found

./configure: error: C compiler cc is not found

ERROR: failed to run command: sh ./configure --prefix=/usr/local/openresty/nginx \...
[root@d1ec79fc34d8 /]#

steps to reproduce:

    3  wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/OpenResty/1.25.3.1/build_openresty.sh
    8  yum install -y 	         gcc 	         gcc-c++ 	         gd-devel 	         libxslt-devel            gettext            make 	         perl 	         perl-ExtUtils-Embed            unzip 	         zlib-devel            patch            git            wget
    9  yum install ncurses-devel readline -y
   10  yum install -y https://rpmfind.net/linux/centos-stream/9-stream/AppStream/s390x/os/Packages/readline-devel-8.1-4.el9.s390x.rpm
   11  sed -i '/^prepare/d' build_openresty.sh
   12  sed -i 's/curl //g' build_openresty.sh
   15  yum install sudo
   16  bash build_openresty.sh -y
   17  history
@lysliu
Copy link

lysliu commented Mar 1, 2024

This is success from my side.

nginx version: openresty/1.25.3.1
built by gcc 11.4.1 20230605 (Red Hat 11.4.1-2) (GCC)
built with OpenSSL 3.0.7 1 Nov 2022
TLS SNI support enabled
configure arguments: --prefix=/usr/local/openresty/nginx --with-debug --with-cc-opt='-DNGX_LUA_USE_ASSERT -DNGX_LUA_ABORT_AT_PANIC -O2 -I/usr/local/include' --add-module=../ngx_devel_kit-0.3.3 --add-module=../iconv-nginx-module-0.14 --add-module=../echo-nginx-module-0.63 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2 --add-module=../set-misc-nginx-module-0.33 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.09 --add-module=../srcache-nginx-module-0.33 --add-module=../ngx_lua-0.10.26 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.37 --add-module=../array-var-nginx-module-0.06 --add-module=../memc-nginx-module-0.20 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.9 --add-module=../rds-json-nginx-module-0.16 --add-module=../rds-csv-nginx-module-0.09 --add-module=../ngx_stream_lua-0.0.14 --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib -L/usr/local/lib -Wl,-rpath,/usr/local/lib' --with-http_ssl_module --with-stream --without-pcre2 --with-stream_ssl_module --with-stream_ssl_preread_module
	libluajit-5.1.so.2 => /usr/local/openresty/luajit/lib/libluajit-5.1.so.2 (0x000003ff91200000)
	libpcre.so.1 => /lib64/libpcre.so.1 (0x000003ff91080000)
	libssl.so.3 => /lib64/libssl.so.3 (0x000003ff90f80000)

* OpenResty successfully installed *

********************************************************************************************************
*                     Getting Started                 *
         You have successfully installed OpenResty.
         To Run OpenResty run the following commands :
         export PATH=/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin:$PATH
         resty -V
         resty -e 'print("hello, world")'
**********************************************************************************************************
[root@d03042b281c7 /]# uname -a
Linux d03042b281c7 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:29 UTC 2023 s390x s390x s390x GNU/Linux
[root@d03042b281c7 /]#

the ubi9 docker image I used


  110  docker pull redhat/ubi9:latest
  111  docker run -it redhat/ubi9:latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants