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

Passenger failing to compile on AlmaLinux9 with required dependencies #2561

Open
cbochs opened this issue Aug 24, 2024 · 1 comment
Open

Comments

@cbochs
Copy link

cbochs commented Aug 24, 2024

Issue report

Question 1: What is the problem?

Your answer:

What is the expected behavior?

Passenger 6.0.22 compiles successfully with the required set of listed dependencies on AlmaLinux 9.

What is the actual behavior?

Passenger fails to compile with the following error:

175.8 /usr/share/ruby/mkmf.rb:471:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
175.8 You have to install development tools first.
175.8   from /usr/share/ruby/mkmf.rb:613:in `try_cpp'
175.8   from /usr/share/ruby/mkmf.rb:1124:in `block in have_header'
175.8   from /usr/share/ruby/mkmf.rb:971:in `block in checking_for'
175.8   from /usr/share/ruby/mkmf.rb:361:in `block (2 levels) in postpone'
175.8   from /usr/share/ruby/mkmf.rb:331:in `open'
175.8   from /usr/share/ruby/mkmf.rb:361:in `block in postpone'
175.8   from /usr/share/ruby/mkmf.rb:331:in `open'
175.8   from /usr/share/ruby/mkmf.rb:357:in `postpone'
175.8   from /usr/share/ruby/mkmf.rb:970:in `checking_for'
175.8   from /usr/share/ruby/mkmf.rb:1123:in `have_header'
175.8   from /src/passenger/src/ruby_native_extension/extconf.rb:45:in `<main>'
175.8 rake aborted!
175.8 Command failed with status (1): [cd 'buildout/ruby/ruby-3.0.7-aarch64-linux/' && /usr/bin/ruby '/src/passenger/src/ruby_native_extension/extconf.rb']
175.8 /src/passenger/build/ruby_extension.rb:56:in `block in <top (required)>'
175.8 /usr/local/share/gems/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
175.8 Tasks: TOP => nginx => buildout/ruby/ruby-3.0.7-aarch64-linux/passenger_native_support.so => buildout/ruby/ruby-3.0.7-aarch64-linux/Makefile

How can we reproduce it?

Here's a dockerfile that reproduces the error:

FROM almalinux:latest

WORKDIR /src

RUN <<EOF
    dnf install \
        --nodocs \
        --setopt=fastmirror=1 \
        --setopt=install_weak_deps=False \
        --assumeyes \
        gcc \
        gcc-c++ \
        libcurl-devel \
        openssl-devel \
        pcre2-devel \
        ruby-devel \
        zlib-devel
EOF

RUN gem install rake rack

RUN mkdir passenger && \
    curl -sL https://github.com/phusion/passenger/releases/download/release-6.0.22/passenger-6.0.22.tar.gz | tar xz -C passenger --strip-components=1

Run with

docker run --rm -it $(docker build -q .) ./passenger/bin/passenger-install-nginx-module \
    --prefix=nginx \
    --auto \
    --auto-download \
    --language=ruby

Question 2: Passenger version and integration mode:

Your answer: open source 6.0.22

Question 3: OS or Linux distro, platform (including version):

Your answer: AlmaLinux 9 (linux/arm64)

Question 4: Passenger installation method:

Your answer:
[ ] RubyGems + Gemfile
[ ] RubyGems, no Gemfile
[ ] Phusion APT repo
[ ] Phusion YUM repo
[ ] OS X Homebrew
[x] source tarball
[ ] Other, please specify:

Question 5: Your app's programming language (including any version managers) and framework (including versions):

Your answer: Ruby 3.0.7 (what ruby-devel installs)

Question 6: Are you using a PaaS and/or containerization? If so which one?

Your answer: Docker

Question 7: Anything else about your setup that we should know?

Your answer:

There are two states in which compilation becomes successful:

  1. Remove --setopt=install_weak_deps=False, which installs weak dependencies of the "required dependencies" passenger lists out
  2. Add the redhat-rpm-config package, which appears to be the minimal set of packages required in AlmaLinux to have passenger compile successfully

What I'm trying to find out is what does ruby/passenger require from this package? How can the passenger build script be improved so that it can maybe check for this dependency?


We strive for quality and appreciate you taking the time to submit a report! Please note that if you want guaranteed response times and priority issue support we encourage you to join our enterprise customer base. They also provide us with the means to continue our high level of open source support!

@CamJN
Copy link
Member

CamJN commented Aug 26, 2024

Unfortunately redhat-rpm-config is the package that contains redhat-hardened-cc1, it's not a meta-package where you can pull in another package to satisfy the dependency.

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