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

4.0.21.pre: build/agents.rb: EXTRA_CXXFLAGS needed for buildout/agents/PassengerHelperAgent #1092

Closed
FooBarWidget opened this Issue May 29, 2014 · 7 comments

Comments

Projects
None yet
1 participant
@FooBarWidget
Member

FooBarWidget commented May 29, 2014

From mark@ibiblio.org on October 17, 2013 03:23:27

What is the expected output? What do you see instead? CC -xtarget=ultra -m64 -xcode=pic32 buildout/agents/PassengerHelperAgent.o -o buildout/agents/PassengerHelperAgent buildout/common/libpassenger_common/Logging.o buildout/common/libpassenger_common/Utils/SystemTime.o buildout/common/libpassenger_common/Utils/StrIntUtils.o buildout/common/libpassenger_common/Utils/IOUtils.o buildout/common/libpassenger_common/Utils.o buildout/common/libpassenger_common/Utils/Base64.o buildout/common/libpassenger_common/Utils/CachedFileStat.o buildout/common/libpassenger_common/Utils/LargeFiles.o buildout/common/libpassenger_common/ApplicationPool2/Implementation.o buildout/common/libpassenger_common/ApplicationPool2/AppTypes.o buildout/common/libpassenger_common/AgentsBase.o buildout/common/libpassenger_common/Utils/MD5.o buildout/common/libpassenger_common/Utils/fib.o buildout/common/libpassenger_common/Utils/jsoncpp.o buildout/common/libboost_oxt.a -L/usr/local/lib -lev -L/usr/local/lib -leio -lxnet -lsocket -lnsl -lpthread -lrt
Undefined first referenced
symbol in file
const __rw::__rw_facet_std::locale::_C_get_std_facet(__rw::_rw_facet::C_facet_type,__rw::_rw_facet()(unsigned long,const char))const buildout/agents/PassengerHelperAgent.o
int __rw::_rw_fflush(void,int) buildout/agents/PassengerHelperAgent.o
void __rw::_rw_deallocate(void,unsigned long,int) buildout/agents/PassengerHelperAgent.o
__rw::__rw_facet___rw::_rw_ct_ctype(unsigned long,const char) buildout/agents/PassengerHelperAgent.o
void __rw::__rw_throw(int,...) buildout/agents/PassengerHelperAgent.o
unsigned long __rw::rw_fread(void,int,void,unsigned long) buildout/agents/PassengerHelperAgent.o
void std::ios_base::_C_init(void*) buildout/agents/PassengerHelperAgent.o What version of Phusion Passenger are you using? Which version of Rails? On what operating system? passenger master @ commit_b05d76f9de43aa38b27def5d40b75d03ea95b2d6
Rails 4.0.0
Solaris 10 SPARC
Sun Studio 12.3 Please provide any additional information below. --- build/agents.rb.orig Thu Oct 17 11:59:07 2013
+++ build/agents.rb Thu Oct 17 11:59:55 2013
@@ -104,6 +104,7 @@
"#{LIBEV_LIBS} " <<
"#{LIBEIO_LIBS} " <<
"#{PlatformInfo.portability_ldflags} " <<

  •           "#{EXTRA_CXXFLAGS} " <<
            "#{AGENT_LDFLAGS} " <<
            "#{EXTRA_LDFLAGS}")
    
    end

Original issue: http://code.google.com/p/phusion-passenger/issues/detail?id=993

@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget May 29, 2014

Member

From mark@ibiblio.org on October 16, 2013 19:37:30

And also for PassengerLoggingAgent etc:
CC -xtarget=ultra -m64 -xcode=pic32 buildout/agents/PassengerLoggingAgent.o -o buildout/agents/PassengerLoggingAgent buildout/common/libpassenger_common/Logging.o buildout/common/libpassenger_common/Utils/SystemTime.o buildout/common/libpassenger_common/Utils/StrIntUtils.o buildout/common/libpassenger_common/Utils/IOUtils.o buildout/common/libpassenger_common/Utils.o buildout/common/libpassenger_common/agents/LoggingAgent/FilterSupport.o buildout/common/libpassenger_common/AgentsBase.o buildout/common/libpassenger_common/Utils/Base64.o buildout/common/libpassenger_common/Utils/MD5.o buildout/common/libboost_oxt.a -L/usr/local/lib -lev -L/usr/local/lib -lcurl -I/usr/local/include -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -lidn -lssh2 -lssl -lcrypto -llber -lldap -lrt -lsocket -lnsl -lssl -lcrypto -lsocket -lnsl -ldl -lz -lssh2 -lz -lxnet -lsocket -lnsl -lpthread -lrt
Undefined first referenced
symbol in file
const __rw::__rw_facet_std::locale::_C_get_std_facet(__rw::_rw_facet::C_facet_type,__rw::_rw_facet()(unsigned long,const char))const buildout/agents/PassengerLoggingAgent.o
int __rw::_rw_fflush(void,int) buildout/agents/PassengerLoggingAgent.o
void __rw::_rw_deallocate(void,unsigned long,int) buildout/agents/PassengerLoggingAgent.o
__rw::__rw_facet___rw::_rw_ct_ctype(unsigned long,const char) buildout/agents/PassengerLoggingAgent.o

