Thread: BUG #15648: oracle_fdw extension not able to create
The following bug has been logged on the website: Bug reference: 15648 Logged by: ramakrishnan r Email address: prakash.ramakrishnan.ap@nielsen.com PostgreSQL version: 11.1 Operating system: rhel 7.4 Description: Hi Team, we are not able to create the extesnion oracle_fdw and we did pre check for oracle client 12c and getting below error. ==> cat /etc/redhat- cat: /etc/redhat-: No such file or directory postgres@brurhenppp001.enterprisenet.org:/home/postgres/software/oracle_fdw-2.1.0 ==> cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.5 (Maipo) postgres@brurhenppp001.enterprisenet.org:/home/postgres/software/oracle_fdw-2.1.0 ==> ll total 984 -rw-r--r--. 1 postgres postgres 15887 Sep 25 12:04 CHANGELOG drwxr-xr-x. 2 postgres postgres 123 Sep 25 12:04 expected -rw-r--r--. 1 postgres postgres 1086 Sep 25 12:04 LICENSE -rw-r--r--. 1 postgres postgres 1968 Sep 25 12:04 Makefile -rw-r--r--. 1 postgres postgres 1459 Sep 25 12:17 META.json drwxr-xr-x. 2 postgres postgres 99 Sep 25 12:04 msvc -rw-r--r--. 1 postgres postgres 231 Sep 25 12:04 oracle_fdw--1.0--1.1.sql -rw-r--r--. 1 postgres postgres 1003 Sep 25 12:04 oracle_fdw--1.1.sql -rw-r--r--. 1 postgres postgres 194018 Sep 25 12:04 oracle_fdw.c -rw-r--r--. 1 postgres postgres 133 Sep 25 12:04 oracle_fdw.control -rw-r--r--. 1 postgres postgres 8284 Sep 25 12:04 oracle_fdw.h -rw-------. 1 postgres postgres 570584 Feb 15 16:46 oracle_fdw.o -rw-r--r--. 1 postgres postgres 44474 Sep 25 12:04 oracle_gis.c -rw-r--r--. 1 postgres postgres 93976 Sep 25 12:04 oracle_utils.c -rw-r--r--. 1 postgres postgres 37530 Sep 25 12:04 README.oracle_fdw drwxr-xr-x. 2 postgres postgres 98 Sep 25 12:04 sql -rw-r--r--. 1 postgres postgres 315 Sep 25 12:04 TODO postgres@brurhenppp001.enterprisenet.org:/home/postgres/software/oracle_fdw-2.1.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 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -I/sdk/include -I/oci/include -I/rdbms/public -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/usr/pgsql-11/include/server -I/usr/pgsql-11/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o oracle_utils.o oracle_utils.c oracle_utils.c:22:17: fatal error: oci.h: No such file or directory #include <oci.h> ^ compilation terminated. make: *** [oracle_utils.o] Error 1 postgres@brurhenppp001.enterprisenet.org:/home/postgres/software/oracle_fdw-2.1.0
Em qui, 21 de fev de 2019 às 15:39, PG Bug reporting form <noreply@postgresql.org> escreveu: > > we are not able to create the extesnion oracle_fdw and we did pre check for > oracle client 12c and getting below error. > Report issues to oracle_fdw project [1]. > ==> 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 -g -pipe -Wall > -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong > --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC > -I/sdk/include -I/oci/include -I/rdbms/public ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It seems you do not set ORACLE_HOME env variable. Hence, it can't find oci.h. Check Makefile for details. [1] https://github.com/laurenz/oracle_fdw/issues -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
Hi Euler,
Still am not able to create the oracle_fdw extension please find the below details,
postgres@brurhenppp001.enterprisenet.org:/home/postgres/software/oracle_fdw-2.1.0
==> ll
total 984
-rw-r--r--. 1 postgres postgres 15887 Sep 25 12:04 CHANGELOG
drwxr-xr-x. 2 postgres postgres 123 Sep 25 12:04 expected
-rw-r--r--. 1 postgres postgres 1086 Sep 25 12:04 LICENSE
-rw-r--r--. 1 postgres postgres 1968 Sep 25 12:04 Makefile
-rw-r--r--. 1 postgres postgres 1459 Sep 25 12:17 META.json
drwxr-xr-x. 2 postgres postgres 99 Sep 25 12:04 msvc
-rw-r--r--. 1 postgres postgres 231 Sep 25 12:04 oracle_fdw--1.0--1.1.sql
-rw-r--r--. 1 postgres postgres 1003 Sep 25 12:04 oracle_fdw--1.1.sql
-rw-r--r--. 1 postgres postgres 194018 Sep 25 12:04 oracle_fdw.c
-rw-r--r--. 1 postgres postgres 133 Sep 25 12:04 oracle_fdw.control
-rw-r--r--. 1 postgres postgres 8284 Sep 25 12:04 oracle_fdw.h
-rw-------. 1 postgres postgres 570584 Feb 15 16:46 oracle_fdw.o
-rw-r--r--. 1 postgres postgres 44474 Sep 25 12:04 oracle_gis.c
-rw-r--r--. 1 postgres postgres 93976 Sep 25 12:04 oracle_utils.c
-rw-r--r--. 1 postgres postgres 37530 Sep 25 12:04 README.oracle_fdw
drwxr-xr-x. 2 postgres postgres 98 Sep 25 12:04 sql
-rw-r--r--. 1 postgres postgres 315 Sep 25 12:04 TODO
postgres@brurhenppp001.enterprisenet.org:/home/postgres/software/oracle_fdw-2.1.0
==> export PATH=/opt/app/oracle/product/12.1.0/client_64/bin:$PATH
postgres@brurhenppp001.enterprisenet.org:/home/postgres/software/oracle_fdw-2.1.0
==> export ORACLE_HOME=/opt/app/oracle/product/12.1.0/client_64/
postgres@brurhenppp001.enterprisenet.org:/home/postgres/software/oracle_fdw-2.1.0
==> export LD_LIBRARY_PATH=$ORACLE_HOME/lib
postgres@brurhenppp001.enterprisenet.org:/home/postgres/software/oracle_fdw-2.1.0
==>
postgres@brurhenppp001.enterprisenet.org:/home/postgres/software/oracle_fdw-2.1.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 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -I/opt/app/oracle/product/12.1.0/client_64//sdk/include -I/opt/app/oracle/product/12.1.0/client_64//oci/include -I/opt/app/oracle/product/12.1.0/client_64//rdbms/public -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/usr/pgsql-11/include/server -I/usr/pgsql-11/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -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 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -I/opt/app/oracle/product/12.1.0/client_64//sdk/include -I/opt/app/oracle/product/12.1.0/client_64//oci/include -I/opt/app/oracle/product/12.1.0/client_64//rdbms/public -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/usr/pgsql-11/include/server -I/usr/pgsql-11/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -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 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -shared -o oracle_fdw.so oracle_fdw.o oracle_utils.o oracle_gis.o -L/usr/pgsql-11/lib -Wl,--as-needed -L/usr/lib64/llvm5.0/lib -L/usr/lib64 -Wl,--as-needed -Wl,-rpath,'/usr/pgsql-11/lib',--enable-new-dtags -L/opt/app/oracle/product/12.1.0/client_64/ -L/opt/app/oracle/product/12.1.0/client_64//bin -L/opt/app/oracle/product/12.1.0/client_64//lib -lclntsh -L/usr/lib/oracle/12.2/client/lib -L/usr/lib/oracle/12.2/client64/lib -L/usr/lib/oracle/12.1/client/lib -L/usr/lib/oracle/12.1/client64/lib -L/usr/lib/oracle/11.2/client/lib -L/usr/lib/oracle/11.2/client64/lib -L/usr/lib/oracle/11.1/client/lib -L/usr/lib/oracle/11.1/client64/lib -L/usr/lib/oracle/10.2.0.5/client/lib -L/usr/lib/oracle/10.2.0.5/client64/lib -L/usr/lib/oracle/10.2.0.4/client/lib -L/usr/lib/oracle/10.2.0.4/client64/lib -L/usr/lib/oracle/10.2.0.3/client/lib -L/usr/lib/oracle/10.2.0.3/client64/lib
/opt/rh/llvm-toolset-7/root/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -O2 -I/opt/app/oracle/product/12.1.0/client_64//sdk/include -I/opt/app/oracle/product/12.1.0/client_64//oci/include -I/opt/app/oracle/product/12.1.0/client_64//rdbms/public -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/usr/pgsql-11/include/server -I/usr/pgsql-11/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -flto=thin -emit-llvm -c -o oracle_fdw.bc oracle_fdw.c
make: /opt/rh/llvm-toolset-7/root/usr/bin/clang: Command not found
make: *** [oracle_fdw.bc] Error 127
On Fri, Feb 22, 2019 at 2:25 AM Euler Taveira <euler@timbira.com.br> wrote:
Em qui, 21 de fev de 2019 às 15:39, PG Bug reporting form
<noreply@postgresql.org> escreveu:
>
> we are not able to create the extesnion oracle_fdw and we did pre check for
> oracle client 12c and getting below error.
>
Report issues to oracle_fdw project [1].
> ==> 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 -g -pipe -Wall
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
> --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC
> -I/sdk/include -I/oci/include -I/rdbms/public
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It seems you do not set ORACLE_HOME env variable. Hence, it can't find
oci.h. Check Makefile for details.
[1] https://github.com/laurenz/oracle_fdw/issues
--
Euler Taveira Timbira -
http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
Regards,
Prakash.R
Postgresql DBA
Em sex, 22 de fev de 2019 às 11:34, Prakash Ramakrishnan <prakash.ramakrishnan.ap@nielsen.com> escreveu: > > postgres@brurhenppp001.enterprisenet.org:/home/postgres/software/oracle_fdw-2.1.0 > ==> export PATH=/opt/app/oracle/product/12.1.0/client_64/bin:$PATH > It is not necessary to build. > postgres@brurhenppp001.enterprisenet.org:/home/postgres/software/oracle_fdw-2.1.0 > ==> export ORACLE_HOME=/opt/app/oracle/product/12.1.0/client_64/ > That's it. > postgres@brurhenppp001.enterprisenet.org:/home/postgres/software/oracle_fdw-2.1.0 > ==> export LD_LIBRARY_PATH=$ORACLE_HOME/lib > postgres@brurhenppp001.enterprisenet.org:/home/postgres/software/oracle_fdw-2.1.0 > ==> It is not necessary to build. > make: /opt/rh/llvm-toolset-7/root/usr/bin/clang: Command not found > make: *** [oracle_fdw.bc] Error 127 > There is something wrong with your env. Do you have CC set? What is your pg_config output? Read the instructions https://github.com/laurenz/oracle_fdw#6-installation -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
>>>>> "Euler" == Euler Taveira <euler@timbira.com.br> writes: >> make: /opt/rh/llvm-toolset-7/root/usr/bin/clang: Command not found >> make: *** [oracle_fdw.bc] Error 127 Euler> There is something wrong with your env. Do you have CC set? What Euler> is your pg_config output? This is what you get if you try and compile extensions against a server built with --with-llvm, on a machine that doesn't have clang installed. I mentioned to Andres that we really ought to have an official way to disable the LLVM bitcode build for such cases, but right now there isn't one. "with_llvm=no" on the make command line is worth a try, but I wouldn't bet much on it working. Otherwise, install llvm version 7 (including clang). -- Andrew (irc:RhodiumToad)
Hi Andrew,
I have config path for /usr/pgsql-11/bin/pg_config and CC mean?
[root@brurhenppp001 oracle_fdw-2.1.0]# ll
total 1796
-rw-r--r--. 1 postgres postgres 15887 Sep 25 12:04 CHANGELOG
drwxr-xr-x. 2 postgres postgres 123 Sep 25 12:04 expected
-rw-r--r--. 1 postgres postgres 1086 Sep 25 12:04 LICENSE
-rw-r--r--. 1 postgres postgres 1968 Sep 25 12:04 Makefile
-rw-r--r--. 1 postgres postgres 1459 Sep 25 12:17 META.json
drwxr-xr-x. 2 postgres postgres 99 Sep 25 12:04 msvc
-rw-r--r--. 1 postgres postgres 231 Sep 25 12:04 oracle_fdw--1.0--1.1.sql
-rw-r--r--. 1 postgres postgres 1003 Sep 25 12:04 oracle_fdw--1.1.sql
-rw-r--r--. 1 postgres postgres 194018 Sep 25 12:04 oracle_fdw.c
-rw-r--r--. 1 postgres postgres 133 Sep 25 12:04 oracle_fdw.control
-rw-r--r--. 1 postgres postgres 8284 Sep 25 12:04 oracle_fdw.h
-rw-------. 1 postgres postgres 570584 Feb 15 16:46 oracle_fdw.o
-rwx------. 1 postgres postgres 528736 Feb 22 09:42 oracle_fdw.so
-rw-r--r--. 1 postgres postgres 44474 Sep 25 12:04 oracle_gis.c
-rw-------. 1 postgres postgres 122328 Feb 22 09:42 oracle_gis.o
-rw-r--r--. 1 postgres postgres 93976 Sep 25 12:04 oracle_utils.c
-rw-------. 1 postgres postgres 173136 Feb 22 09:42 oracle_utils.o
-rw-r--r--. 1 postgres postgres 37530 Sep 25 12:04 README.oracle_fdw
drwxr-xr-x. 2 postgres postgres 98 Sep 25 12:04 sql
-rw-r--r--. 1 postgres postgres 315 Sep 25 12:04 TODO
[root@brurhenppp001 oracle_fdw-2.1.0]# export ORACLE_HOME=/opt/app/oracle/product/12.1.0/client_64/
Please share me the full command how to run the make file?
On Mon, Feb 25, 2019 at 7:27 AM Andrew Gierth <andrew@tao11.riddles.org.uk> wrote:
>>>>> "Euler" == Euler Taveira <euler@timbira.com.br> writes:
>> make: /opt/rh/llvm-toolset-7/root/usr/bin/clang: Command not found
>> make: *** [oracle_fdw.bc] Error 127
Euler> There is something wrong with your env. Do you have CC set? What
Euler> is your pg_config output?
This is what you get if you try and compile extensions against a server
built with --with-llvm, on a machine that doesn't have clang installed.
I mentioned to Andres that we really ought to have an official way to
disable the LLVM bitcode build for such cases, but right now there isn't
one. "with_llvm=no" on the make command line is worth a try, but I
wouldn't bet much on it working.
Otherwise, install llvm version 7 (including clang).
--
Andrew (irc:RhodiumToad)
Regards,
Prakash.R
Postgresql DBA
Hi Andrew,
Can we get an update on this?.
Regards,
Prakash.R
On Mon, Feb 25, 2019 at 5:15 PM Prakash Ramakrishnan <prakash.ramakrishnan.ap@nielsen.com> wrote:
Hi Andrew,I have config path for /usr/pgsql-11/bin/pg_config and CC mean?[root@brurhenppp001 oracle_fdw-2.1.0]# lltotal 1796-rw-r--r--. 1 postgres postgres 15887 Sep 25 12:04 CHANGELOGdrwxr-xr-x. 2 postgres postgres 123 Sep 25 12:04 expected-rw-r--r--. 1 postgres postgres 1086 Sep 25 12:04 LICENSE-rw-r--r--. 1 postgres postgres 1968 Sep 25 12:04 Makefile-rw-r--r--. 1 postgres postgres 1459 Sep 25 12:17 META.jsondrwxr-xr-x. 2 postgres postgres 99 Sep 25 12:04 msvc-rw-r--r--. 1 postgres postgres 231 Sep 25 12:04 oracle_fdw--1.0--1.1.sql-rw-r--r--. 1 postgres postgres 1003 Sep 25 12:04 oracle_fdw--1.1.sql-rw-r--r--. 1 postgres postgres 194018 Sep 25 12:04 oracle_fdw.c-rw-r--r--. 1 postgres postgres 133 Sep 25 12:04 oracle_fdw.control-rw-r--r--. 1 postgres postgres 8284 Sep 25 12:04 oracle_fdw.h-rw-------. 1 postgres postgres 570584 Feb 15 16:46 oracle_fdw.o-rwx------. 1 postgres postgres 528736 Feb 22 09:42 oracle_fdw.so-rw-r--r--. 1 postgres postgres 44474 Sep 25 12:04 oracle_gis.c-rw-------. 1 postgres postgres 122328 Feb 22 09:42 oracle_gis.o-rw-r--r--. 1 postgres postgres 93976 Sep 25 12:04 oracle_utils.c-rw-------. 1 postgres postgres 173136 Feb 22 09:42 oracle_utils.o-rw-r--r--. 1 postgres postgres 37530 Sep 25 12:04 README.oracle_fdwdrwxr-xr-x. 2 postgres postgres 98 Sep 25 12:04 sql-rw-r--r--. 1 postgres postgres 315 Sep 25 12:04 TODO[root@brurhenppp001 oracle_fdw-2.1.0]# export ORACLE_HOME=/opt/app/oracle/product/12.1.0/client_64/Please share me the full command how to run the make file?On Mon, Feb 25, 2019 at 7:27 AM Andrew Gierth <andrew@tao11.riddles.org.uk> wrote:>>>>> "Euler" == Euler Taveira <euler@timbira.com.br> writes:
>> make: /opt/rh/llvm-toolset-7/root/usr/bin/clang: Command not found
>> make: *** [oracle_fdw.bc] Error 127
Euler> There is something wrong with your env. Do you have CC set? What
Euler> is your pg_config output?
This is what you get if you try and compile extensions against a server
built with --with-llvm, on a machine that doesn't have clang installed.
I mentioned to Andres that we really ought to have an official way to
disable the LLVM bitcode build for such cases, but right now there isn't
one. "with_llvm=no" on the make command line is worth a try, but I
wouldn't bet much on it working.
Otherwise, install llvm version 7 (including clang).
--
Andrew (irc:RhodiumToad)--Regards,Prakash.RPostgresql DBA
Regards,
Prakash.R
Postgresql DBA
>>>>> "Prakash" == Prakash Ramakrishnan <prakash.ramakrishnan.ap@nielsen.com> writes: Prakash> Hi Andrew, Prakash> Can we get an update on this?. Please stop abusing our bug reporting list. -- Andrew (irc:RhodiumToad)