laurenz / oracle_fdw

PostgreSQL Foreign Data Wrapper for Oracle
http://laurenz.github.io/oracle_fdw/
Other
487 stars 156 forks source link

make faild #676

Closed pudada123 closed 2 months ago

pudada123 commented 3 months ago
[root@pg1 oracle_fdw-ORACLE_FDW_2_3_0]# make
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/usr/local/oracle/instantclient/sdk/include -I/usr/local/oracle/instantclient/oci/include -I/usr/local/oracle/instantclient/rdbms/public -I/usr/local/oracle/instantclient -I/usr/include/oracle/19.8/client -I/usr/include/oracle/19.8/client64 -I/usr/include/oracle/19.6/client -I/usr/include/oracle/19.6/client64 -I/usr/include/oracle/19.3/client -I/usr/include/oracle/19.3/client64 -I/usr/include/oracle/18.5/client -I/usr/include/oracle/18.5/client64 -I/usr/include/oracle/18.3/client -I/usr/include/oracle/18.3/client64 -I/usr/include/oracle/12.2/client -I/usr/include/oracle/12.2/client64 -I/usr/include/oracle/12.1/client -I/usr/include/oracle/12.1/client64 -I/usr/include/oracle/11.2/client -I/usr/include/oracle/11.2/client64 -I/usr/include/oracle/11.1/client -I/usr/include/oracle/11.1/client64 -I/usr/include/oracle/10.2.0.5/client -I/usr/include/oracle/10.2.0.5/client64 -I/usr/include/oracle/10.2.0.4/client -I/usr/include/oracle/10.2.0.4/client64 -I/usr/include/oracle/10.2.0.3/client -I/usr/include/oracle/10.2.0.3/client64 -I. -I./ -I/data/pg12/include/postgresql/server -I/data/pg12/include/postgresql/internal  -D_GNU_SOURCE -I/usr/include/libxml2   -c -o oracle_fdw.o oracle_fdw.c
oracle_fdw.c: In function ‘foreign_join_ok’:
oracle_fdw.c:2927:3: warning: passing argument 2 of ‘extract_actual_join_clauses’ from incompatible pointer type [enabled by default]
   extract_actual_join_clauses(extra->restrictlist, joinrel->relids, &joinclauses, &otherclauses);
   ^
