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 5.0.1 nginx module build error on FreeBSD 10.1 #1401

Closed
clemensg opened this issue Mar 4, 2015 · 2 comments

Comments

Projects
None yet
3 participants
@clemensg
Copy link
Contributor

commented Mar 4, 2015

Building the passenger 5.0.1 nginx module on FreeBSD 10.1 fails with the following error message:

...

In file included from ext/common/agents/HelperAgent/Main.cpp:66:
In file included from ext/common/agents/HelperAgent/RequestHandler.h:69:
In file included from ext/common/agents/HelperAgent/RequestHandler/Client.h:31:
In file included from ext/common/agents/HelperAgent/RequestHandler/Request.h:34:
In file included from ext/common/ApplicationPool2/Pool.h:65:
In file included from ext/common/Utils/SystemMetricsCollector.h:58:
In file included from /usr/include/sys/pcpu.h:45:
/usr/include/sys/_rmlock.h:39:22: error: unknown type name 'rm_priotracker'
LIST_HEAD(rmpriolist,rm_priotracker);
                     ^
ext/common/Utils/sysqueue.h:407:5: note: expanded from macro 'LIST_HEAD'
    type *lh_first; /* first element */                          \
    ^
In file included from ext/common/agents/HelperAgent/Main.cpp:66:
In file included from ext/common/agents/HelperAgent/RequestHandler.h:69:
In file included from ext/common/agents/HelperAgent/RequestHandler/Client.h:31:
In file included from ext/common/agents/HelperAgent/RequestHandler/Request.h:34:
In file included from ext/common/ApplicationPool2/Pool.h:65:
In file included from ext/common/Utils/SystemMetricsCollector.h:58:
In file included from /usr/include/sys/pcpu.h:45:
/usr/include/sys/_rmlock.h:49:13: error: unknown type name 'rm_priotracker'
        LIST_HEAD(,rm_priotracker) rm_activeReaders;
                   ^
ext/common/Utils/sysqueue.h:407:5: note: expanded from macro 'LIST_HEAD'
    type *lh_first; /* first element */                          \
    ^
2 errors generated.
rake aborted!
Command failed with status (1): [c++ -o buildout/support-binaries/ServerMain.o  -Iext -Iext/common  -Iext/libe
v -Wno-ambiguous-member-template -Iext/libeio -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-para
meter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -Wno-amb
iguous-member-template -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -g -DHAVE_ACCEPT4 -DHAS_SFENCE -DH
AS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -DHAS_UNORDERED_MAP -c ext/common/agents/HelperAgent/Main.
cpp]
/usr/local/rvm/gems/ruby-2.2.1/gems/passenger-5.0.1/build/cplusplus_support.rb:51:in `run_compiler'
/usr/local/rvm/gems/ruby-2.2.1/gems/passenger-5.0.1/build/cplusplus_support.rb:61:in `compile_cxx'
/usr/local/rvm/gems/ruby-2.2.1/gems/passenger-5.0.1/build/agents.rb:122:in `block (2 levels) in <top (required
)>'
Tasks: TOP => nginx => nginx_without_native_support => buildout/support-binaries/PassengerAgent => buildout/su
pport-binaries/ServerMain.o
(See full trace by running task with --trace)

Details:
Nginx 1.7.10
FreeBSD 10.1 (10.1-RELEASE-p6) with clang 3.4.1

Any ideas?

@FooBarWidget

This comment has been minimized.

Copy link
Member

commented Mar 5, 2015

Closed via #1402.

OnixGH pushed a commit that referenced this issue Mar 5, 2015

Daniel Knoppel (Phusion)
@knu

This comment has been minimized.

Copy link

commented Mar 6, 2015

Cool, just found this problem and I locally fixed it by moving #include <ApplicationPool2/Pool.h> above #include <agents/HelperAgent/RequestHandler.h> so the queue macros wouldn't get redefined before sys/pcpu.h used them.
Of course this solution is smarter if you don't really need to include sys/pcpu.h in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.