Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-2124

error whene executing: ./configure CPPFLAGS="-std=c++11"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • 5.0.0
    • Build
    • None

    Description

      (Fedora19) the configure command stops when passing CPPFLAGS="-std=c++11":

      ...
      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
      

      from config.log:

      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
      

      SOLUTION:

      [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]$
      

      Attachments

        Issue Links

          Activity

            People

              jamespeach James Peach
              luca.rea Luca Rea
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: