[egenix-users] Changing extension paths in mxCOMMERCIAL.py?

M.-A. Lemburg mal at egenix.com
Thu Nov 18 17:32:35 CET 2004


Chuck Bearden wrote:
> I want to create an alternate installation of mx.ODBC to test a new
> combination of iODBC and FreeTDS.  I therefore need to have the
> mx.ODBC build process ignore the iODBC and FreeTDS installations in
> /usr/local.  I have edited mxCOMMERCIAL.py to point to the test
> installations:
> 
> Extension('mx.ODBC.iODBC.mxODBC',
>           ['mx/ODBC/iODBC/mxODBC.c',
>            'mx/ODBC/iODBC/mxSQLCodes.c'
>            ],
>           include_dirs=['mx/ODBC/iODBC',
>                         '/home/cbearden/opt/libiodbc-3.52.1/include'],
>           define_macros=[('iODBC', None)],
>           library_dirs=['/home/cbearden/opt/libiodbc-3.52.1/lib'],
>           libraries=['iodbc']
>           ),
> 
> After I run 'python setup.py install --home=/home/cbearden/opt1', the
> mxODBC.so still seems to depend on the installations in /usr/local :
> 
> $ ldd opt1/lib/python/mx/ODBC/iODBC/mxODBC.so
>         libiodbc.so.2 => /usr/local/libiodbc/lib/libiodbc.so.2 (0x4002d000)
>         libpthread.so.0 => /lib/tls/libpthread.so.0 (0x40069000)
>         libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
>         libiodbcinst.so.2 =>
> /usr/local/libiodbc-3.51.2/lib/libiodbcinst.so.2 (0x40077000)
>         libdl.so.2 => /lib/libdl.so.2 (0x40081000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
> 
> I get the same result when I run ldd against the mxODBC.so in the source tree.

The locations where you dynamic linker searches for libiodbc.so
depend on your linker configuration, not the settings you used
when compiling mxODBC.

Try adjusting the ld path either statically in the
/etc configuration file or dynamically via the appropriate
environment variable for your system.

> Is there some precaution I need to take when building mx.ODBC to force
> it to use a particular set of libraries and includes in a non-standard
> location?

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Nov 18 2004)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::



More information about the egenix-users mailing list