trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leif Hedstrom <zw...@apache.org>
Subject Re: Building ATS 8.0.5 with clang-5.0 - compilation error
Date Fri, 20 Dec 2019 15:49:49 GMT


> On Dec 20, 2019, at 08:40, Alan Carroll <solidwallofcode@verizonmedia.com> wrote:
> 
> 
> Digging a bit more, it looks like if you want to use Clang 5, you need to use libstdc++,
which is claimed to include string_view. If you are using the GCC based headers, you'll need
to upgrade your GCC install to gcc8 or better.


Yes, that’s what I said :) you need to use the right options, with both the right library
choice as well as the right -I path to your libstd++ installation (clang will not look in
it automatically), and probably -Wl,-rpath=... (or make sure llvm’s library path is In the
ld.so config).

The CI shell scripts on the Github repo has examples how to do all this.

— Leif 
> 
>> On Fri, Dec 20, 2019 at 9:35 AM Alan Carroll <solidwallofcode@verizonmedia.com>
wrote:
>> It should be added automatically by the configure script. I would check "config.log"
for any mention of "c++17" to see what went wrong. I checked the clang website and it claims
Clang 5 supports C++17. You could also try compiling this with clang 5 and "-std=c++17"
>> 
>> #include <string_view>
>> int main(int argc, char** argv) {
>>    std::string_view txt { "Delain" };
>>    return 0;
>> }
>> 
>> 
>> 
>>> On Thu, Dec 19, 2019 at 8:27 PM supraja sridhar <suprajasridhar95@gmail.com>
wrote:
>>> Is that a flag which the users have to manually add?
>>> 
>>> -Supraja
>>> 
>>>> On Thu, Dec 19, 2019 at 9:40 PM Alan Carroll <solidwallofcode@verizonmedia.com>
wrote:
>>>> I don't see "-std=c++17" which is required as of ATS 8. The header "string_view"
isn't supported in earlier versions of C++.
>>>> 
>>>>> On Thu, Dec 19, 2019 at 12:48 AM supraja sridhar <suprajasridhar95@gmail.com>
wrote:
>>>>> How can I check that?
>>>>> 
>>>>> Not sure if this helps - 
>>>>> 
>>>>> Build environment:
>>>>>   AKAMAKE_HASH = d41d8cd98f00b204e9800998ecf8427e
>>>>>   BASEOS = linux
>>>>>   CC = clang
>>>>>   CXX = clang++
>>>>>   CXXSTD = default
>>>>>   FILE_OFFSET_BITS = 32
>>>>>   GLOBAL_PIC = pic
>>>>>   OS = alsi9
>>>>>   TARGET_ARCH = x86_64
>>>>>   TARGET_CPU = classic
>>>>> 
>>>>> Compiler versions:
>>>>>   CC: clang version 5.0.2-svn328729-1~exp1~20180509124008.99 (branches/release_50)
/usr/bin/clang
>>>>>   CXX: clang version 5.0.2-svn328729-1~exp1~20180509124008.99 (branches/release_50)
/usr/bin/clang++
>>>>> 
>>>>> Global compiler flags:
>>>>>   CFLAGS:     -m64 -march=opteron -mno-3dnow -fpic -ggdb -O2 -Wall
>>>>>   CXXFLAGS:   -m64 -march=opteron -mno-3dnow -fpic -ggdb -O2
>>>>> 
>>>>> -Supraja
>>>>> 
>>>>>> On Thu, Dec 19, 2019 at 10:14 AM Leif Hedstrom <zwoop@apache.org>
wrote:
>>>>>> Are you using the right STL, from LLVM, that had full C++17 support?
>>>>>> 
>>>>>> — Leif 
>>>>>> 
>>>>>>>> On Dec 18, 2019, at 21:40, supraja sridhar <suprajasridhar95@gmail.com>
wrote:
>>>>>>>> 
>>>>>>> 
>>>>>>> Hello,
>>>>>>> 
>>>>>>> When building ATS 8.0.5 with clang-5.0 I get the following error
-
>>>>>>>>  12 make[3]: Entering directory '/home/P4CLIENTS/centaur/centaur/centaur.build/src/tscpp/util'
>>>>>>>>   11   CXX      TextView.lo
>>>>>>>>   10 In file included from TextView.cc:26:
>>>>>>>>    9 ../../../include/tscpp/util/TextView.h:37:10: fatal
error: 'string_view' file not found
>>>>>>>>    8 #include <string_view>
>>>>>>>>    7          ^~~~~~~~~~~~~
>>>>>>>>    6 1 error generated.
>>>>>>>>    5 Makefile:917: recipe for target 'TextView.lo' failed
>>>>>>>>    4 make[3]: *** [TextView.lo] Error 1
>>>>>>> 
>>>>>>> Can you please help out?
>>>>>>> 
>>>>>>> 
>>>>>>> Thanks
>>>>>>> Supraja 
>>>>> 
>>>>> 
>>>>> -- 
>>>>> Regards,
>>>>> S.SUPRAJA
>>>>> MIT
>>> 
>>> 
>>> -- 
>>> Regards,
>>> S.SUPRAJA
>>> MIT

Mime
View raw message