Skip to main content

errors when trying to use R functions with vertica vm

  • May 1, 2014
  • 2 replies
  • 19 views

Pontii_Pilat
[dbadmin@vertica examples]$ vsql -f RFunctions.sql
Password:
vsql:RFunctions.sql:11: ROLLBACK 3399:  Failure in UDx RPC call InvokeSetExecContext(): Error calling setupExecContext() in User Defined Object [] at [/scratch_a/release/vbuild/vertica/OSS/UDxFence/vertica-udx-C++.cpp:180], error code: 0, message: Error happened in dlopen(): [/opt/vertica/sdk/examples/RFunctions/RFunctions.R: invalid ELF header]
vsql:RFunctions.sql:11: ERROR 4856:  Syntax error at or near "LANGUAGE" at character 1
vsql:RFunctions.sql:11: LINE 1: LANGUAGE 'R';
vsql:RFunctions.sql:11:         ^
vsql:RFunctions.sql:15: ROLLBACK 3861:  Library not found: rlib
vsql:RFunctions.sql:18: ROLLBACK 3861:  Library not found: rlib
CREATE TABLE
vsql:RFunctions.sql:33: ERROR 3457:  Function Rmul(float, float) does not exist, or permission is denied for Rmul(float, float)
HINT:  No function matches the given name and argument types. You may need to add explicit type casts
DROP TABLE
CREATE TABLE
vsql:RFunctions.sql:53: ERROR 3457:  Function Kmeans(float, float) does not exist, or permission is denied for Kmeans(float, float)
HINT:  No function matches the given name and argument types. You may need to add explicit type casts
DROP TABLE
vsql:RFunctions.sql:59: ROLLBACK 3855:  Library "rLib" does not exist


2 replies

Rahul_Choudhary
Forum|alt.badge.img
  • Participating Frequently
  • May 1, 2014
Hi Pontii

"invalid ELF header" is a C++-UDx error. (which is a native-library error; Vertica supports native libraries written in C++.) It looks like you've tried to load the library as a C++ library. In your CREATE LIBRARY statement, you should specify 'R' as the language.

Regards
Rahul

Pontii_Pilat
  • Author
  • New Participant
  • May 1, 2014
i am using example supplied with vertica - in /opt/vertica/sdk/examples and i am following readme.txt instructions on running example vsql -f RFunctions.sql
i had installed R language pack as per vertica instructions vertica-R-lang...rpm and i am using Vertica CE community edition - VM