← Back to team overview

kicad-developers team mailing list archive

Re: BZR 4813 OS X crash all the time - USELESS

 

On 04/23/2014 12:22 PM, Jean-Paul Louis wrote:
> Dick,
> 
> I really appreciate the help you provided me, and I did not know that you spent over a man-year in this KiCad Development Team.
> I am copying this to the user group, and I hope that Marco will pick up the ball to keep the OS X build possible.
> For me, OS X is new and confusing because of quite a few similarities with the Unix/Linux world.
> But Apple guys made enough changes to make if a constant frustration. I made the switch to OS X to learn something new, and if I fail to run Kicad on OS X, I have a back-up plan to run it on a VM with either Ubuntu or Debian which are familiar to me. I might even end-up running Linux on dual boot.
> 
> I have not done any timing, but the Debian/VM is fast, so I might be able to use Kicad with Parallels 9 for Desktop.
> Meanwhile, I will try to make it work on OS X. and I will bug report to Marco.
> 
> What I do not understand is if the crash is really due to the lost connection between the exe and the kiface, why is the crash not happening on all the execs? 



Jean-Paul,

Sorry for this inconvenience, and I appreciate you willing to be a tester for the Mac
KIWAY work, rather than going the safe route and running the "pre-kiway" tagged version.
(AKA stable code, in a modern sense.)

This looks solvable now to me, even without Marco's help, providing you can continue
helping by trying some things for me.

Any chain loaded *.kiface file must be in the same directory as its client loader.  On
OSX, we have met this requirement for pcb_calculator, eeschema, pl_editor, cvpcb,
gerbview, and pl_editor.  All are stand alone programs.


The kicad (executable) program is different, it is a client loader for _pcbnew.kiface,
_eeschema.kiface, and _cvpcb.kiface, at this time, subject to change.


The kicad project manager is not satisfied in this "same directory" regard on OSX.  I
don't think this is a bug per se, not in the C++, but a shortcoming of the CMake install()
statements.

There are two things I ask you to try here:

1) Try version 4821 without doing anything else.  When you get the fatal installation
error message, write down:

missing file: <this content>
argv[0] <this content>


2) After you get the fatal error, see if what follows in this email makes sense, namely
the copying of the 3 kiface files mentioned below.  But I'd like to make that step 2) so
we can capture the information in step 1 first.


More below


> Why only eeschema, cvpcb and pcbnew, and not the others?
> Also, those three apps run fine if launched individually, so the change has happened in the last week, and in kicad only (the launch buttons of kicad project manager).
> 
> Everything (OS X wise) was fine until sometime (not sure exactly when) after BZR 4805.
> Right now, I have kept an older (4801) build that runs fine. So something changed that broke the camel’s back,
> and I hope that Marco will be able to trace it to a specific BZR change.
> I will help by building every branch between 4805 which I had tested and 4813 which is when I noticed the change. 
> I just need to read the man page for bar in order to select a given branch.
> 
> Again, I am sorry to see you leaving the team, as I have seen the huge improvements made during your tenure.
> But I understand your frustration, and the cost of your effort.
> 
> Best regards,
> Jean-Paul
> AC9GH
> 

>>> The executable and the kiface, must go into the same directory


