Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error with python setup.py build for cx_Oracle

Jihai ChenJul 30 2012 — edited Aug 6 2012
Hi,

I've followed the instructions for installing cx_Oracle so far, but I am stuck at python setup.py build. it gives me the following error:

[jihchen@rws66173fwks cx_Oracle-5.1.2]$ python setup.py build
running build
running build_ext
building 'cx_Oracle' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/scratch/jihchen/install/instantclient_11_2/sdk/include -I/scratch/jihchen/install/python/Python-2.6.5/include/python2.6 -c cx_Oracle.c -o build/temp.linux-x86_64-2.6-11g/cx_Oracle.o -DBUILD_VERSION=5.1.2
In file included from /scratch/jihchen/install/python/Python-2.6.5/include/python2.6/Python.h:58,
from cx_Oracle.c:6:
/scratch/jihchen/install/python/Python-2.6.5/include/python2.6/pyport.h:685:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
In file included from /scratch/jihchen/install/instantclient_11_2/sdk/include/oci.h:3045,
from cx_Oracle.c:10:
/scratch/jihchen/install/instantclient_11_2/sdk/include/ociap.h:10795: warning: function declaration isn’t a prototype
/scratch/jihchen/install/instantclient_11_2/sdk/include/ociap.h:10801: warning: function declaration isn’t a prototype
error: command 'gcc' failed with exit status 1


I have set up my $ORACLE_HOME by downloading and extracting instant client, and followed the BUILD.txt's instruction to link the .so file with:

ln -s libclntsh.so.11.1 libclntsh.so

What am I missing?

Thanks,

Jihai

Comments

W McNeil

We've encountered the same error.

Answer

please use JDK 11

Marked as Answer by User_3WNMA · Jan 14 2022
W McNeil

OK - The software is bundle with Java 8. I'll try 11 and report back.
thanks.

User_3WNMA

Thanks! This fixed the problem for me, I just had to set the path for Java JDK home to JDK 11.

C. L.

Hi there
We are having the same issue and I wanted to ask: Is open JDK 11 supported?
Thanks in advance!

Peter Schnieder

We observe the same issue with the latest version of DataModeler.
I am wondering why SQLDeveloper and DataModeler are shipped with JDK8 although it is known that there is an issue with that version of Java.
To be honest we are unsure to use Java 11. What about the licences if we use Java 11? So my question is like C.L.s one: Is it possible to use DataModeler with Open JDK11?
Thanks and with best regards

There is no problem to use Oracle product with Oracle JDK 11. We don't support Open JDK 11. You can use it but if you try to log service request we'll ask the problem to be reproduced with Oracle JDK
Philip

C. L.

Thanks for your feedback.

Regarding JDK 11, JDK8 is free with the use of SQL Developer, is that also the case with JDK11 or are there separate licenses required?
Regards

Senkum

I installed the latest JDK version of 11.0.13. However, SDDM is now throwing a warning as my current version (Version 21.4.1.349, Build 349.1605) supports JDK less than 11.0.10!
The transformation scripts worked though.
Thanks!

W McNeil

To switch to an installed JDK 11 update sqldeveloper.conf - add the following line.

SetJavaHome C:\Program Files\Java\jdk-11.0.14

robgauf

Confirming as well that this fixes the missing script engine problem:
Install a JDK 11 as pulled from the Oracle Java SE 11 Archive Downloads area (in my case 11.0.13). NOTE: the latest JDK 17 does NOT have the Oracle Nashua script engine (so even the Tools - Custom Transformations panel throws error messages).
Update the <user>\AppData\Roaming\datamodeler\<product version>\product.conf file to add the SetJavaHome statement (as noted above).
Accept the SD-DM startup warning about running too new a JDK (as noted above).
And yes lo and behold the Custom Transformation scripts do run again.

1 - 11
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 3 2012
Added on Jul 30 2012
2 comments
4,562 views