This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: cx_Oracle failed to load in newly build python 2.7.1
Type: behavior Stage:
Components: Extension Modules Versions: Python 2.7, 3rd party
Status: closed Resolution: postponed
Dependencies: Superseder:
Assigned To: Nosy List: terry.reedy, wah meng
Priority: normal Keywords:

Created on 2011-09-16 12:36 by wah meng, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg144130 - (view) Author: Wong Wah Meng (wah meng) Date: 2011-09-16 12:36
Platform : HP-UX 11.31 on Itanium ia64. 
HP Compiler: 
# swlist -l product | grep Compiler
  ACXX                  C.06.26.EVAL   HP C/aC++ Compiler 
  C-ANSI-C              C.06.26.EVAL   HP C/aC++ Compiler 
  COMPLIBS              B.11.31        Compiler Support Libraries 

I downloaded cx_Oracle5.1 source code and run python build and able to build the module. However, when I import the module it just cannot load without giving any explicit indication what goes wrong. Does anyone knows why?

$ python build
running build
running build_ext
building 'cx_Oracle' extension
creating build
creating build/temp.hp-ux-B.11.31-ia64-2.7-11g
cc -Ae -Olimit 1500 -g -DNDEBUG -O +z -I/opt/oracle/product/11.1.0/rdbms/demo -I/opt/oracle/product/11.1.0/rdbms/public -I/home/r32813/Build/2.7.1/Python-2.7.1/Include -I/home/r32813/Build/2.7.1/Python-2.7.1/Lib/.. -c cx_Oracle.c -o build/temp.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.o -DBUILD_VERSION=5.0
cc: warning 1913: `1500' does not exist or cannot be read
"/home/r32813/Build/2.7.1/Python-2.7.1/Include/pyfpe.h", line 8: warning #3750-D: 
          "\" followed by white space is not a line splice
      /                       Copyright (c) 1996.                           \ 

"NumberVar.c", line 306: warning #4232-D: conversion from "PyObject *" to a
          more strictly aligned type "PyFloatObject *" may cause misaligned
      doubleValue = PyFloat_AS_DOUBLE(value);

"NumberVar.c", line 579: warning #4232-D: conversion from "PyObject *" to a
          more strictly aligned type "PyFloatObject *" may cause misaligned
      var->data[pos] = PyFloat_AS_DOUBLE(value);

creating build/lib.hp-ux-B.11.31-ia64-2.7-11g
ld -b build/temp.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.o -L/opt/oracle/product/11.1.0/lib32 -L/opt/oracle/product/11.1.0 -lclntsh -o build/lib.hp-ux-B.11.31-ia64-2.7-11g/

$ ls -lrt build 
total 0
drwx------   2 r32813     users           96 Sep 16 20:33 temp.hp-ux-B.11.31-ia64-2.7-11g
drwx------   2 r32813     users           96 Sep 16 20:33 lib.hp-ux-B.11.31-ia64-2.7-11g
$ cp build/lib.hp-ux-B.11.31-ia64-2.7-11g/ $PYTHONPATH
$ python
iPython 2.7.1 (r271:86832, Sep 15 2011, 14:46:37) [C] on hp-ux11
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: Failed to load /home/r32813/Build/2.7.1/Python-2.7.1/Lib/
$ env  | grep PYTHON
msg144163 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2011-09-16 21:18
This tracker is for issues (bugs and feature requests) involving CPython. Your problem appears to be with the 3rd-party extension. Please ask your question on its mailing list
It will certainly have people with 2.7 experience and perhaps someone with HP-UX experience.

I am closing this issue for now. You can reopen if discussion on that list suggests that there is a bug with CPython or

PS. an ImportError, or any other exception, is not a crash. A crash is when CPython quits working without saying why.
Date User Action Args
2022-04-11 14:57:21adminsetgithub: 57203
2011-09-16 21:18:14terry.reedysetstatus: open -> closed

type: crash -> behavior
versions: + 3rd party
nosy: + terry.reedy

messages: + msg144163
resolution: postponed
2011-09-16 12:36:37wah mengcreate