--- build/agents.rb.orig Thu Oct 17 11:59:07 2013
+++ build/agents.rb Thu Oct 17 13:36:32 2013
@@ -48,6 +48,7 @@
"#{LIBBOOST_OXT} " <<
"#{EXTRA_PRE_LDFLAGS} " <<
"#{PlatformInfo.portability_ldflags} " <<

  •           "#{EXTRA_CXXFLAGS} " <<
            "#{AGENT_LDFLAGS} " <<
            "#{EXTRA_LDFLAGS}")
    
    end
    @@ -104,6 +105,7 @@
    "#{LIBEV_LIBS} " <<
    "#{LIBEIO_LIBS} " <<
    "#{PlatformInfo.portability_ldflags} " <<
  •           "#{EXTRA_CXXFLAGS} " <<
            "#{AGENT_LDFLAGS} " <<
            "#{EXTRA_LDFLAGS}")
    
    end
    @@ -147,6 +149,7 @@
    "#{PlatformInfo.curl_libs} " <<
    "#{PlatformInfo.zlib_libs} " <<
    "#{PlatformInfo.portability_ldflags} " <<
  •           "#{EXTRA_CXXFLAGS} " <<
            "#{AGENT_LDFLAGS} " <<
            "#{EXTRA_LDFLAGS}")
    
    end
    @@ -166,6 +169,7 @@
    "#{AGENT_CFLAGS} #{PlatformInfo.portability_cxxflags} #{EXTRA_CXXFLAGS} " <<
    "#{spawn_preparer_libs.link_objects_as_string} " <<
    "#{LIBBOOST_OXT} " <<
  •           "#{EXTRA_CXXFLAGS} " <<
            "#{PlatformInfo.portability_ldflags} " <<
            "#{EXTRA_LDFLAGS}")
    
    end
Member

FooBarWidget commented May 29, 2014

From mark@ibiblio.org on October 16, 2013 19:37:30

And also for PassengerLoggingAgent etc:
CC -xtarget=ultra -m64 -xcode=pic32 buildout/agents/PassengerLoggingAgent.o -o buildout/agents/PassengerLoggingAgent buildout/common/libpassenger_common/Logging.o buildout/common/libpassenger_common/Utils/SystemTime.o buildout/common/libpassenger_common/Utils/StrIntUtils.o buildout/common/libpassenger_common/Utils/IOUtils.o buildout/common/libpassenger_common/Utils.o buildout/common/libpassenger_common/agents/LoggingAgent/FilterSupport.o buildout/common/libpassenger_common/AgentsBase.o buildout/common/libpassenger_common/Utils/Base64.o buildout/common/libpassenger_common/Utils/MD5.o buildout/common/libboost_oxt.a -L/usr/local/lib -lev -L/usr/local/lib -lcurl -I/usr/local/include -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -lidn -lssh2 -lssl -lcrypto -llber -lldap -lrt -lsocket -lnsl -lssl -lcrypto -lsocket -lnsl -ldl -lz -lssh2 -lz -lxnet -lsocket -lnsl -lpthread -lrt
Undefined first referenced
symbol in file
const __rw::__rw_facet_std::locale::_C_get_std_facet(__rw::_rw_facet::C_facet_type,__rw::_rw_facet()(unsigned long,const char))const buildout/agents/PassengerLoggingAgent.o
int __rw::_rw_fflush(void,int) buildout/agents/PassengerLoggingAgent.o
void __rw::_rw_deallocate(void,unsigned long,int) buildout/agents/PassengerLoggingAgent.o
__rw::__rw_facet___rw::_rw_ct_ctype(unsigned long,const char) buildout/agents/PassengerLoggingAgent.o

