Options

Agg_Concatenate not compiling in 9.3

Hi,We have upgraded our vertica to 9.3 version and when compiling the Agg_Concatenate function(Concatenate.cpp) it is giving compile error which is running fine in Vertica 9.2.Below are the errors,Any suggestion.

$ g++ -D HAVE_LONG_INT_64 -I /opt/vertica/sdk/include -Wall -shared -Wno-unused-value -fPIC -o /opt/app/vertica/sdk/examples/AggregateFunctions/Concatenate.so Concatenate.cpp /opt/vertica/sdk/include/Vertica.cpp
In file included from /opt/vertica/sdk/include/Vertica.h:74:0,
from Concatenate.cpp:7:
/opt/vertica/sdk/include/BuildAssertions.h:48:10: error: #error "Vertica requires C++11 compatibility."
#error "Vertica requires C++11 compatibility."
^
In file included from /usr/include/c++/4.8.2/atomic:38:0,
from /opt/vertica/sdk/include/VerticaUDx.h:62,
from /opt/vertica/sdk/include/Vertica.h:76,
from Concatenate.cpp:7:
/usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the \
^
In file included from /usr/include/c++/4.8.2/atomic:41:0,
from /opt/vertica/sdk/include/VerticaUDx.h:62,
from /opt/vertica/sdk/include/Vertica.h:76,
from Concatenate.cpp:7:
/usr/include/c++/4.8.2/bits/atomic_base.h:70:3: error: ‘constexpr’ does not name a type
constexpr memory_order
^
/usr/include/c++/4.8.2/bits/atomic_base.h:70:3: note: C++11 ‘constexpr’ only available with -std=c++11 or -std=gnu++11
/usr/include/c++/4.8.2/bits/atomic_base.h:76:3: error: ‘constexpr’ does not name a type
constexpr memory_order

Tagged:

Best Answers

Answers

  • Options
    LenoyJLenoyJ - Select Field - Employee

    Basically what the error says, try adding -std=c++11 or -std=gnu++11 to the compiler options.
     
    More info on what changed in UDx development in 9.3:
    https://www.vertica.com/docs/9.3.x/HTML/Content/Authoring/NewFeatures/9.3/9.3.0/SDKUpdates.htm
    https://www.vertica.com/docs/9.3.x/HTML/Content/Authoring/ExtendingVertica/C++/CompilingC++.htm

  • Options
    cp00634326cp00634326 Vertica Customer

    Thanks Lenoy..But i have tried with that but giving error.
    $ g++ -std=c++11 -D HAVE_LONG_INT_64 -I /opt/vertica/sdk/include -Wall -shared -Wno-unused-value -fPIC -o /opt/vertica/sdk/examples/AggregateFunctions/Concatenate.so Concatenate.cpp /opt/vertica/sdk/include/Vertica.cpp
    cc1plus: error: unrecognized command line option "-std=c++11"
    cc1plus: error: unrecognized command line option "-std=c++11"

  • Options
    cp00634326cp00634326 Vertica Customer

    Hi Bryan,The version is one step lower and planning to upgrade.Current version:
    $ g++ --version
    g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23)
    Copyright (C) 2010 Free Software Foundation, Inc.

    Could you please tell after the upgrade do i need to add -std=c++11 in g++ command.

    thanks

  • Options
    cp00634326cp00634326 Vertica Customer

    Thanks lenoy and Bryan for sharing,Will update once done with upgrade gcc...thanks again

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file