OSX 10.13下,编译pg_pathman 会报错。
解决stdio.h无法找到的问题。
sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
解决'openssl/ssl.h' file not found的错误。
brew install openssl
编辑 pg_pathman 目录下的Makefile文件,在以下代码
ifdef USE_PGXS
override PG_CPPFLAGS += -I$(CURDIR)/src/include
else
override PG_CPPFLAGS += -I$(top_srcdir)/$(subdir)/src/include
endif
下面加入以下代码:
override PG_CPPFLAGS += -I/usr/local/opt/openssl/include
备忘记录。
报这个错误:
/opt/local/bin/gmkdir: No such file or directory
brew install coreutils
解决。
禁用LLVM相关编译
参照:https://github.com/digoal/blog/blob/master/201808/20180825_01.md
最简单的方法,可以关闭新增插件的bc编译项来解决
vi /usr/pgsql-11/lib/pgxs/src/makefiles/pgxs.mk
mac 下
sudo vim /Library/PostgreSQL/13/lib/postgresql/pgxs/src/makefiles/pgxs.mk
注释所有llvm相关即可
#ifeq ($(with_llvm), yes)
#all: $(addsuffix .bc, $(MODULES)) $(patsubst %.o,%.bc, $(OBJS))
#endif
#ifeq ($(with_llvm), yes)
# $(foreach mod, $(MODULES), $(call install_llvm_module,$(mod),$(mod).bc))
#endif # with_llvm
#ifeq ($(with_llvm), yes)
# $(call install_llvm_module,$(MODULE_big),$(OBJS))
#endif # with_llvm
#ifeq ($(with_llvm), yes)
# $(foreach mod, $(MODULES), $(call uninstall_llvm_module,$(mod)))
#endif # with_llvm
#ifeq ($(with_llvm), yes)
# $(call uninstall_llvm_module,$(MODULE_big))
#endif # with_llvm