Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Won't build on Illumos #218

Open
Smithx10 opened this issue Oct 22, 2019 · 4 comments
Open

Won't build on Illumos #218

Smithx10 opened this issue Oct 22, 2019 · 4 comments

Comments

@Smithx10
Copy link

Smithx10 commented Oct 22, 2019

@ptribble ever see this one before?

[root@tommy-dd378711 ~/cstore_fdw]# make
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -m64 -fPIC --std=c99 -I. -I./ -I/opt/postgresql/11.1/include/server -I/opt/postgresql/11.1/include/internal    -c -o cstore_fdw.o cstore_fdw.c
In file included from /opt/postgresql/11.1/include/server/postgres.h:47:0,
                 from cstore_fdw.c:18:
/opt/postgresql/11.1/include/server/utils/elog.h:318:20: error: unknown type name 'sigjmp_buf'
 extern PGDLLIMPORT sigjmp_buf *PG_exception_stack;
                    ^
<builtin>: recipe for target 'cstore_fdw.o' failed
make: *** [cstore_fdw.o] Error 1
                                                                                        
@Smithx10
Copy link
Author

Adding

#define _XOPEN_SOURCE to cstore_fdw.c got me to:

[root@tommy-dd378711 ~/cstore_fdw]# make
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -pipe -O2 -D_FORTIFY_SOURCE=2 -I/opt/local/include -I/opt/local/include/ncurses -DLDAP_DEPRECATED -I/usr/include -fPIC --std=c99 --save-temp -I. -I./ -I/opt/local/include/postgresql/server -I/opt/local/include/postgresql/internal  -I/opt/local/include -I/opt/local/include/ncurses -DLDAP_DEPRECATED -I/usr/include -I/opt/local/include/libxml2 -I/opt/local/include   -c -o cstore_fdw.o cstore_fdw.c
gcc: warning: -pipe ignored because -save-temps specified
In file included from /opt/local/include/postgresql/server/nodes/execnodes.h:20:0,
                 from /opt/local/include/postgresql/server/commands/copy.h:17,
                 from cstore_fdw.c:33:
/opt/local/include/postgresql/server/executor/instrument.h:31:13: error: field 'blk_read_time' has incomplete type
  instr_time blk_read_time; /* time spent reading */
             ^
/opt/local/include/postgresql/server/executor/instrument.h:32:13: error: field 'blk_write_time' has incomplete type
  instr_time blk_write_time; /* time spent writing */
             ^
/opt/local/include/postgresql/server/executor/instrument.h:51:13: error: field 'starttime' has incomplete type
  instr_time starttime;  /* Start time of current iteration of node */
             ^
/opt/local/include/postgresql/server/executor/instrument.h:52:13: error: field 'counter' has incomplete type
  instr_time counter;  /* Accumulated runtime for this node */
             ^
<builtin>: recipe for target 'cstore_fdw.o' failed
make: *** [cstore_fdw.o] Error 1

@Smithx10
Copy link
Author

Turned out you only need to add -D__EXTENSIONS__ to the Makefile. Could this be merged?

@mtuncer
Copy link
Member

mtuncer commented Oct 22, 2019

If you are building PostgreSQL from sources you can add it to CFLAGS when doing ./configure

@Smithx10
Copy link
Author

Seem's relevant https://www.illumos.org/issues/6283

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants