【发布时间】:2020-02-26 18:04:25
【问题描述】:
我正在尝试编写本教程:https://linuxgazette.net/139/peterson.html,以便我可以学习编写 postgres 函数。
它说要使用这个makefile,但失败了:
MODULES = example
PGXS := $(shell pg_config --pgxs)
include $(PGXS)
错误:
(base) weather@weather:~/pg_func_learn$ make
/tmp/build/80754af9/postgresql-split_1552510884761/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -I/home/weather/anaconda3/include -fdebug-prefix-map=/tmp/build/80754af9/postgresql-split_1552510884761/work=/usr/local/src/conda/postgresql-split-11.2 -fdebug-prefix-map=/home/weather/anaconda3=/usr/local/src/conda-prefix -fPIC -I. -I./ -I/home/weather/anaconda3/include/server -I/home/weather/anaconda3/include/internal -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -D_GNU_SOURCE -I/home/weather/anaconda3/include -c -o example.o example.c
make: /tmp/build/80754af9/postgresql-split_1552510884761/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc: Command not found
<builtin>: recipe for target 'example.o' failed
make: *** [example.o] Error 127
根据类似问题的答案,我尝试了几件事,包括更新 conda 和 anaconda。还没有任何效果。
在这种情况下如何编译 postgres 函数?
【问题讨论】:
标签: c linux postgresql makefile anaconda