Open gettes opened 2 months ago
@gettes , please tell us about your environment
ls -la ...... include/something.h
results.Here is what I do per the dynamodb readme: git clone https://github.com/postgres/postgres.git cd postgres git checkout -b REL_15_6 ./configure make cd contrib git clone https://github.com/pgspider/dynamodb_fdw.git cd dynamodb make
Thanks, @gettes ! Good command sequence. But nothing about
- proofs of existing listed 3rd party libraries like
ls -la ...... include/something.h
results.
Look like you have no JsonLexContext*
definition in current C includes because there are no 3rd part components from README
.
i am building all this in a docker image. so whatever is there is from the build process.
oh... i also have installed oracle_fdw and multicorn.
The include directory you are referencing... specifically where?
The postgres/src/include has the following in it: access catalog datatype foreign lib meson.build parser pg_config_ext.h.in pg_config_manual.h pgtar.h portability postgres.h rewrite statistics utils archive c.h executor funcapi.h libpq miscadmin.h partitioning pg_config_ext.h.meson pg_config_os.h pgtime.h port.h postmaster snowball storage varatt.h backup commands fe_utils getopt_long.h Makefile nodes pch pg_config.h pg_getopt.h pg_trace.h postgres_ext.h regex stamp-ext-h tcop windowapi.h bootstrap common fmgr.h jit mb optimizer pg_config_ext.h pg_config.h.in pgstat.h port postgres_fe.h replication stamp-h tsearch
I should also note I am trying to build inside the hub.docker.com/postgres/postgres:15.6 image.
@gettes , 100% PostgreSQL docker image have no needed include files from listed additional components. I don't know where this includes should be inside of docker image. But without this components this FDW does not work and does not compiles.
When you build the aws sdk - do you build the entire sdk or just dynamodb? I have been building with just dynamodb and now I am trying with everything. Building the full sdk is slow. I am hoping to do BUILD_ONLY.
When you build the aws sdk - do you build the entire sdk or just dynamodb?
Unfortunately I have no compile experience for this FDW, but some members of pgspider team doses. I know also there is no compilation without libcurl
, openssl
, libuuid
.
@t-hiroshige , could you please help with the issue?
and maybe seeing how you build the aws sdk would also be helpful in narrowing this down. I have tried building with lex;dynamodb and i get the same error. now i see that lex appears to have nothing to do with building this stuff - lex appears to be voice related.
With everything i have been trying - I am at the point where this is not an include library issue nor a pre-req issue but a coding problem. the original post is still the issue.
The code related to this changed in postgres in 10/2023. See https://github.com/postgres/postgres/commit/1c99cde2f3440c59f582d45b251412c9a9b54f62
@gettes , look like you comes to source code error. Could you please try to compile on your system in some independent directory using https://github.com/pgspider/fdw_testing_scripts ? I use something like reset; date; ../new_mulver_cycle.sh dynamodb_fdw ''; date;
after get_environment.sh
(2Gb+ of traffic, 50+ minutes).
Did you not see my last post where I identified the actual source code change in postgres that breaks the compile of dynamoDB fdw?
Ok, it would appear I wasn't building postgres properly - i was building against postgres 16 and not 15.6. I have correctly built 15.6 and dynamodb_fdw now compiles. BUT - I believe you have a breaking code issue against postgres 16 which is identified above.
Did you not see my last post where I identified the actual source code change in postgres that breaks the compile of dynamoDB fdw?
Yes. Maybe some testing version is before this commit.
I have correctly built 15.6 and
dynamodb_fdw
now compiles. BUT - I believe you have a breaking code issue against postgres 16 which is identified above.
I also think this change breaks dynamodb_fdw
, look like you are right.
Hi, Thank you for sharing the issue to build this module. Basically our project did check only at the timing of major version up such as 16.0 up to now. As you mentioned, by changes of function interface in newer Postgres version, we can see building errors related to.
At least we can fix by the support for Postgres 17.
Trying to build per the readme for dynamodb_fdw and getting the following error:
2.906 g++ -Wall -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -O2 -I./jansson -DHAVE_STDINT_H=1 -Wno-suggest-attribute=format -std=c++11 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -I. -I. -I../../src/include -D_GNU_SOURCE -c -o deparse.o deparse.cpp 6.665 g++ -Wall -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -O2 -I./jansson -DHAVE_STDINT_H=1 -Wno-suggest-attribute=format -std=c++11 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -I. -I. -I../../src/include -D_GNU_SOURCE -c -o dynamodb_query.o dynamodb_query.cpp 8.349 dynamodb_query.cpp: In function ‘Datum dynamodb_convert_to_pg(Oid, int, Aws::DynamoDB::Model::AttributeValue)’: 8.349 dynamodb_query.cpp:532:66: error: cannot convert ‘text’ {aka ‘varlena’} to ‘JsonLexContext’ 8.349 532 | lex = makeJsonLexContext(result, false); 8.349 | ^: dynamodb_query.o] Error 1
~8.349 | | 8.349 | text {aka varlena} 8.349 In file included from dynamodb_query.cpp:31: 8.349 ../../src/include/utils/jsonfuncs.h:41:59: note: initializing argument 1 of ‘JsonLexContext makeJsonLexContext(JsonLexContext, text, bool)’ 8.349 41 | extern JsonLexContext makeJsonLexContext(JsonLexContext lex, text *json, bool need_escapes); 8.349 |~~~~^~~ 9.784 make: *** [