In file included from oracle_fdw.c:46:0:
/data/pg12/include/postgresql/server/optimizer/restrictinfo.h:38:13: note: expected ‘struct List **’ but argument is of type ‘Relids’
 extern void extract_actual_join_clauses(List *restrictinfo_list,
             ^
oracle_fdw.c:2927:3: error: too many arguments to function ‘extract_actual_join_clauses’
   extract_actual_join_clauses(extra->restrictlist, joinrel->relids, &joinclauses, &otherclauses);
   ^
In file included from oracle_fdw.c:46:0:
/data/pg12/include/postgresql/server/optimizer/restrictinfo.h:38:13: note: declared here
 extern void extract_actual_join_clauses(List *restrictinfo_list,
             ^
make: *** [oracle_fdw.o] Error 1
laurenz commented 3 months ago

What are the exact versions of oracle_fdw and PostgreSQL you are using (for PostgreSQL, the minor release is important).

pudada123 commented 3 months ago

What are the exact versions of oracle_fdw and PostgreSQL you are using (for PostgreSQL, the minor release is important).

[root@pg1 oracle_fdw-master]# pg_config |grep -i version VERSION = PostgreSQL 10.3 [root@pg1 oracle_fdw-master]# cat /etc/redhat-release CentOS Linux release 7.7.1908 (Core) oracle_fdw 's version is 2.3.0

laurenz commented 3 months ago

PostgreSQL 10.3 does not work with oracle_fdw. You have to update to a later (ideally, the latest) minor release. oracle_fdw 2.3.0 should work with PostgreSQL v10, but I recommend that you use the latest version of oracle_fdw. (You probably know that PostgreSQL v10 is out of support.)

This is a duplicate of #272, #278, #320 and #417.

pudada123 commented 3 months ago

PostgreSQL 10.3 does not work with oracle_fdw. You have to update to a later (ideally, the latest) minor release. oracle_fdw 2.3.0 should work with PostgreSQL v10, but I recommend that you use the latest version of oracle_fdw. (You probably know that PostgreSQL v10 is out of support.)

This is a duplicate of #272, #278, #320 and #417.

thankyou very much,but I have a question that I would like to ask you,when i first compile it, it compiled successfully,but i execute sql create extension oracle_fdw failed;ERROR: could not load library "/data/pg10/lib/postgresql/oracle_fdw.so": /data/pg10/lib/postgresql/oracle_fdw.so: undefined symbol: AllocSetContextCreateInternal , when i recompile it,the above error is displayed I don't understand why the first compilation was successful, but the second failed

The following code is my first successful compilation

[root@pg1 oracle_fdw-master]# make 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"/data/oracle/instantclient_19_23/sdk/include" -I"/data/oracle/instantclient_19_23/oci/include" -I"/data/oracle/instantclient_19_23/rdbms/public" -I"/data/oracle/instantclient_19_23/" -I. -I./ -I/data/pg10/include/postgresql/server -I/data/pg10/include/postgresql/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o oracle_utils.o oracle_utils.c 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"/data/oracle/instantclient_19_23/sdk/include" -I"/data/oracle/instantclient_19_23/oci/include" -I"/data/oracle/instantclient_19_23/rdbms/public" -I"/data/oracle/instantclient_19_23/" -I. -I./ -I/data/pg10/include/postgresql/server -I/data/pg10/include/postgresql/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o oracle_gis.o oracle_gis.c 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 -shared -o oracle_fdw.so oracle_fdw.o oracle_utils.o oracle_gis.o -L/data/pg10/lib -Wl,--as-needed -Wl,-rpath,'/data/pg10/lib',--enable-new-dtags -L"/data/oracle/instantclient_19_23/" -L"/data/oracle/instantclient_19_23/bin" -L"/data/oracle/instantclient_19_23/lib" -L"/data/oracle/instantclient_19_23/lib/amd64" -lclntsh [root@pg1 oracle_fdw-master]# make install /usr/bin/mkdir -p '/data/pg10/lib/postgresql' /usr/bin/mkdir -p '/data/pg10/share/postgresql/extension' /usr/bin/mkdir -p '/data/pg10/share/postgresql/extension' /usr/bin/mkdir -p '/data/pg10/share/doc/postgresql/extension' /usr/bin/install -c -m 755 oracle_fdw.so '/data/pg10/lib/postgresql/oracle_fdw.so' /usr/bin/install -c -m 644 .//oracle_fdw.control '/data/pg10/share/postgresql/extension/' /usr/bin/install -c -m 644 .//oracle_fdw--1.2.sql .//oracle_fdw--1.0--1.1.sql .//oracle_fdw--1.1--1.2.sql '/data/pg10/share/postgresql/extension/' /usr/bin/install -c -m 644 .//README.oracle_fdw '/data/pg10/share/doc/postgresql/extension/' [root@pg1 oracle_fdw-master]# [root@pg1 oracle_fdw-master]# [root@pg1 oracle_fdw-master]# [root@pg1 oracle_fdw-master]# [root@pg1 oracle_fdw-master]# su - postgres Last login: Sun May 19 00:48:10 EDT 2024 on pts/1 [postgres@pg1 ~]$ psql psql (10.3) Type "help" for help.

postgres=# create extension oracle_fdw ; ERROR: could not load library "/data/pg10/lib/postgresql/oracle_fdw.so": /data/pg10/lib/postgresql/oracle_fdw.so: undefined symbol: AllocSetContextCreateInternal

laurenz commented 3 months ago

Then you changed something between the first and the second compilation attempt. Isn't that obvious? Anyway, how is that relevant now that you know how to solve the problem?

laurenz commented 2 months ago

Did you manage to build the software?

pudada123 commented 2 months ago

Did you manage to build the software?

i used postgres12.9 make success,10.3 faild

laurenz commented 2 months ago

10.3 cannot work, you need to update to a later minor release of v10.

That should make everything clear, right?

pudada123 commented 2 months ago

10.3 cannot work, you need to update to a later minor release of v10.

That should make everything clear, right?

all right! thanks very much