[ 
https://issues.apache.org/jira/browse/TS-2124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13734881#comment-13734881
 ] 

Leif Hedstrom commented on TS-2124:
-----------------------------------

>From IRC, this seems to be a problem if you run e.g. ./configure 
>CPPFLAGS=-std=c++11 . So for now, just don't do that, there shouldn't be a 
>reason for doing so I think, since we detect that for you.

The issue with the proposed change is that it's very specific for one 
particular flag. What if we a year from now have -std=c++14 ? Or if people use 
other incompatible flags?

Thanks!
                
> error whene executing:    ./configure CPPFLAGS="-std=c++11"
> -----------------------------------------------------------
>
>                 Key: TS-2124
>                 URL: https://issues.apache.org/jira/browse/TS-2124
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>            Reporter: Luca Rea
>
> (Fedora19) the configure command stops when passing CPPFLAGS="-std=c++11":
> {code}
> ...
> checking for res_init in -lresolv... no
> checking for __putlong in -lresolv... no
> checking for NcursesW wide-character library... yes
> checking for working ncursesw/curses.h... yes
> checking for working ncursesw.h... no
> checking for working ncurses.h... yes
> checking for curl-config... /usr/bin/curl-config
> checking for curl (7.29.0) >= 7.19... yes
> checking for boostlib >= 1.33... yes
> checking for library containing crypt... no
> checking for OpenSSL location... /usr
> checking for library containing BN_init... no
> configure: error: Need at least one SSL library, --with-openssl is supported
> {code}
> from config.log:
> {code}
> configure:21893: checking for OpenSSL location
> configure:21917: result: /usr
> configure:22000: checking for library containing BN_init
> configure:22031: cc -o conftest -g -pipe -Wall -O3 
> -feliminate-unused-debug-symbols -fno-strict-aliasing -Werror -std=c++11 
> -Dlinux -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE 
> -D_REENTRANT  conftest.c  >&5
> cc1: error: command line option '-std=c++11' is valid for C++/ObjC++ but not 
> for C [-Werror]
> cc1: all warnings being treated as errors
> configure:22031: $? = 1
> configure: failed program
> {code}
> SOLUTION:
> {code}
> [luca@localhost trafficserver]$ git diff
> diff --git a/build/crypto.m4 b/build/crypto.m4
> index 80f1cf7..03b8fc4 100644
> --- a/build/crypto.m4
> +++ b/build/crypto.m4
> @@ -85,6 +85,7 @@ fi
>  if test "$enable_openssl" != "no"; then
>    saved_ldflags=$LDFLAGS
>    saved_cppflags=$CPPFLAGS
> +  TS_REMOVEFROM(CPPFLAGS, -std=c++11)
>    openssl_have_headers=0
>    openssl_have_libs=0
>    if test "$openssl_base_dir" != "/usr"; then
> [luca@localhost trafficserver]$
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to