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

Compilation error reported #169

Open
nIxedoahz opened this issue Dec 13, 2022 · 3 comments
Open

Compilation error reported #169

nIxedoahz opened this issue Dec 13, 2022 · 3 comments

Comments

@nIxedoahz
Copy link

Env:
protobuf-c 1.1.1
libprotoc 2.6.1
libpg_query-14-3.0.0
gcc version 4.8.1

error:(make)
compiling src/pg_query_split.c
In file included from ./src/postgres/include/postgres.h:47:0,
from src/pg_query_internal.h:4,
from src/pg_query_split.c:2:
./src/postgres/include/utils/elog.h:358:1: error: unknown type name 'sigjmp_buf'
extern PGDLLIMPORT __thread sigjmp_buf *PG_exception_stack;
^
src/pg_query_split.c: In function 'pg_query_split_with_scanner':
./src/postgres/include/utils/elog.h:315:3: error: unknown type name 'sigjmp_buf'
sigjmp_buf *_save_exception_stack = PG_exception_stack;
^
src/pg_query_split.c:54:3: note: in expansion of macro 'PG_TRY'
PG_TRY();
^
./src/postgres/include/utils/elog.h:317:3: error: unknown type name 'sigjmp_buf'
sigjmp_buf _local_sigjmp_buf;
^
src/pg_query_split.c:54:3: note: in expansion of macro 'PG_TRY'
PG_TRY();
^
src/pg_query_split.c:54:3: warning: implicit declaration of function 'sigsetjmp' [-Wimplicit-function-declaration]
src/pg_query_split.c:129:5: warning: implicit declaration of function 'strdup' [-Wimplicit-function-declaration]
result.stderr_buffer = strdup(stderr_buffer);
^
src/pg_query_split.c:129:26: warning: assignment makes pointer from integer without a cast [enabled by default]
result.stderr_buffer = strdup(stderr_buffer);
^
src/pg_query_split.c:141:22: warning: assignment makes pointer from integer without a cast [enabled by default]
error->message = strdup(error_data->message);
^
src/pg_query_split.c:142:22: warning: assignment makes pointer from integer without a cast [enabled by default]
error->filename = strdup(error_data->filename);
^
src/pg_query_split.c:143:22: warning: assignment makes pointer from integer without a cast [enabled by default]
error->funcname = strdup(error_data->funcname);
^
make: *** [src/pg_query_split.o] Error 1

@lfittl
Copy link
Member

lfittl commented Dec 13, 2022

@nIxedoahz Thanks for the report!

This is surprising, and we haven't seen this failure in our own systems.

Three questions:

  1. Does the 13-latest branch (or the latest tag there) show the same compilation error for you?

  2. Could you please also share the operating system (Linux/BSD/etc) you are building on, as well as the architecture you're on? (amd64 / arm / 32-bit x86, etc)

  3. Are you doing anything special except for checking out the source code and running "make"?

@nIxedoahz
Copy link
Author

@nIxedoahz Thanks for the report!

This is surprising, and we haven't seen this failure in our own systems.

Three questions:

1. Does the 13-latest branch (or the latest tag there) show the same compilation error for you?

2. Could you please also share the operating system (Linux/BSD/etc) you are building on, as well as the architecture you're on? (amd64 / arm / 32-bit x86, etc)

3. Are you doing anything special except for checking out the source code and running "make"?

Thanks

  1. I'm sorry, but I don't know where the address of this branch is
  2. x86_64 GNU/Linux
  3. I change Makefile :(An error is reported when compiling directly :error: 'for' loop initial declarations are only allowed in C99 mode)
    1.override CFLAGS += -g -I. -I./vendor -I./src/postgres/include -Wall -Wno-unused-function -Wno-unused-value -Wno-unused-variable -fno-strict-aliasing -fwrapv -fPIC -std=c99
    2.CC ?= aarch64-linux-gnu-gcc (Because I want to compile the arm version)

@nIxedoahz
Copy link
Author

Does the 13-latest branch (or the latest tag there) show the same compilation error for you?

yes, is the same error

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