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

6.0 wheels fail broken on ucs4 unicode pythons #64

Closed
truthbk opened this issue Aug 16, 2017 · 10 comments
Closed

6.0 wheels fail broken on ucs4 unicode pythons #64

truthbk opened this issue Aug 16, 2017 · 10 comments

Comments

@truthbk
Copy link

truthbk commented Aug 16, 2017

For general questions:

The latest 6.0 release appears to have an issue (had this on linux ubuntu/16.04) with the unicode version python was compiled with. I believe the wheels were built assuming a python with ucs2 unicode support, while the actual target python is ucs4 unicode.

We hit an ImportError:

ImportError: /foo/bar/venv/local/lib/python2.7/site-packages/cx_Oracle.so: undefined symbol: PyUnicodeUCS2_Decode

Target python is ucs4:

$ python -c "import sys; opts = {1114111: 'ucs4', 65535: 'ucs2'}; print(opts.get(sys.maxunicode));"
ucs4
  1. What is your version of Python? Is it 32-bit or 64-bit?
    64-bit

  2. What is your version of cx_Oracle?
    6.0

  3. What is your version of the Oracle client (e.g. Instant Client)? How was it
    installed? Where is it installed?
    instantclient version installed: 12.1.0. Installed via npm @ /opt/oracle/instantclient.

  4. What is your version of the Oracle Database?
    irrelevant.

  5. What is your OS and version?
    Ubuntu 16.04

  6. What compiler version did you use? For example, with GCC, run
    gcc --version.
    gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609 (irrelevant)

  7. What environment variables did you set? How exactly did you set them?
    ORACLE_HOME, set ld cache via sudo ldconfig and the corresponding file in /etc/ld.so.conf.d

  8. What exact command caused the problem (e.g. what command did you try to
    install with)? Who were you logged in as?

python -c "import cx_Oracle;"
  1. What error(s) you are seeing?
ImportError: /foo/bar/venv/local/lib/python2.7/site-packages/cx_Oracle.so: undefined symbol: PyUnicodeUCS2_Decode
@anthony-tuininga
Copy link
Member

I can confirm that the packages were made incorrectly. I've made a note to correct this in future releases. There is no way (that I am aware of) of correcting the issue with the existing builds since PyPI doesn't permit files to be corrected.

@marksteward
Copy link

I'm not sure how to read that - is a new release planned? I was about to raise the same ticket as it's broken dev machines for us.

@anthony-tuininga
Copy link
Member

Yes, a new release will be made. And soon. :-)

truthbk added a commit to DataDog/integrations-core that referenced this issue Aug 17, 2017
There's an issue with the current pypi release see
[this](oracle/python-cx_Oracle#64)
@zzzeek
Copy link

zzzeek commented Aug 18, 2017

hmm no way to hide the existing .whl files for unix? I don't see the value in having linux .whls, everyone that runs linux has to install C-source python libraries all the time.

@zzzeek
Copy link

zzzeek commented Aug 18, 2017

(the .whl file is generated by pip and then cached on the user's computer. works great)

@zzzeek
Copy link

zzzeek commented Aug 18, 2017

workaround: use pip install cx_Oracle --no-binary :all:

@anthony-tuininga
Copy link
Member

I plan to have a new release out today to correct this. Although there may be limited value to having Linux wheels, I think they have some value. :-)

@zzzeek
Copy link

zzzeek commented Aug 18, 2017

here is something I don't understand about .whl then. What if someone's python was built with --enable-unicode=ucs2 ? is the wheel capable of being universal regarding that flag? or will those pythons break?

@anthony-tuininga
Copy link
Member

Wheels differentiate between UCS2 and UCS4 but the Python build environment does not. The problem was due to me using the two different Pythons (UCS2 and UCS4) but forgetting about that fact -- so the UCS2 build was used for both the UCS2 and UCS4 wheels! I have corrected that oversight in my release process.

@anthony-tuininga
Copy link
Member

6.0.1 was just released and I have verified that the two different Linux wheels for Python 2.7 are in fact different.

truthbk added a commit to DataDog/integrations-core that referenced this issue Sep 14, 2017
* [oracle] adding oracle integration.

* [oracle] preparing travis for oracle integration tests.

* [oracle][travis] get CI kickstarted.

[oracle][travis] enable agreement switch...

* [oracle] fix helper script on linux - handle weird exception.

* [oracle] rebuild ldconfig with sudo

* [oracle] cannot catch unimportated exception - be generic.

[oracle][test] lower cx_Oracle dep, issue with version 6.0

* [oracle][travis] make symlink only if not present.

* [oracle] improve connection string generaiton.

* [oracle][test] fix container boot-up, cache DB, work locally.

* [oracle][test] actually assert something.

* [oracle] disable on windows until cx_Oracle 6.0 is fixed.

There's an issue with the current pypi release see
[this](oracle/python-cx_Oracle#64)

* [oracle] bumping cx_Oracle to fixed 6.0.1 version.

* Safecoding tablespace check to avoid divide by zero error.

* [oracle] Allowing for multiple datafiles and large datafiles

* [oracle] Increasing version number.

* Update manifest.json

[oracle] Removing version bump as requested.

* [oracle] adding db setup scripts for XE.

[oracle] load setup scripts.

[oracle][test] setup test, just play with DB a bit.

* [oracle][test] unfortunately we have to wait for stats to populate (for now).

[oracle] lint.

* [oracle] updating README and manifest.

[oracle] adding metadata, fixing typo.

[oracle] fix copyritten notices.

* [oracle] no need for constructor - just calling super.

* [oracle] adding changelog.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants