每当我尝试编译uuid-ossp packege时,都会出错。
我试图在REDHAt os rpm -qa中安装软件包。 grep lib64ossp lib64ossp-uuid16-1.6.2-10.x86_64
$:/optware/postgres/postgresql-11.2/contrib/uuid-ossp>make
make -C ../../src/backend generated-headers
make[1]: Entering directory `/optware/postgres/postgresql-11.2/src/backend'
make -C catalog distprep generated-header-symlinks
make[2]: Entering directory `/optware/postgres/postgresql-11.2/src/backend/catalog'
make[2]: Nothing to be done for `distprep'.
make[2]: Nothing to be done for `generated-header-symlinks'.
make[2]: Leaving directory `/optware/postgres/postgresql-11.2/src/backend/catalog'
make -C utils distprep generated-header-symlinks
make[2]: Entering directory `/optware/postgres/postgresql-11.2/src/backend/utils'
make[2]: Nothing to be done for `distprep'.
make[2]: Nothing to be done for `generated-header-symlinks'.
make[2]: Leaving directory `/optware/postgres/postgresql-11.2/src/backend/utils'
make[1]: Leaving directory `/optware/postgres/postgresql-11.2/src/backend'
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I../../contrib/pgcrypto -I. -I. -I../../src/include -D_GNU_SOURCE -c -o uuid-ossp.o uuid-ossp.c
uuid-ossp.c:37:2: error: #error "please use configure's --with-uuid switch to select a UUID library"
#error "please use configure's --with-uuid switch to select a UUID library"
^
uuid-ossp.c: In function âuuid_generate_internalâ:
uuid-ossp.c:282:5: error: unknown type name âuuid_tâ
uuid_t uu;
^
uuid-ossp.c:283:23: error: âuuid_s_okâ undeclared (first use in this function)
uint32_t status = uuid_s_ok;
^
答案 0 :(得分:0)
如果不使用源树来构建contrib模块,则必须设置USE_PGXS
:
PATH=/path/to/postgres/binaries:$PATH make USE_PGXS=1
该路径必须包含pg_config
可执行文件。
为确保其正常工作,请使用与已安装的PostgreSQL相同的主要版本的contrib源。