--- build/agents.rb.orig Thu Oct 17 11:59:07 2013
+++ build/agents.rb Thu Oct 17 13:36:32 2013
@@ -48,6 +48,7 @@
"#{LIBBOOST_OXT} " <<
"#{EXTRA_PRE_LDFLAGS} " <<
"#{PlatformInfo.portability_ldflags} " <<

  •           "#{EXTRA_CXXFLAGS} " <<
            "#{AGENT_LDFLAGS} " <<
            "#{EXTRA_LDFLAGS}")
    
    end
    @@ -104,6 +105,7 @@
    "#{LIBEV_LIBS} " <<
    "#{LIBEIO_LIBS} " <<
    "#{PlatformInfo.portability_ldflags} " <<
  •           "#{EXTRA_CXXFLAGS} " <<
            "#{AGENT_LDFLAGS} " <<
            "#{EXTRA_LDFLAGS}")
    
    end
    @@ -147,6 +149,7 @@
    "#{PlatformInfo.curl_libs} " <<
    "#{PlatformInfo.zlib_libs} " <<
    "#{PlatformInfo.portability_ldflags} " <<
  •           "#{EXTRA_CXXFLAGS} " <<
            "#{AGENT_LDFLAGS} " <<
            "#{EXTRA_LDFLAGS}")
    
    end
    @@ -166,6 +169,7 @@
    "#{AGENT_CFLAGS} #{PlatformInfo.portability_cxxflags} #{EXTRA_CXXFLAGS} " <<
    "#{spawn_preparer_libs.link_objects_as_string} " <<
    "#{LIBBOOST_OXT} " <<
  •           "#{EXTRA_CXXFLAGS} " <<
            "#{PlatformInfo.portability_ldflags} " <<
            "#{EXTRA_LDFLAGS}")
    
    end
@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget May 29, 2014

Member

From mark@ibiblio.org on October 16, 2013 19:40:24

It might make sense to rename create_executable to create_cxx_executable

grep execut build/agents.rb

    create_executable(AGENT_OUTPUT_DIR + 'PassengerWatchdog',
    create_executable("#{AGENT_OUTPUT_DIR}PassengerHelperAgent",
    create_executable("#{AGENT_OUTPUT_DIR}PassengerLoggingAgent",
    create_executable(AGENT_OUTPUT_DIR + 'SpawnPreparer',
    create_c_executable(AGENT_OUTPUT_DIR + 'EnvPrinter',
    create_c_executable(AGENT_OUTPUT_DIR + 'TempDirToucher',
Member

FooBarWidget commented May 29, 2014

From mark@ibiblio.org on October 16, 2013 19:40:24

It might make sense to rename create_executable to create_cxx_executable

grep execut build/agents.rb

    create_executable(AGENT_OUTPUT_DIR + 'PassengerWatchdog',
    create_executable("#{AGENT_OUTPUT_DIR}PassengerHelperAgent",
    create_executable("#{AGENT_OUTPUT_DIR}PassengerLoggingAgent",
    create_executable(AGENT_OUTPUT_DIR + 'SpawnPreparer',
    create_c_executable(AGENT_OUTPUT_DIR + 'EnvPrinter',
    create_c_executable(AGENT_OUTPUT_DIR + 'TempDirToucher',
@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget May 29, 2014

Member

From honglilai on October 17, 2013 04:11:59

Why is EXTRA_CXXFLAGS needed there? These are pure-linking action. You should set linker flags in EXTRA_LDFLAGS.

Member

FooBarWidget commented May 29, 2014

From honglilai on October 17, 2013 04:11:59

Why is EXTRA_CXXFLAGS needed there? These are pure-linking action. You should set linker flags in EXTRA_LDFLAGS.

@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget May 29, 2014

Member

From mark@ibiblio.org on October 17, 2013 04:41:59

They are C++ flags only, not for C, they tell the C++ compiler to use the stdcxx library for everything.

Member

FooBarWidget commented May 29, 2014

From mark@ibiblio.org on October 17, 2013 04:41:59

They are C++ flags only, not for C, they tell the C++ compiler to use the stdcxx library for everything.

@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget May 29, 2014

Member

From honglilai on October 17, 2013 07:33:03

I've introduced the following new environment variables:
EXTRA_C_LDFLAGS
EXTRA_CXX_LDFLAGS
These are both injected after EXTRA_LDFLAGS, but only active for C or C++ linker commands, respectively. Does this work for you?

Member

FooBarWidget commented May 29, 2014

From honglilai on October 17, 2013 07:33:03

I've introduced the following new environment variables:
EXTRA_C_LDFLAGS
EXTRA_CXX_LDFLAGS
These are both injected after EXTRA_LDFLAGS, but only active for C or C++ linker commands, respectively. Does this work for you?

@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget May 29, 2014

Member

From mark@ibiblio.org on October 17, 2013 19:51:34

Sure they will do fine. Thanks :)

Member

FooBarWidget commented May 29, 2014

From mark@ibiblio.org on October 17, 2013 19:51:34

Sure they will do fine. Thanks :)

@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget May 29, 2014

Member

From honglilai on October 18, 2013 01:56:20

Status: Fixed
Labels: Milestone-4.0.21

Member

FooBarWidget commented May 29, 2014

From honglilai on October 18, 2013 01:56:20

Status: Fixed
Labels: Milestone-4.0.21

flygoast pushed a commit to flygoast/passenger that referenced this issue Jul 11, 2014

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