imcs: Can't rebuild using make option USE_DISK=1
Hi,
I wanted to test the disk mode so I edited the install.sh file to include the USE_DISK=1 option like below and executed it, but it results in some errors.
PATH=/usr/local/pgsql/bin/:$PATH make USE_PGXS=1 CFLAGS="-O3 -Wall -Wno-format-security" LDFLAGS="-pthread" USE_DISK=1 install
Errors:
gcc -O3 -Wall -Wno-format-security -fPIC -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o imcs.o imcs.c
gcc -O3 -Wall -Wno-format-security -fPIC -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o func.o func.c
gcc -O3 -Wall -Wno-format-security -fPIC -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o smp.o smp.c
gcc -O3 -Wall -Wno-format-security -fPIC -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o btree.o btree.c
gcc -O3 -Wall -Wno-format-security -fPIC -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o threadpool.o threadpool.c
gcc -O3 -Wall -Wno-format-security -fPIC -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o fileio.o fileio.c
gcc -O3 -Wall -Wno-format-security -fPIC -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o disk.o disk.c
disk.c:31:46: error: unknown type name ‘imcs_page_access_mode_t’
imcs_page_t* imcs_load_page(imcs_page_t* pg, imcs_page_access_mode_t mode)
^~~~~~~~~~~~~~~~~~~~~~~
disk.c:134:1: error: expected identifier or ‘(’ before ‘{’ token
{
^
disk.c:160:25: error: macro "imcs_disk_open" passed 1 arguments, but takes just 0
void imcs_disk_open(void)
^
disk.c:161:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
{
^
disk.c:165:26: error: macro "imcs_disk_close" passed 1 arguments, but takes just 0
void imcs_disk_close(void)
^
disk.c:166:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
{
^
disk.c:177:26: error: macro "imcs_disk_flush" passed 1 arguments, but takes just 0
void imcs_disk_flush(void)
^
disk.c:178:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
{
^
disk.c:170:12: warning: ‘compare_page_offset’ defined but not used [-Wunused-function]
static int compare_page_offset(void const* p, void const* q)
^~~~~~~~~~~~~~~~~~~
<builtin>: recipe for target 'disk.o' failed
make: *** [disk.o] Error 1
imcs_page_access_mode_t is present in disk.h but not sure why I’m getting this issue.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (7 by maintainers)
Commits related to this issue
- [refer #59] Use PG_CPPFLAGS instead of CUSTOM_COPT in makefile — committed to knizhnik/imcs by knizhnik 4 years ago
The problem ius caused by --enable-llvm support. It is using clang to generate LLVM code and is not substituting CUSTOM_COPTS in this case. I sent the question to hackers mailing list and hope that Andres will help me to find the solution. Right now I can only recommend you either not to configure Postgres with LLVM support, either hardcode #define IMCS_DISK_SUPPORT in imcs.h