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

SystemMetricsCollector and SpeedMeter should not use NaN #1212

Closed
jfqd opened this Issue Jun 13, 2014 · 7 comments

Comments

Projects
None yet
2 participants
@jfqd

jfqd commented Jun 13, 2014

What steps will reproduce the problem?

Install latest passenger version or any between 4.0.42 and latest:

gem install passenger -v 4.0.45

Install requirements for OpenCSW apache:

pkgutil -y -i apache2
pkgutil -y -i apache2_dev
pkgutil -y -i libidn_dev
pkgutil -y -i libcares_dev
pkgutil -y -i librtmp_dev
pkgutil -y -i libssh2_dev
pkgutil -y -i openldap_dev
pkgutil -y -i libcurl4
pkgutil -y -i libcurl_dev

Compile apache2-module:

LD_LIBRARY_PATH=/opt/csw/lib/32 PATH=/opt/csw/bin:$PATH passenger-install-apache2-module -a --languages ruby

What is the expected output?

Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-)

What do you see instead?

c++ -Iext -Iext/common -Iext/libev  -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -fcommon -feliminate-unused-debug-symbols -feliminate-unused-debug-types -ggdb -DHAS_ALLOCA_H -DHAVE_ACCEPT4 -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -DHASH_NAMESPACE="__gnu_cxx" -DHASH_MAP_HEADER="<ext/hash_map>" -DHASH_MAP_CLASS="hash_map" -DHASH_FUN_H="<ext/hash_fun.h>" -pthreads -D__EXTENSIONS__ -D__SOLARIS__ -D_FILE_OFFSET_BITS=64 -DBOOST_HAS_STDINT_H -o buildout/common/libpassenger_common/ApplicationPool2/Implementation.o -c ext/common/ApplicationPool2/Implementation.cpp
In file included from ext/common/ApplicationPool2/Process.h:48,
                 from ext/common/ApplicationPool2/Pool.h:44,
                 from ext/common/ApplicationPool2/Implementation.cpp:31:
ext/common/Utils/ProcessMetricsCollector.h: In constructor `Passenger::ProcessMetrics::ProcessMetrics()':
ext/common/Utils/ProcessMetricsCollector.h:106: warning: converting of negative value `-0x00000000000000001' to `size_t'
In file included from ext/common/ApplicationPool2/Pool.h:62,
                 from ext/common/ApplicationPool2/Implementation.cpp:31:
ext/common/Utils/SystemMetricsCollector.h: In member function `void Passenger::SystemMetrics::toDescription(std::ostream&, const Passenger::SystemMetrics::DescriptionOptions&) const':
ext/common/Utils/SystemMetricsCollector.h:539: error: `isnan' is not a member of `std'
ext/common/Utils/SystemMetricsCollector.h:650: error: `isnan' is not a member of `std'
ext/common/Utils/SystemMetricsCollector.h:670: error: `isnan' is not a member of `std'
rake aborted!
Command failed with status (1): [c++ -Iext -Iext/common -Iext/libev  -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -fcommon -feliminate-unused-debug-symbols -feliminate-unused-debug-types -ggdb -DHAS_ALLOCA_H -DHAVE_ACCEPT4 -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -DHASH_NAMESPACE="__gnu_cxx" -DHASH_MAP_HEADER="<ext/hash_map>" -DHASH_MAP_CLASS="hash_map" -DHASH_FUN_H="<ext/hash_fun.h>" -pthreads -D__EXTENSIONS__ -D__SOLARIS__ -D_FILE_OFFSET_BITS=64 -DBOOST_HAS_STDINT_H -o buildout/common/libpassenger_common/ApplicationPool2/Implementation.o -c ext/common/ApplicationPool2/Implementation.cpp]
/usr/local/rvm/gems/ruby-1.9.3-p547@global/bin/ruby_executable_hooks18:15:in `eval'
/usr/local/rvm/gems/ruby-1.9.3-p547@global/bin/ruby_executable_hooks18:15:in `<main>'
Tasks: TOP => apache2 => buildout/agents/PassengerHelperAgent => buildout/common/libpassenger_common/ApplicationPool2/Implementation.o
(See full trace by running task with --trace)

What version of Phusion Passenger are you using?

Any version between 4.0.42 and 4.0.45.

Which version of Ruby are you using?

ruby-1.9.3-p545 and ruby-1.9.3-p547

On what operating system?

  • omnios-b281e50 (OmniOS 11-0.151006 LTS)
  • oi_151a7 (OpenIndiana 151a7)
@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget Jun 13, 2014

Member

Which compiler are you using?

Member

FooBarWidget commented Jun 13, 2014

Which compiler are you using?

@jfqd

This comment has been minimized.

Show comment
Hide comment
@jfqd

jfqd Jun 13, 2014

I tried it with gcc versions 3.4.3, 4.7.2 and 4.9.0.

jfqd commented Jun 13, 2014

I tried it with gcc versions 3.4.3, 4.7.2 and 4.9.0.

@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget Jun 13, 2014

Member

And they all get the 'isnan' is not a member of 'std' error?

Member

FooBarWidget commented Jun 13, 2014

And they all get the 'isnan' is not a member of 'std' error?

@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget Jun 13, 2014

Member

Hm, I see that isnan() is a C++11 function. :(

Member

FooBarWidget commented Jun 13, 2014

Hm, I see that isnan() is a C++11 function. :(

@FooBarWidget FooBarWidget changed the title from Passenger fails to compile apache2-module on OpenIndiana and OmniOS to SystemMetricsCollector and SpeedMeter should not use NaN Jun 13, 2014

@FooBarWidget FooBarWidget added this to the 4.0.46 milestone Jun 13, 2014

@jfqd

This comment has been minimized.

Show comment
Hide comment
@jfqd

jfqd Jun 13, 2014

Yes all get the 'isnan' is not a member of 'std' error.

jfqd commented Jun 13, 2014

Yes all get the 'isnan' is not a member of 'std' error.

@jfqd

This comment has been minimized.

Show comment
Hide comment
@jfqd

jfqd Jun 13, 2014

OK, I see. So it should be a macro for C99?

jfqd commented Jun 13, 2014

OK, I see. So it should be a macro for C99?

@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget Jun 13, 2014

Member

I should probably get rid of the usage of NaN entirely. It appears that, before C99, there is no portable way to check whether a value is NaN. It even appears that NaN is not supported on all floating point implementations.

Member

FooBarWidget commented Jun 13, 2014

I should probably get rid of the usage of NaN entirely. It appears that, before C99, there is no portable way to check whether a value is NaN. It even appears that NaN is not supported on all floating point implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment