← Back to team overview

kicad-developers team mailing list archive

Fwd: pcbnew crashes on start since #4757 because of libpython not loaded

 

Hi,

I can reproduct this problem even when I build from source. To do that I
just activate KICAD_SCRIPTING_WXPYTHON during compilation and I face the
same issue.
I imagine that the issue is somewhere on links options ...
I found 2 workarrounds:
- Disable this option
- force loading of python2.7 on single_top.cpp as on the attached patch
 =>This sad option fix the issue on my computer but I don't know if
there is some other side effects...

I propose to add this small patch on the ppa. It will apply by the build
process.

It's ok ?

-------- Message original --------
Sujet: 	pcbnew crashes on start since #4757 because of libpython not loaded
Date : 	Mon, 31 Mar 2014 16:28:12 -0000
De : 	Roger John <roger.john@xxxxxx>
Répondre à : 	Roger John <roger.john@xxxxxx>
Pour : 	j2010 <js.reynaud@xxxxxxxxx>



Hi,
since revision 4757, pcbnew from this ppa crashes on start. Error
messages suggest that libpython was not loaded before. Starting kicad
with "LD_PRELOAD=/usr/lib/libpython2.7.so kicad" indeed solves the
problem. When i build from source, pcbnew works without this, so i think
it's related to your build. Though it is strange that ldd doesn't list
libpython neither for kicad/pcbnew built from source nor for fro them
built from you.  Could you please have a look?
Thanks
Roger John
-- 
This message was sent from Launchpad by
Roger John (https://launchpad.net/~roger-john)
using the "Contact this user" link on your profile page
(https://launchpad.net/~js-reynaud).
For more information see
https://help.launchpad.net/YourAccount/ContactingPeople



=== modified file 'common/single_top.cpp'
--- common/single_top.cpp	2014-03-21 16:59:19 +0000
+++ common/single_top.cpp	2014-03-28 22:01:08 +0000
@@ -221,6 +221,8 @@
 {
     bool OnInit()           // overload wxApp virtual
     {
+        void* handle = dlopen("libpython2.7.so", RTLD_LAZY | RTLD_GLOBAL);
+        // boost wrapper for python call
         return Pgm().OnPgmInit( this );
     }
 


Follow ups