hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j.@apache.org
Subject incubator-hawq git commit: Revert "Support --enable-orca [#105338218]"
Date Mon, 14 Mar 2016 21:35:07 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master a48600a12 -> d5e7b9270


Revert "Support --enable-orca [#105338218]"

This reverts commit a48600a125eed2a3da00133d6f5f8dad22d4a6a4.


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/d5e7b927
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/d5e7b927
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/d5e7b927

Branch: refs/heads/master
Commit: d5e7b927020b80b812cd66f1416336d649f3bcc9
Parents: a48600a
Author: C.J. Jameson <cjameson@pivotal.io>
Authored: Mon Mar 14 14:34:00 2016 -0700
Committer: C.J. Jameson <cjameson@pivotal.io>
Committed: Mon Mar 14 14:34:00 2016 -0700

----------------------------------------------------------------------
 configure                          | 34 ++++++++++++++++++++++++++++++++
 configure.in                       | 35 +++++++++++++++++++++++++++++++++
 src/backend/Makefile               | 19 +++++++++---------
 src/backend/gpopt/Makefile         | 25 +++++++++++++----------
 src/backend/gpopt/gpopt.mk         | 24 ++++++++++------------
 src/bin/gpcheckhdfs/Makefile       |  2 +-
 src/bin/gpfilesystem/hdfs/Makefile |  2 +-
 7 files changed, 105 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d5e7b927/configure
----------------------------------------------------------------------
diff --git a/configure b/configure
index 5669406..5135536 100755
--- a/configure
+++ b/configure
@@ -731,6 +731,11 @@ with_perl
 with_tcl
 enable_thread_safety
 INCLUDES
+ORCA_DEPENDS_OPTIMIZER_VER
+ORCA_DEPENDS_LIBGPOS_VER
+ORCA_DEPENDS_XERCES_VER
+ORCA_DEPENDS_OBJDIR_DEFAULT
+ORCA_DEPENDS_DIR_INTER
 enable_orca
 enable_email
 enable_gphdfs
@@ -5517,6 +5522,35 @@ fi
 
 
 
+if test "$enable_orca" = yes ; then
+
+	if test -z "$ORCA_DEPENDS_DIR" ; then
+		as_fn_error $? "orca is enabled but ORCA_DEPENDS_DIR is not set" "$LINENO" 5]
+	fi
+
+	if test -z "$ORCA_OBJDIR_DEFAULT" ; then
+		as_fn_error $? "orca is enabled but ORCA_OBJDIR_DEFAULT is not set" "$LINENO" 5]
+	fi
+
+	if test -z "$XERCES_VER" ; then
+		as_fn_error $? "orca is enabled but XERCES_VER is not set" "$LINENO" 5]
+	fi
+
+	if test -z "$LIBGPOS_VER" ; then
+		as_fn_error $? "orca is enabled but LIBGPOS_VER is not set" "$LINENO" 5]
+	fi
+
+	if test -z "$OPTIMIZER_VER" ; then
+		as_fn_error $? "orca is enabled but OPTIMIZER_VER is not set" "$LINENO" 5]
+	fi
+
+    ORCA_DEPENDS_DIR_INTER="$ORCA_DEPENDS_DIR"
+    ORCA_DEPENDS_OBJDIR_DEFAULT="$ORCA_OBJDIR_DEFAULT"
+    ORCA_DEPENDS_XERCES_VER="$XERCES_VER"
+    ORCA_DEPENDS_LIBGPOS_VER="$LIBGPOS_VER"
+    ORCA_DEPENDS_OPTIMIZER_VER="$OPTIMIZER_VER"
+fi
+
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d5e7b927/configure.in
----------------------------------------------------------------------
diff --git a/configure.in b/configure.in
index 489187e..cda7bad 100644
--- a/configure.in
+++ b/configure.in
@@ -639,6 +639,41 @@ PGAC_ARG_BOOL(enable, orca, no, [  --enable-orca        enable Pivotal
Query Opt
                          [Define to 1 to build with Pivotal Query Optimizer. (--enable-orca)])])
 AC_SUBST(enable_orca)
 
