Re: Ayuda con plr R-Project

From: Luis A(dot) Zevallos Cárdenas <lzevallos(at)lobosistemas(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: posgres <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: Ayuda con plr R-Project
Date: 2009-06-05 17:55:41
Message-ID: ae5556ce0906051055i17c68591n15099590cfc4e33d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Ya lo adjunte el archivo makefile
tambien ya hize:
# export R_HOME=/usr/local/R

Pero sigue igual.

************************************Makefile*******************************************
# location of R library

ifdef R_HOME
r_libdir1x = ${R_HOME}/bin
r_libdir2x = ${R_HOME}/lib
# location of R includes
r_includespec = ${R_HOME}/include
rhomedef = ${R_HOME}
else
R_HOME := $(shell pkg-config --variable=rhome libR)
r_libdir1x := $(shell pkg-config --variable=rlibdir libR)
r_libdir2x := $(shell pkg-config --variable=rlibdir libR)
r_includespec := $(shell pkg-config --variable=rincludedir libR)
rhomedef := $(shell pkg-config --variable=rhome libR)
endif

ifneq (,${R_HOME})

MODULE_big := plr
PG_CPPFLAGS += -I$(r_includespec)
SRCS += plr.c pg_conversion.c pg_backend_support.c pg_userfuncs.c
pg_rsupport.c
OBJS := $(SRCS:.c=.o)

SHLIB_LINK += -L$(r_libdir1x) -L$(r_libdir2x) -lR

DATA_built := plr.sql
DOCS := README.plr
REGRESS := plr
EXTRA_CLEAN := doc/HTML.index

ifdef USE_PGXS
ifndef PG_CONFIG
PG_CONFIG := pg_config
endif
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/plr
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif

ifeq ($(PORTNAME), darwin)
DYSUFFIX = dylib
DLPREFIX = libR
else
ifeq ($(PORTNAME), win32)
DLPREFIX = R
else
DLPREFIX = libR
endif
endif

# we can only build PL/R if libR is available
# Since there is no official way to determine this,
# we see if there is a file that is named like a shared library.
ifneq ($(PORTNAME), darwin)
ifneq (,$(wildcard $(r_libdir1x)/$(DLPREFIX)*$(DLSUFFIX)*)$(wildcard
$(r_libdir2x)/$(DLPREFIX)*$(DLSUFFIX)*))
shared_libr = yes;
endif
else
ifneq (,$(wildcard $(r_libdir1x)/$(DLPREFIX)*$(DYSUFFIX)*)$(wildcard
$(r_libdir2x)/$(DLPREFIX)*$(DYSUFFIX)*))
shared_libr = yes
endif
endif
# If we don't have a shared library and the platform doesn't allow it
# to work without, we have to skip it.
ifneq (,$(findstring yes, $(shared_libr)$(allow_nonpic_in_shlib)))

override CPPFLAGS := -I"$(srcdir)" -I"$(r_includespec)" $(CPPFLAGS)
override CPPFLAGS += -DPKGLIBDIR=\"$(pkglibdir)\" -DDLSUFFIX=\"$(DLSUFFIX)\"
override CPPFLAGS += -DR_HOME_DEFAULT=\"$(rhomedef)\"

else # can't build

all:
@echo ""; \
echo "*** Cannot build PL/R because libR is not a shared library."
; \
echo "*** You might have to rebuild your R installation. Refer
to"; \
echo "*** the documentation for details."; \
echo ""

endif # can't build - cannot find libR

else # can't build - no R_HOME

all:
@echo ""; \
echo "*** Cannot build PL/R because R_HOME cannot be found." ; \
echo "*** Refer to the documentation for details."; \
echo ""

endif
*****************************************************************************************

El 5 de junio de 2009 12:40, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>escribió:

> Luis A. Zevallos Cárdenas escribió:
>
> > luis(at)lobosrvr:/usr/postgres/8.3/share/contrib/plr# make
> > make: Fatal error in reader: Makefile, line 4: Unexpected end of line
> seen
> > luis(at)lobosrvr:/usr/postgres/8.3/share/contrib/plr#
>
> Adjunta el archivo Makefile por favor ...
>
> --
> Alvaro Herrera
> http://www.amazon.com/gp/registry/3BP7BYG9PUGI8
> "On the other flipper, one wrong move and we're Fatal Exceptions"
> (T.U.X.: Term Unit X - http://www.thelinuxreview.com/TUX/)
>

--
Luis Zevallos
DBA Administrador de DB & SRVR
Lobo Sistemas S.A.C
tel: +5154958310833
http://www.lobosistemas.com

Attachment Content-Type Size
Makefile application/octet-stream 2.5 KB

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alvaro Herrera 2009-06-05 17:57:14 Re: Como identificar un tipo de dato
Previous Message Alvaro Herrera 2009-06-05 17:40:37 Re: Ayuda con plr R-Project