oracle, python cx_Oracle for amd64

Discussion related to network/web services such as Apache, BIND Sendmail, etc.

oracle, python cx_Oracle for amd64

Postby zhuangyan » 10 Jul 2012, 10:11

Code: Select all
bsd# uname -a
FreeBSD bsd.localdomain 8.3-RELEASE FreeBSD 8.3-RELEASE #0: Mon Apr  9 21:23:18 UTC 2012     [email]root@mason.cse.buffalo.edu[/email]:/usr/obj/usr/src/sys/GENERIC  amd64
bsd# python
Python 2.7.2 (default, Jul  9 2012, 13:49:49)
[GCC 4.2.2 20070831 prerelease [FreeBSD]] on freebsd8
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/lib/libdl.so.2: unsupported file layout
>>>
bsd# ldd /usr/local/lib/python2.7/site-packages/cx_Oracle.so
/usr/local/lib/python2.7/site-packages/cx_Oracle.so:
   libclntsh.so.10.1 => /usr/lib/oracle/instantclient10_1/libclntsh.so.10.1 (0x800c00000)
   libthr.so.3 => /lib/libthr.so.3 (0x801ac1000)
   libc.so.7 => /lib/libc.so.7 (0x800648000)
   libnnz10.so => /usr/lib/oracle/instantclient10_1/libnnz10.so (0x801bda000)
   libdl.so.2 => not found (0x0)
   libm.so.6 => not found (0x0)
   libpthread.so.0 => not found (0x0)
   libnsl.so.1 => not found (0x0)
   libc.so.6 => not found (0x0)
   libc.so.6 => not found (0x0)
zhuangyan
Junior Member
 
Posts: 4
Joined: 10 Jul 2012, 10:05

Postby zhuangyan » 10 Jul 2012, 23:41

Code: Select all
bsd# ll /usr/lib/libdl.so.2
lrwxr-xr-x  1 root  wheel  32 Jul 10 17:54 /usr/lib/libdl.so.2 -> /usr/compat/linux/lib/libdl.so.2
bsd# ll /usr/compat/linux/lib/libdl.so.2
lrwxrwxrwx  1 root  wheel  12 Jul 10 14:07 /usr/compat/linux/lib/libdl.so.2 -> libdl-2.9.so
bsd# ll /usr/compat/linux/lib/libdl-2.9.so
-rwxr-xr-x  1 root  wheel  18568 Jul 10 15:49 /usr/compat/linux/lib/libdl-2.9.so
zhuangyan
Junior Member
 
Posts: 4
Joined: 10 Jul 2012, 10:05

Postby zhuangyan » 11 Jul 2012, 01:19

Code: Select all
bsd# file /usr/local/lib/python2.7/site-packages/cx_Oracle.so
/usr/local/lib/python2.7/site-packages/cx_Oracle.so: ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically linked, not stripped
zhuangyan
Junior Member
 
Posts: 4
Joined: 10 Jul 2012, 10:05

Postby zhuangyan » 11 Jul 2012, 03:28

Code: Select all
bsd# file /usr/compat/linux/lib/libdl-2.9.so
/usr/compat/linux/lib/libdl-2.9.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
zhuangyan
Junior Member
 
Posts: 4
Joined: 10 Jul 2012, 10:05

Postby SirDice » 11 Jul 2012, 06:51

I don't think it's possible. I have been searching for a solution but I've only seen people try it but never succeeding.
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
User avatar
SirDice
Old Fart
 
Posts: 16131
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands

Postby firass » 16 Aug 2012, 17:58

zhuangyan: I have tried to get cx_Oracle working on 64-bit FreeBSD with no luck either.

The problem I had is that linux_base-f10 is available for amd64, but runs in i386/32 bit mode. This didn't seem all that bad, since the linux-oracle-instantclient-* ports are 32-bit only.

Then, however, I tried to build cx_Oracle and it fails, because it's trying to build it against a 64-bit version of libclntsh.so, and we installed the 32-bit instantclient.

I exported the following flag, to tell cx_Oracle to build in 32-bit:
Code: Select all
# export CFLAGS=-m32


But then it complained about not finding 32-bit version of libgcc.a


Currently, we have cx_Oracle working in 32-bit FreeBSD, so I am going to wait until a 64-bit linux_base package is released before trying again. It seems like a big hassle to have to run oracle instant client, cx_Oracle, python, and whatever else in 32-bit while the rest of your system is 64-bit.
firass
Junior Member
 
Posts: 2
Joined: 16 Aug 2012, 17:10


Return to Web & Network Services

Who is online

Users browsing this forum: No registered users and 0 guests