Error I create UDx C++ SearchAndReplace Function
I compiled C++ library in the directory of /opt/vertica/sdk/examples/FilterFunctions/
by the The following command:
g++ -D HAVE_LONG_INT_64 -I /opt/vertica/sdk/examples/HelperLibraries/ -I /opt/vertica/sdk/include -Wall -shared -Wno-unused-value -fPIC -o SearchAndReplaceFilter.so /opt/vertica/sdk/include/Vertica.cpp SearchAndReplaceFilter.cpp
Then I create library in Vertica:
CREATE LIBRARY ReplaceFunction AS '/opt/vertica/sdk/examples/FilterFunctions/SearchAndReplaceFilter.so';
CREATE LIBRARY
And I create function in Vertica:
CREATE FUNCTION SearchAndReplace AS LANGUAGE 'C++' NAME 'SearchAndReplace' LIBRARY ReplaceFunction;
Error :
ROLLBACK 3399: Failure in UDx RPC call InvokeSetExecContext(): Error calling setupExecContext() in User Defined Object [SearchAndReplace] at [/scratch_a/release/12270/vbuild/vertica/OSS/UDxFence/vertica-udx-C++.cpp:301], error code: 0, message: Error happened in dlsym(): [/vertica_data/cpcimdb/v_cpcimdb_node0001_catalog/Libraries/02cc1be367654d3927bcea31f0a8e1e000a000000013c47e/ReplaceFunction_02cc1be367654d3927bcea31f0a8e1e000a000000013c47e.so: undefined symbol: getSearchAndReplace]
Anyone can help me?
0