[ 
https://issues.apache.org/jira/browse/MADLIB-877?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Frank McQuillan updated MADLIB-877:
-----------------------------------
    Fix Version/s:     (was: v1.15.1)

> unable to properly compile c module
> -----------------------------------
>
>                 Key: MADLIB-877
>                 URL: https://issues.apache.org/jira/browse/MADLIB-877
>             Project: Apache MADlib
>          Issue Type: Request
>            Reporter: Mohamed Awad
>            Assignee: Rahul Iyer
>            Priority: Trivial
>
> hi,
> I am trying to add a new C module called dbscan.
> I added my c files in src/modules/dbscan
> here is a snap from the main header file of file dbscan_main.h:
>       
>       #include "link_linkedlist.h"
>       #include "linkedlist.h"
>       #include "kdtree.h"
>       #include "dbscan.h"
>       //rest of include files
>       Datum madlib_dbscan(PG_FUNCTION_ARGS);
>       //rest of functions declarations
> I added the following line in src/modules/declarations.hpp
>       #include "dbscan/dbscan_main.h"
> I also added the following line to src/config/modules.yml
>       - name: dbscan
> I also added my sql_in and py_in  into src/ports/postgres/modules/dbscan/
> thats my function create syntax:
> CREATE OR REPLACE FUNCTION MADLIB_SCHEMA.dbscan_c_function
>     (
>     TEXT,
>     SMALLINT,
>     REAL
>     )
> RETURNS SETOF RECORD AS 
> '/usr/local/madlib/Versions/1.6/ports/postgres/9.3/lib/libmadlib.so', 
> 'madlib_dbscan'
> LANGUAGE C STRICT IMMUTABLE
> m4_ifdef(`__HAS_FUNCTION_PROPERTIES__', `NO SQL', `');
> The thing is when I run make and make install my sql_in and py_in files are 
> read successfully but the c files are not added to libmadlib.so, I know that 
> because when i try to install madlib to a specific database this error shows 
> up
>       madpack.py : INFO : > - dbscan
>       madpack.py : ERROR : Failed executing 
> /tmp/madlib.IK027m/dbscan/dbscan.sql_in.tmp
>       madpack.py : ERROR : Check the log at 
> /tmp/madlib.IK027m/dbscan/dbscan.sql_in.log
>       madpack.py : INFO : Rolling back the installation...
>       madpack.py : INFO : Rollback finished successfully.
>       madpack.py : ERROR : MADlib installation failed.
> and when I open the log file I get this message:
>       ERROR:  psql:/tmp/madlib.og0rC1/dbscan/dbscan.sql_in.tmp:94: ERROR:  
> could not load library 
> "/usr/local/madlib/Versions/1.6/ports/postgres/9.3/lib/libmadlib.so": 
> /usr/local/madlib/Versions/1.6/ports/postgres/9.3/lib/libmadlib.so: undefined 
> symbol: _ZN6madlib11dbconnector8postgres7AnyType22sLazyConversionToDatumE
> I am using ubuntu 14.04, postgresql 9.3.5 and madlib 1.6
> Any suggestions?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to