>>>> But pl_editor seems to open and close immediately while pcb_calculator, bitmap2component and gerbview opens as expected.
>>>> The kicad crash is then limited to eeschema, cvpcb and pcbnew.
>>>>
>>>>
>>>> So I checked the app directory. the “make install” create the structure below.
>>>> The kiface files are created in two places.
>>>>
>>>> Jean-Pauls-MacBook-Pro:KiCad jean-paullouis$ pwd
>>>> /Applications/KiCad
>>>> Jean-Pauls-MacBook-Pro:KiCad jean-paullouis$ ls -al
>>>> total 84768
>>>> drwxr-xr-x  24 jean-paullouis  admin       816 Apr 23 09:37 .
>>>> drwxrwxr-x+ 96 root            admin      3264 Apr 19 23:31 ..
>>>> -rw-r--r--@  1 jean-paullouis  admin      6148 Apr 23 09:37 .DS_Store
>>>> -rwxr-xr-x   1 root            admin  10737928 Apr 23 08:57 _cvpcb.kiface
>>>> -rwxr-xr-x   1 root            admin   5052540 Apr 23 08:57 _eeschema.kiface
>>>> -rwxr-xr-x   1 root            admin   2050812 Apr 23 08:57 _gerbview.kiface
>>>> -rwxr-xr-x   1 root            admin   1935940 Apr 23 08:57 _pcb_calculator.kiface
>>>> -rwxr-xr-x   1 root            admin  20165500 Apr 23 08:57 _pcbnew.kiface
>>>> -rwxr-xr-x   1 root            admin   1881516 Apr 23 08:57 _pl_editor.kiface
>>>> drwxr-xr-x   3 root            admin       102 Apr 23 08:57 bitmap2component.app
>>>> drwxr-xr-x   3 root            admin       102 Apr 23 08:57 cvpcb.app
>>>> -rwxr-xr-x   1 root            admin    868348 Apr 23 08:57 dxf2idf
>>>> drwxr-xr-x   3 root            admin       102 Apr 23 08:57 eeschema.app
>>>> -rw-r--r--   1 root            admin       744 Apr 23 07:52 freeroute.jnlp
>>>> drwxr-xr-x   3 root            admin       102 Apr 23 08:57 gerbview.app
>>>> -rwxr-xr-x   1 root            admin     26952 Apr 23 08:44 idfcyl
>>>> -rwxr-xr-x   1 root            admin     22648 Apr 23 08:44 idfrect
>>>> drwxr-xr-x   3 root            admin       102 Apr 23 08:57 kicad.app
>>>> -rw-r--r--@  1 jean-paullouis  admin    209276 Apr 23 09:37 kicad.app alias
>>>> drwxr-xr-x   3 root            admin       102 Apr 17 13:35 lib
>>>> drwxr-xr-x   3 root            admin       102 Apr 23 08:57 pcb_calculator.app
>>>> drwxr-xr-x   3 root            admin       102 Apr 23 08:57 pcbnew.app
>>>> drwxr-xr-x   3 root            admin       102 Apr 23 08:57 pl_editor.app
>>>> drwxr-xr-x   8 root            admin       272 Apr 17 13:35 share
>>>> Jean-Pauls-MacBook-Pro:KiCad jean-paullouis$ 
>>>>
>>>> For the Mac OS X,
>>>> the exec file is buried two levels down the app:
>>>> kicad.app
>>>>    Contents
>>>>        MacOS
>>>>            kicad  <— executable (no kiface files here)


Can you try putting 3 of the kiface files here, in the same place as the kicad executable?

  *in the same place as the executable*

Manually?

This is in addition to where they are now in the tree you describe below, do not remove
those.  In this kicad.app/Contents/MacOS directory it looks like we'll need copies of

_pcbnew.kiface, _cvpcb.kiface, and _eeschema.kiface

for now.

Copy those in here, and try it.  If it works, we can revise the install() statements to
support this result.

step 3)
I wonder if we can put symlinks in here, or if that is treated as a security risk.


More below

>>>> eeschema.app
>>>>    Contents
>>>>        MacOS
>>>>            _eeschema.kiface
>>>>            eeschema  <— executable
>>>> cvpcb.app
>>>>    Contents
>>>>        MacOS
>>>>            _cvpcb.kiface
>>>>            cvpcb  <— executable
>>>> pcbnew.app
>>>>    Contents
>>>>        MacOS
>>>>            _pcbnew.kiface
>>>>            pcbnew  <— executable
>>>> gerbview.app
>>>>    Contents
>>>>        MacOS
>>>>            _gerbview.kiface
>>>>            gerbview  <— executable
>>>> pcb_calculator.app
>>>>    Contents
>>>>        MacOS
>>>>            _pcb_calculator.kiface
>>>>            pcb_calculator  <— executable
>>>> pl_editor.app
>>>>    Contents
>>>>        MacOS
>>>>            _pcb_editor.kiface
>>>>            pcb_editor  <— executable
>>>>
>>>> So, it looks like the kiface files are copied in two places.
>>>> Should I delete the extra copy? If so, which one?


I do not see this extra copy, I see only one copy of each kiface in the above diagram.


>>>>
>>>> I do not yet clearly understand the kiface. Are they dynamic libraries?


If I say yes, then you will want to move them.  So I will say no, they are the bottom half
of the executable, and belong in the same directory as the executable which chain loads
them.

A dynamic library is intended for a larger audience, whereas these binaries are not
concerned with exporting numerous symbols in a general way.


Thanks again for your help, Mac users may appreciate it someday.

Dick


Follow ups

References