Building FilterFunctions in Vertica 9.1.0-1 Fails

Terry_CaudillTerry_Caudill Registered User

Environment:
Vertica BYOL, Amazon Linux 2.0 Version: 9.1.0-1

I was able to build the filter functions in Vertica 9.0 (though it was on CentOS), but when I attempt in Vertica 9.1.0-1 I am getting the following:

cd /opt/vertica/sdk/examples
make

g++ -I /opt/vertica/sdk/include -I HelperLibraries -g -Wall -Wno-unused-value -shared -fPIC -o /opt/vertica/sdk/examples/build/ScalarFunctions.so ScalarFunctions/.cpp /opt/vertica/sdk/include/Vertica.cpp
In file included from /opt/vertica/sdk/include/Vertica.h:75:0,
from ScalarFunctions/Add2Ints.cpp:7:
/opt/vertica/sdk/include/VerticaUDx.h: In member function ‘void Vertica::UDXObject::cancelUDX(Vertica::ServerInterface&)’:
/opt/vertica/sdk/include/VerticaUDx.h:2305:57: error: operand type ‘bool
’ is incompatible with argument 1 of ‘__sync_fetch_and_or’
if (!__sync_fetch_and_or(&(this->canceled), true)) {
^
In file included from /opt/vertica/sdk/include/Vertica.h:75:0,
from ScalarFunctions/AddAnyInts.cpp:9:
/opt/vertica/sdk/include/VerticaUDx.h: In member function ‘void Vertica::UDXObject::cancelUDX(Vertica::ServerInterface&)’:
/opt/vertica/sdk/include/VerticaUDx.h:2305:57: error: operand type ‘bool*’ is incompatible with argument 1 of ‘__sync_fetch_and_or’
if (!__sync_fetch_and_or(&(this->canceled), true)) {
^

Comments

  • Terry_CaudillTerry_Caudill Registered User

    So its complaining about the first argument type for __sync_fetch_and_or(). This code is in the VerticaUDx.h:

    void cancelUDX(ServerInterface &srvInterface) {
         if (!__sync_fetch_and_or(&(this->canceled), true)) {                                                                                                                          
         cancel(srvInterface);
      }
    }
    

    I convert the first arg to an integer and it compiles:

    void cancelUDX(ServerInterface &srvInterface) {
      int local_canceled = this->canceled !=0 ? 1 : 0;
      if (!__sync_fetch_and_or(&local_canceled, true)) {
         cancel(srvInterface);
      }
    }
    

    Don't know if this is what is expected at runtime.

Leave a Comment

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