+if test "$enable_orca" = yes ; then
+
+	if test -z "$ORCA_DEPENDS_DIR" ; then
+		AC_MSG_ERROR([orca is enabled but ORCA_DEPENDS_DIR is not set])]
+	fi
+
+	if test -z "$ORCA_OBJDIR_DEFAULT" ; then
+		AC_MSG_ERROR([orca is enabled but ORCA_OBJDIR_DEFAULT is not set])]
+	fi
+	
+	if test -z "$XERCES_VER" ; then
+		AC_MSG_ERROR([orca is enabled but XERCES_VER is not set])]
+	fi
+	
+	if test -z "$LIBGPOS_VER" ; then
+		AC_MSG_ERROR([orca is enabled but LIBGPOS_VER is not set])]
+	fi
+	
+	if test -z "$OPTIMIZER_VER" ; then
+		AC_MSG_ERROR([orca is enabled but OPTIMIZER_VER is not set])]
+	fi
+
+    ORCA_DEPENDS_DIR_INTER="$ORCA_DEPENDS_DIR"
+    ORCA_DEPENDS_OBJDIR_DEFAULT="$ORCA_OBJDIR_DEFAULT"
+    ORCA_DEPENDS_XERCES_VER="$XERCES_VER"
+    ORCA_DEPENDS_LIBGPOS_VER="$LIBGPOS_VER"
+    ORCA_DEPENDS_OPTIMIZER_VER="$OPTIMIZER_VER"
+fi
+
+AC_SUBST(ORCA_DEPENDS_DIR_INTER)
+AC_SUBST(ORCA_DEPENDS_OBJDIR_DEFAULT)
+AC_SUBST(ORCA_DEPENDS_XERCES_VER)
+AC_SUBST(ORCA_DEPENDS_LIBGPOS_VER)
+AC_SUBST(ORCA_DEPENDS_OPTIMIZER_VER)
+
 #
 # Include directories
 #

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d5e7b927/src/backend/Makefile
----------------------------------------------------------------------
diff --git a/src/backend/Makefile b/src/backend/Makefile
index f462510..8460b76 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -52,15 +52,15 @@ LIBS := $(filter-out -lpgport, $(LIBS)) $(LDAP_LIBS_BE) $(CONNECTEMCLIB)
 
 # The backend doesn't need everything that's in LIBS, however
 LIBS := $(filter-out -lreadline -ledit -ltermcap -lncurses -lcurses, $(LIBS))
-LIBS := -lprotobuf -lboost_thread-mt -lboost_system -lboost_date_time -lstdc++ -lhdfs3 -lgsasl
-lxml2 $(LIBS)
+LIBS := -lprotobuf -lboost_thread -lboost_system -lboost_date_time -lstdc++ -lhdfs3 -lgsasl
-lxml2 $(LIBS)
 
 # adding orca libraries
 ifeq ($(enable_orca),yes)
-LIBS := $(LIBS) -lgpos
-LIBS := $(LIBS) -lxerces-c
-LIBS := $(LIBS) -lnaucrates
-LIBS := $(LIBS) -lgpdbcost
-LIBS := $(LIBS) -lgpopt
+LIBS := $(LIBS) -L$(ORCA_DEPENDS_DIR_INTER)/libgpos/$(ORCA_DEPENDS_OBJDIR_DEFAULT) -lgpos
+LIBS := $(LIBS) -L$(ORCA_DEPENDS_DIR_INTER)/lib -lxerces-c
+LIBS := $(LIBS) -L$(ORCA_DEPENDS_DIR_INTER)/libnaucrates/$(ORCA_DEPENDS_OBJDIR_DEFAULT) -lnaucrates
+LIBS := $(LIBS) -L$(ORCA_DEPENDS_DIR_INTER)/libgpdbcost/$(ORCA_DEPENDS_OBJDIR_DEFAULT) -lgpdbcost
+LIBS := $(LIBS) -L$(ORCA_DEPENDS_DIR_INTER)/libgpopt/$(ORCA_DEPENDS_OBJDIR_DEFAULT) -lgpopt
 LIBS := $(LIBS) -L$(top_builddir)/src/backend/gpopt -ldxltranslators
 endif
 
