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

oracle_utils.c:22:17: fatal error: oci.h: No such file or directory #154

Closed
cwhitsbm opened this issue Mar 14, 2017 · 12 comments
Closed

oracle_utils.c:22:17: fatal error: oci.h: No such file or directory #154

cwhitsbm opened this issue Mar 14, 2017 · 12 comments

Comments

@cwhitsbm
Copy link

Hello,

I seem to go round and round with this FDW every time I install it with a different problem every time.

This time it is this error:
oracle_utils.c:22:17: fatal error: oci.h: No such file or directory

I have installed:
oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm
oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm
oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm
postgresql-server-dev-9.6

I do not seem to have a /opt/include directory anywhere on the system.

My paths are as follows:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/oracle/12.2/client64/bin:/usr/oracle/12.2/client64/lib"
ORACLE_HOME="/usr/lib/oracle/12.2/client64"
LD_LIBRARY_PATH="/usr/lib/oracle/12.2/client64/lib/"

I am completely lost and don't know what is broken. Any help you can provide would be great.

@cwhitsbm
Copy link
Author

I tried doing an apt-file search oci.h and while there were other filenames that contained oci.h there was nothing specifically that was just "oci.h"

@cwhitsbm
Copy link
Author

Just to add in case there are any other questions, I have also installed:

Postgres9.6
postgresql-contrib
libpq-dev
postgresql-server-dev-9.6

@laurenz
Copy link
Owner

laurenz commented Mar 15, 2017

This is a duplicate of #153.
Oracle 12.2 is being released today, so the paths to the new RPM locations are not in the Makefile of older releases.

You can either download the latest development version of oracle_fdw, e.g. from here that contains commit 96e022c, or you can ad the following to Makefile yourself:

To PG_CPPFLAGS add -I/usr/include/oracle/12.2/client64, and to SHLIB_LINK add -L/usr/lib/oracle/12.2/client64/lib.

@cwhitsbm
Copy link
Author

cwhitsbm commented Mar 15, 2017 via email

@laurenz
Copy link
Owner

laurenz commented Mar 15, 2017

If you don't have oci.h, you didn't install oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm.

Use rpm -ql <packagename> to figure out where the stuff is installed.

@cwhitsbm
Copy link
Author

cwhitsbm commented Mar 15, 2017 via email

@laurenz
Copy link
Owner

laurenz commented Mar 15, 2017

The order of installation is irrelevant.
Did you try

find /usr/include/oracle -name oci.h

@cwhitsbm
Copy link
Author

cwhitsbm commented Mar 15, 2017 via email

@laurenz laurenz closed this as completed Mar 15, 2017
@cwhitsbm
Copy link
Author

cwhitsbm commented Mar 20, 2017 via email

@laurenz
Copy link
Owner

laurenz commented Mar 21, 2017

You probably don't have libclntsh.so.12.1 on your shared library path.
Add the path to /etc/ld.so.conf and run ldconfig as root.

Make sure that you don't have more than one Oracle client in the shared library path.

@cwhitsbm
Copy link
Author

cwhitsbm commented Mar 21, 2017 via email

@laurenz
Copy link
Owner

laurenz commented Mar 22, 2017

Why more than one path? I don't understand.
Can you give me more detail?

Repository owner locked as resolved and limited conversation to collaborators May 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants