Many PostgreSQL extensions are built using a build base for extensions called PGXS. Building with PGXS also generates files related to llvm. Depending on which version of llvm you are using, follow these steps:
The default version of llvm is described in "2.1 Required Operating System". If you want to use the default version of llvm, use the OSS documentation to build and install OSS.
As superuser, copy the Makefile.global corresponding to the version of llvm you want to use. The following is an example of using version 11 of llvm. Makefile.global is overwritten when an emergency fix is applied or removed from Fujitsu Enterpise Postgres, this procedure should be performed each time a build is performed.
$ su - Password:****** # cp /opt/fsepv<x>server64/lib/pgxs/src/Makefile.global-vsn11 /opt/fsepv<x>server64/lib/pgxs/src/Makefile.global
Follow the OSS documentation to build and install OSS.
As superuser, run the following command:. The following is an example of using version 11 of llvm:.
$ su - Password:****** # mv /opt/fsepv<x>server64/lib/bitcode/<OSS名>* /opt/fsepv<x>server64/lib/bitcode-vsn11/
If you do not use llvm, use the with _ llvm = no option when performing the build, as shown below. For other options, follow the OSS documentation.
# make USE_PGXS=1 with_llvm=no