@@ -213,6 +213,9 @@ ifeq ($(MAKE_DLL), true)
 	$(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
 endif
 endif
+ifeq ($(enable_orca),yes)
+	$(MAKE) -C gpopt install
+endif
 	$(MAKE) -C catalog install-data
 	$(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample'
 	$(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample'
@@ -225,10 +228,6 @@ endif
 	${INSTALL_DATA} $(srcdir)/utils/misc/etc/slaves ${sysconfdir}
 	${INSTALL_DATA} $(srcdir)/utils/misc/etc/template-hawq-site.xml ${sysconfdir}
 	${INSTALL_DATA} $(srcdir)/utils/misc/etc/gpcheck.cnf ${sysconfdir}
-ifeq ($(enable_orca), yes)
-	$(MAKE) -C gpopt $@ INSTLOC=$(DESTDIR)$(libdir)
-endif
-
 
 install-bin: postgres $(POSTGRES_IMP) installdirs
 	$(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)'

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d5e7b927/src/backend/gpopt/Makefile
----------------------------------------------------------------------
diff --git a/src/backend/gpopt/Makefile b/src/backend/gpopt/Makefile
index a7ffa87..b587ffd 100644
--- a/src/backend/gpopt/Makefile
+++ b/src/backend/gpopt/Makefile
@@ -39,24 +39,29 @@ else
 	GPOPT_UDF_FLAGS := -shared
 endif
 
+LIBGPOS_DIR = $(ORCA_DEPENDS_DIR_INTER)/libgpos
+LIBNAUCRATES_DIR = $(ORCA_DEPENDS_DIR_INTER)/libnaucrates
+LIBGPDBCOST_DIR = $(ORCA_DEPENDS_DIR_INTER)/libgpdbcost
+LIBGPOPT_DIR = $(ORCA_DEPENDS_DIR_INTER)/libgpopt
+
 include $(top_srcdir)/src/backend/common.mk
 
 libdxltranslators.$(LDSFX): $(SUBDIROBJS) $(OBJS)
 	$(CXX) $(CXXFLAGS) $(LDLIBFLAGS) \
-	  -lgpos \
-	  -lxerces-c \
-	  -lnaucrates \
-	  -lgpdbcost \
-	  -lgpopt -lpthread -o $@ \
+	  -L$(LIBGPOS_DIR)/$(ORCA_DEPENDS_OBJDIR_DEFAULT) -lgpos \
+	  -L$(ORCA_DEPENDS_DIR_INTER)/lib -lxerces-c \
+	  -L$(LIBNAUCRATES_DIR)/$(ORCA_DEPENDS_OBJDIR_DEFAULT) -lnaucrates \
+	  -L$(LIBGPDBCOST_DIR)/$(ORCA_DEPENDS_OBJDIR_DEFAULT) -lgpdbcost \
+	  -L$(LIBGPOPT_DIR)/$(ORCA_DEPENDS_OBJDIR_DEFAULT) -lgpopt -lpthread -o $@ \
 	  $(SUBDIROBJS) $(OBJS)
 
 libgpoptudf.$(LDSFX): $(SUBDIROBJS)
 	$(CXX) $(CXXFLAGS) $(GPOPT_UDF_FLAGS) \
-	  -lxerces-c \
-	  -lgpos \
-	  -lnaucrates \
-	  -lgpdbcost \
-	  -lgpopt \
+	  -L$(ORCA_DEPENDS_DIR_INTER)/lib -lxerces-c \
+	  -L$(LIBGPOS_DIR)/$(ORCA_DEPENDS_OBJDIR_DEFAULT) -lgpos \
+	  -L$(LIBNAUCRATES_DIR)/$(ORCA_DEPENDS_OBJDIR_DEFAULT) -lnaucrates \
+	  -L$(LIBGPDBCOST_DIR)/$(ORCA_DEPENDS_OBJDIR_DEFAULT) -lgpdbcost \
+	  -L$(LIBGPOPT_DIR)/$(ORCA_DEPENDS_OBJDIR_DEFAULT) -lgpopt \
 	  -o $@ ./utils/funcs.o
 
 install:

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d5e7b927/src/backend/gpopt/gpopt.mk
----------------------------------------------------------------------
diff --git a/src/backend/gpopt/gpopt.mk b/src/backend/gpopt/gpopt.mk
index 0099667..6c77d2f 100644
--- a/src/backend/gpopt/gpopt.mk
+++ b/src/backend/gpopt/gpopt.mk
@@ -25,8 +25,6 @@
 
 UNAME = $(shell uname)
 UNAME_P = $(shell uname -p)
-UNAME_M = $(shell uname -m)
-
 ARCH_OS = GPOS_$(UNAME)
 ARCH_CPU = GPOS_$(UNAME_P)
 
@@ -43,9 +41,8 @@ ifeq "$(BLD_TYPE)" "opt"
 	GPOPT_flags = -O3 -fno-omit-frame-pointer -g3
 endif
 
-ifeq (x86_64, $(UNAME_M))
-	ARCH_BIT = GPOS_64BIT
-else
+ARCH_BIT = GPOS_64BIT
+ifeq (Darwin, $(UNAME))
 	ARCH_BIT = GPOS_32BIT
 endif
 
@@ -55,15 +52,14 @@ else
 	ARCH_FLAGS = -m64
 endif
 
-GREP_SED_VAR = $(top_builddir)/src/backend/gpopt/ivy.xml | sed -e 's|\(.*\)rev="\(.*\)"[
]*conf\(.*\)|\2|'
-
-XERCES_VER  = $(shell grep "\"xerces-c\""   $(GREP_SED_VAR))
-LIBGPOS_VER = $(shell grep "\"libgpos\""    $(GREP_SED_VAR))
-OPTIMIZER_VER = $(shell grep "\"optimizer\""  $(GREP_SED_VAR))
-
 BLD_FLAGS = $(ARCH_FLAGS) -D$(ARCH_BIT) -D$(ARCH_CPU) -D$(ARCH_OS) $(GPOPT_flags)
 override CPPFLAGS := -fPIC $(CPPFLAGS)
 override CPPFLAGS := $(BLD_FLAGS)  $(CPPFLAGS)
-override CPPFLAGS := -DGPOS_VERSION=\"$(LIBGPOS_VER)\" $(CPPFLAGS)
-override CPPFLAGS := -DGPOPT_VERSION=\"$(OPTIMIZER_VER)\" $(CPPFLAGS)
-override CPPFLAGS := -DXERCES_VERSION=\"$(XERCES_VER)\" $(CPPFLAGS)
+override CPPFLAGS := -DGPOS_VERSION=\"$(ORCA_DEPENDS_LIBGPOS_VER)\" $(CPPFLAGS)
+override CPPFLAGS := -DGPOPT_VERSION=\"$(ORCA_DEPENDS_OPTIMIZER_VER)\" $(CPPFLAGS)
+override CPPFLAGS := -DXERCES_VERSION=\"$(ORCA_DEPENDS_XERCES_VER)\" $(CPPFLAGS)
+override CPPFLAGS := -I $(ORCA_DEPENDS_DIR_INTER)/include $(CPPFLAGS)
+override CPPFLAGS := -I $(ORCA_DEPENDS_DIR_INTER)/libgpos/include $(CPPFLAGS)
+override CPPFLAGS := -I $(ORCA_DEPENDS_DIR_INTER)/libgpopt/include $(CPPFLAGS)
+override CPPFLAGS := -I $(ORCA_DEPENDS_DIR_INTER)/libnaucrates/include $(CPPFLAGS)
+override CPPFLAGS := -I $(ORCA_DEPENDS_DIR_INTER)/libgpdbcost/include $(CPPFLAGS)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d5e7b927/src/bin/gpcheckhdfs/Makefile
----------------------------------------------------------------------
diff --git a/src/bin/gpcheckhdfs/Makefile b/src/bin/gpcheckhdfs/Makefile
index 0b88600..cd81902 100644
--- a/src/bin/gpcheckhdfs/Makefile
+++ b/src/bin/gpcheckhdfs/Makefile
@@ -20,7 +20,7 @@ subdir = src/bin/gpcheckhdfs
 top_builddir = ../../..
 include $(top_builddir)/src/Makefile.global
 
-LIBS := -lprotobuf -lboost_thread-mt -lboost_system -lboost_date_time -lstdc++ -lhdfs3 -lgsasl
$(LIBS)
+LIBS := -lprotobuf -lboost_thread -lboost_system -lboost_date_time -lstdc++ -lhdfs3 -lgsasl
$(LIBS)
 
 OBJS=gpcheckhdfs.o 
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d5e7b927/src/bin/gpfilesystem/hdfs/Makefile
----------------------------------------------------------------------
diff --git a/src/bin/gpfilesystem/hdfs/Makefile b/src/bin/gpfilesystem/hdfs/Makefile
index 2399789..b0fb359 100644
--- a/src/bin/gpfilesystem/hdfs/Makefile
+++ b/src/bin/gpfilesystem/hdfs/Makefile
@@ -24,7 +24,7 @@ OBJS       = gpfshdfs.o
 
 PG_CPPFLAGS = -I$(libpq_srcdir)
 PG_LIBS = $(libpq_pgport)
-SHLIB_LINK = -lprotobuf -lboost_thread-mt -lboost_system -lboost_date_time -lstdc++ -lhdfs3
+SHLIB_LINK = -lprotobuf -lboost_thread -lboost_system -lboost_date_time -lstdc++ -lhdfs3
 
 ifdef USE_PGXS
 PGXS := $(shell pg_config --pgxs)


Mime
View raw message