Error while creating UDF function in C++

I am getting below error, when I execute below Query to create UDF.

CREATE OR REPLACE FUNCTION getDrilldownUrlUdf AS LANGUAGE 'C++' NAME 'GetDrilldownUrlFactory' LIBRARY isdb_udf;

11:24:19 [CREATE - 0 rows, 0.007 secs] [Code: 3399, SQL State: VP001] [Vertica]VJDBC ROLLBACK: Failure in UDx RPC call InvokeGetUdxType(): Error calling setupExecContext() in User Defined Object [getDrilldownUrlUdf] at [/scratch_a/release/svrtar28745/vbuild/vertica/OSS/UDxFence/vertica-udx-C++.cpp:361], error code: 0, message: Error happened in dlsym(): [/data/spinning/idmc/v_idmc_node0001_catalog/Libraries/022d6a19597c16a3a61056110a43a07600a00000025f0164/isdb_udf_022d6a19597c16a3a61056110a43a07600a00000025f0164.so: undefined symbol: getGetDrilldownUrlFactory]
... 1 statement(s) executed, 0 rows affected, exec/fetch time: 0.007/0.000 sec [0 successful, 1 errors]

I believe the below command I was executing to create isdbVerticaUdf.so has something do with it, however I was not getting any error except 2 warnings

g++ -D HAVE_LONG_INT_64 -I /opt/vertica/sdk/include -I /usr/local/include/cryptopp -Wall -shared -Wno-unused-value -fPIC DrilldownGenerator.cpp /usr/local/include/Vertica.cpp DrilldownLayouts.cpp DrilldownLinks.cpp tinyxml2.cpp Concatenate.cpp cryptopp_aes.cpp -std=gnu++0x -shared -o isdbVerticaUdf.so -Wl,--whole-archive libcryptopp.a -Wl,--no-whole-archive


  • Options

    This looks like a linking issue. One thing to check is that getGetDrilldownUrlFactory is defined correctly and not just declared.

Leave a Comment

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