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

cxx_supportlib build failure with clang++-19 due to invalid member access #2580

Closed
kenballus opened this issue Dec 27, 2024 · 1 comment · Fixed by #2581
Closed

cxx_supportlib build failure with clang++-19 due to invalid member access #2580

kenballus opened this issue Dec 27, 2024 · 1 comment · Fixed by #2581
Assignees
Milestone

Comments

@kenballus
Copy link

Issue report

Question 1: What is the problem?

The passenger agent fails to build with clang 19.

Steps to reproduce:

  1. Start a fresh Fedora 41 container.
docker run --workdir /root --rm -it fedora:41 bash
  1. Install dependencies:
yes | dnf install git ruby-devel clang++ libcurl-devel
  1. Download and build Passenger with clang++-19:
export CC=clang CXX=clang++
git clone --recurse-submodules https://github.com/phusion/passenger
cd passenger
gem build
gem install ./passenger*.gem
passenger-config compile-agent --auto
  1. The build will fail. The log file is long, so I won't paste it all here, but this is the relevant error:
clang++ -o /tmp/passenger-install.4e2qu7/support-binaries/WatchdogMain.o  -Isrc/agent -Isrc/cxx_supportlib -Isrc/cxx_supportlib/vendor-copy -Isrc/cxx_supportlib/vendor-modified -Isrc/cxx_supportlib/vendor-modified/libev -Wno-ambiguous-member-template -DUSE_VENDORED_LIBEV -Isrc/cxx_supportlib/vendor-copy/libuv/include -Isrc/cxx_supportlib/vendor-modified/websocketpp -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -Wno-unknown-pragmas -Wno-ambiguous-member-template -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -DHAS_ALLOCA_H -DHAVE_ACCEPT4 -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -g -fno-limit-debug-info -std=gnu++11 -Wno-unused-local-typedefs -Wno-format-nonliteral -DHAS_UNORDERED_MAP -c src/agent/Watchdog/WatchdogMain.cpp
In file included from src/agent/Watchdog/WatchdogMain.cpp:66:
In file included from src/agent/Shared/ApiServerUtils.h:71:
In file included from src/cxx_supportlib/ServerKit/Server.h:61:
src/cxx_supportlib/Algorithms/MovingAverage.h:193:44: error: no member named 'sumOfWeights' in 'DiscExpMovingAverageWithStddev<alpha, alphaTimeUnit, maxAge>'
  193 |                 return sqrt(copy.sumOfSquaredData / copy.sumOfWeights - pow(copy.average(), 2));
      |                                                     ~~~~ ^
1 error generated.

Question 2: Passenger version and integration mode:

Passenger built from the stable-6.0 branch, commit c7599c4.

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

Host: Linux 6.1.0-25-amd64, Debian 12
Container: 6.1.0-25-amd64, Fedora 41

Question 4: Passenger installation method:

[X] source tarball

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

  • For example: Ruby 2.3.0, RVM, Rails 5.0.0; Node.js 4.0.0 with Express 4.13.4

N/A

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

  • For example: Heroku, Amazon Container Services, Docker 1.9 with an image based on passenger-docker

I am using Docker, but only for convenient access to clang 19.

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

Nope.

@kenballus kenballus changed the title cxx_supportlib build failure with clang++-19 due to invalid field reference cxx_supportlib build failure with clang++-19 due to invalid member access Dec 27, 2024
@CamJN CamJN linked a pull request Dec 29, 2024 that will close this issue
@CamJN CamJN self-assigned this Dec 29, 2024
@CamJN CamJN added this to the 6.0.25 milestone Dec 29, 2024
@CamJN
Copy link
Member

CamJN commented Dec 29, 2024

thanks for this, you can track the fix's progress in the linked PR

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

Successfully merging a pull request may close this issue.

2 participants