20 Nov 2012 15:46
cx_Freeze-ing an app on Linux with PySide
Almar Klein <a.klein <at> science-applied.nl>
2012-11-20 14:46:04 GMT
2012-11-20 14:46:04 GMT
Hi,
I ran into some problems trying to build an application that uses PySide. Running Python 3.2 on Linux (Lucid Lynx) with Qt and PySide compiled from source.
The problem is that even though libQtCore.so.4 and friends are copied to the target directory, the extension modules (e.g. QtCore.so) are unable to find them. The reason (which I found out eventually) is that on Linux the dependency is not searched in the directory of the calling library by default.
The solution is to set the RPATH variable in the libraries that have the dependencies. Set it to '$ORIGIN' to make Linux search in the same directory. You can also specify paths relative to $ORIGIN.
(further reading: http://enchildfone.wordpress.com/2010/03/23/a-description-of-rpath-origin-ld_library_path-and-portable-linux-binaries/)
On Linux the RPATH can be changed with the 'patchelf' util, which actually comes with PySide. I read that for Mac there are similar solutions.
My problem is solved, but I was wondering if others have ran into the same problems. If so, maybe we can include this functionality in cx_Freeze. (But let's wait until after the release that you are currently wrapping up).
- Almar
Almar Klein, PhD
Science Applied
phone: +31 6 19268652
e-mail: a.klein <at> science-applied.nl
------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________ cx-freeze-users mailing list cx-freeze-users <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cx-freeze-users
RSS Feed