pateze opened a new issue #8624:
URL: https://github.com/apache/trafficserver/issues/8624


   Hello! I am having trouble compiling ATS 9.1.1 on the latest version of 
OpenIndiana. When running `gmake` as described in the documentation, do this: 
   ```
   root@keanu:~/trafficserver# gmake
   Making all in include
   gmake[1]: Entering directory '/root/trafficserver/include'
   gmake  all-recursive
   gmake[2]: Entering directory '/root/trafficserver/include'
   Making all in ts
   gmake[3]: Entering directory '/root/trafficserver/include/ts'
   gmake[3]: Nothing to be done for 'all'.
   gmake[3]: Leaving directory '/root/trafficserver/include/ts'
   Making all in tscpp/api
   gmake[3]: Entering directory '/root/trafficserver/include/tscpp/api'
   gmake[3]: Nothing to be done for 'all'.
   gmake[3]: Leaving directory '/root/trafficserver/include/tscpp/api'
   Making all in tscpp/util
   gmake[3]: Entering directory '/root/trafficserver/include/tscpp/util'
   gmake[3]: Nothing to be done for 'all'.
   gmake[3]: Leaving directory '/root/trafficserver/include/tscpp/util'
   gmake[3]: Entering directory '/root/trafficserver/include'
   gmake[3]: Leaving directory '/root/trafficserver/include'
   gmake[2]: Leaving directory '/root/trafficserver/include'
   gmake[1]: Leaving directory '/root/trafficserver/include'
   Making all in src/tscpp/util
   gmake[1]: Entering directory '/root/trafficserver/src/tscpp/util'
     CXX      TextView.lo
   In file included from TextView.cc:26:
   ../../../include/tscpp/util/TextView.h: In constructor 'constexpr 
ts::TextView::TextView(const char*, std::size_t)':
   ../../../include/tscpp/util/TextView.h:646:103: error: '::strlen' has not 
been declared
     646 | inline constexpr TextView::TextView(const char *ptr, size_t n) : 
super_type(ptr, n == npos ? (ptr ? ::strlen(ptr) : 0) : n) {}
         |                                                                      
                                 ^~~~~~
   ../../../include/tscpp/util/TextView.h:36:1: note: 'strlen' is defined in 
header '<cstring>'; did you forget to '#include <cstring>'?
      35 | #include <limits>
     +++ |+#include <cstring>
      36 |
   ../../../include/tscpp/util/TextView.h: In constructor 'constexpr 
ts::TextView::TextView(const char*, int)':
   ../../../include/tscpp/util/TextView.h:647:96: error: '::strlen' has not 
been declared
     647 | inline constexpr TextView::TextView(const char *ptr, int n) : 
super_type(ptr, n < 0 ? (ptr ? ::strlen(ptr) : 0) : n) {}
         |                                                                      
                          ^~~~~~
   ../../../include/tscpp/util/TextView.h:647:96: note: 'strlen' is defined in 
header '<cstring>'; did you forget to '#include <cstring>'?
   ../../../include/tscpp/util/TextView.h: In member function 'ts::TextView& 
ts::TextView::assign(const char*, std::size_t)':
   ../../../include/tscpp/util/TextView.h:745:48: error: '::strlen' has not 
been declared
     745 |   *this = super_type(ptr, n == npos ? (ptr ? ::strlen(ptr) : 0) : n);
         |                                                ^~~~~~
   ../../../include/tscpp/util/TextView.h:745:48: note: 'strlen' is defined in 
header '<cstring>'; did you forget to '#include <cstring>'?
   ../../../include/tscpp/util/TextView.h: In member function 'bool 
ts::TextView::isNoCasePrefixOf(const super_type&) const':
   ../../../include/tscpp/util/TextView.h:1216:46: error: 'strncasecmp' was not 
declared in this scope; did you mean 'strcasecmp'?
    1216 |   return this->size() <= that.size() && 0 == 
strncasecmp(this->data(), that.data(), this->size());
         |                                              ^~~~~~~~~~~
         |                                              strcasecmp
   TextView.cc: In function 'int strcasecmp(const string_view&, const 
string_view&)':
   TextView.cc:68:13: error: '::strncasecmp' has not been declared; did you 
mean 'strcasecmp'?
      68 |   int r = ::strncasecmp(lhs.data(), rhs.data(), n);
         |             ^~~~~~~~~~~
         |             strcasecmp
   gmake[1]: *** [Makefile:974: TextView.lo] Error 1
   gmake[1]: Leaving directory '/root/trafficserver/src/tscpp/util'
   gmake: *** [Makefile:874: all-recursive] Error 1
   root@keanu:~/trafficserver#
   ```
   I've tried adding the flags for CFLAGS and CXXFLAGS, but I don't know if 
they are correct. I honestly don't have much experience compiling (of course, 
if I don't add the CFLAGS and CXXFLAGS, they appear empty):
   
   `./configure --prefix=/opt/ts CFLAGS="-I/usr/include" 
CXXFLAGS="-I/usr/include"`
   
   And the result is the same. Oh, by the way, when the configure finishes, it 
shows the following Build Option Summary: 
   ```
   configure: Build option summary:
       CC:                 gcc
       CXX:                c++
       CPP:                gcc -E
       CFLAGS:             -I/usr/include
       CXXFLAGS:           -I/usr/include
       CPPFLAGS:           -D_GNU_SOURCE -I/usr/openssl/1.0/include 
-DOPENSSL_NO_SSL_INTERN
       LDFLAGS:            -L/usr/openssl/1.0/lib/
       AM_CFLAGS:          -std=gnu99 -m64 -g -pipe -Wall -Wextra 
-Wno-ignored-qualifiers -Wno-unused-parameter -O3 
-feliminate-unused-debug-symbols -fno-strict-aliasing -mcx16
       AM_CXXFLAGS:        -std=c++17 -m64 -g -pipe -Wall -Wextra 
-Wno-ignored-qualifiers -Wno-unused-parameter -O3 
-feliminate-unused-debug-symbols -fno-strict-aliasing -Wno-invalid-offsetof 
-mcx16
       AM_CPPFLAGS:        -Dsolaris -D_LARGEFILE64_SOURCE=1 
-D_COMPILE64BIT_SOURCE=1 -D_REENTRANT -D__STDC_LIMIT_MACROS=1 
-D__STDC_FORMAT_MACROS=1
       AM_LDFLAGS:
       TS_INCLUDES:
       OPENSSL_LDFLAGS:    -L/usr/openssl/1.0/lib/
       OPENSSL_INCLUDES:   -I/usr/openssl/1.0/include
       YAMLCPP_LDFLAGS:    -L${abs_top_builddir}/lib/yamlcpp
       YAMLCPP_INCLUDES:   -I${abs_top_srcdir}/lib/yamlcpp/include
   ```
   Could it be that the error is caused by the AM_LDFLAGS and TS_INCLUDES being 
undefined in the latter case? What would they be in that case? I repeat, I have 
very little experience in compiling.
   To do so, I have downloaded the following packages from the OpenIndiana base 
repository: 
   ```
   developer/build/pkg-config
   developer/build/libtool
   developer/gcc49
   developer/build/gnu-make
   library/security/openssl
   library/pcre
   system/library/libpcap
   developer/lexer/flex 
   system/library/flex-runtime
   developer/hwloc
   runtime/lua
   library/lua/lgi-52
   library/zlib
   library/ncurses
   web/curl
   developer/build/autoconf
   developer/build/automake
   runtime/tcl-8
   library/expat
   developer/versioning/git
   ```
   Thank you 😀 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to