You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "James Peach (JIRA)" <ji...@apache.org> on 2013/08/21 20:51:51 UTC

[jira] [Resolved] (TS-2124) error whene executing: ./configure CPPFLAGS="-std=c++11"

     [ https://issues.apache.org/jira/browse/TS-2124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Peach resolved TS-2124.
-----------------------------

    Resolution: Invalid
      Assignee: James Peach

CPPFLAGS is for C preprocessor flags. If you have to pass additional C++ compiler flags, you should use CXXFLAGS.
                
> 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
>            Assignee: James Peach
>             Fix For: 5.0.0
>
>
> (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