installed kicad but when running giving segmentation fault.

Asked by kunal keshwani

I have downloaded kicad from "http://www.kicad-pcb.org/display/DEV/Building+KiCad+on+Linux". Followed all the steps given in this link. After running kicad main window appears but when I click in any of the first three Icons i.e "Eeschema, CvPcB and Pcbnew, it gives segmentation fault while the last three icons i.e GerbView ,Bit2mapComponent and Pcb calculator works well...
I have reinstalled it many times but it gives the same fault... please tell me a solution to the above problem.

Question information

Language:
English Edit question
Status:
Solved
For:
KiCad Edit question
Assignee:
No assignee Edit question
Solved by:
Maciej Suminski
Solved:
Last query:
Last reply:
Revision history for this message
Maciej Suminski (orsonmmz) said :
#1

Hi Kunal,

We are currently working on the problem - it is reported here: https://bugs.launchpad.net/kicad/+bug/1322354
There is a temporary patch that you can apply until we find a more elegant way to deal with the bug:
https://bugs.launchpad.net/kicad/+bug/1322354/+attachment/4119332/+files/rdynamic.patch
Let me know if you need further help.

Kind regards,
Orson

Revision history for this message
kunal keshwani (kunalkeshwani6) said :
#2

hello Orson,

I am not getting exactly how to apply that patch that you have
provided....please elaborate on how to temporary fix the problem...

On Mon, May 26, 2014 at 5:51 PM, Maciej Sumiński <
<email address hidden>> wrote:

> Your question #249292 on KiCad changed:
> https://answers.launchpad.net/kicad/+question/249292
>
> Status: Open => Answered
>
> Maciej Sumiński proposed the following answer:
> Hi Kunal,
>
> We are currently working on the problem - it is reported here:
> https://bugs.launchpad.net/kicad/+bug/1322354
> There is a temporary patch that you can apply until we find a more elegant
> way to deal with the bug:
>
> https://bugs.launchpad.net/kicad/+bug/1322354/+attachment/4119332/+files/rdynamic.patch
> Let me know if you need further help.
>
> Kind regards,
> Orson
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/kicad/+question/249292/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/kicad/+question/249292
>
> You received this question notification because you asked the question.
>

Revision history for this message
kunal keshwani (kunalkeshwani6) said :
#3

hello Orson,
I only want to know how to apply that patch that you have given me in this
link...
https://bugs.launchpad.net/kicad/+bug/1322354/+attachment/4119332/+files/rdynamic.patch

On Mon, May 26, 2014 at 6:46 PM, kunal keshwani <
<email address hidden>> wrote:

> Your question #249292 on KiCad changed:
> https://answers.launchpad.net/kicad/+question/249292
>
> Status: Answered => Open
>
> You are still having a problem:
> hello Orson,
>
> I am not getting exactly how to apply that patch that you have
> provided....please elaborate on how to temporary fix the problem...
>
>
> On Mon, May 26, 2014 at 5:51 PM, Maciej Sumiński <
> <email address hidden>> wrote:
>
> > Your question #249292 on KiCad changed:
> > https://answers.launchpad.net/kicad/+question/249292
> >
> > Status: Open => Answered
> >
> > Maciej Sumiński proposed the following answer:
> > Hi Kunal,
> >
> > We are currently working on the problem - it is reported here:
> > https://bugs.launchpad.net/kicad/+bug/1322354
> > There is a temporary patch that you can apply until we find a more
> elegant
> > way to deal with the bug:
> >
> >
> https://bugs.launchpad.net/kicad/+bug/1322354/+attachment/4119332/+files/rdynamic.patch
> > Let me know if you need further help.
> >
> > Kind regards,
> > Orson
> >
> > --
> > If this answers your question, please go to the following page to let us
> > know that it is solved:
> >
> https://answers.launchpad.net/kicad/+question/249292/+confirm?answer_id=0
> >
> > If you still need help, you can reply to this email or go to the
> > following page to enter your feedback:
> > https://answers.launchpad.net/kicad/+question/249292
> >
> > You received this question notification because you asked the question.
> >
>
> --
> You received this question notification because you asked the question.
>

Revision history for this message
Dick Hollenbeck (dickelbeck) said :
#4

This surely seems like a bug in binutils to me. There is simply no reason to go outside the link image for a symbol which has been provided to the linker as part of a static library.

So something got broken in a version of binutils newer than what I am using.

There is no reason to dynamically link to this Kiface() function at all, period. In fact it is not an import nor an export. It is simply a built in global function.

Try dumping the symbol table on _pcbnew.kiface using the following command:

$ nm -CD _pcbnew.kiface | grep Kiface

I show no result, not present. This means we are not importing, nor exporting it as expected. If you show it as an import, this is a bug in the binutils.

Also, you can check the map file:

$ grep Kiface _pcbnew.kiface.map
                0x0000000000189090 _ZN3PCB5IFACE11OnKifaceEndEv
                0x00000000001890a0 _ZN3PCB5IFACE13OnKifaceStartEP8PGM_BASEi
                0x0000000000189530 _Z6Kifacev
 .text._ZN8KIFACE_I11OnKifaceEndEv
                0x00000000001896d0 _ZN8KIFACE_I11OnKifaceEndEv
KIFACE_I::OnKifaceEnd() CMakeFiles/pcbnew_kiface.dir/pcbnew.cpp.o
Kiface() CMakeFiles/pcbnew_kiface.dir/pcbnew.cpp.o
PCB::IFACE::OnKifaceEnd() CMakeFiles/pcbnew_kiface.dir/pcbnew.cpp.o
PCB::IFACE::OnKifaceStart(PGM_BASE*, int) CMakeFiles/pcbnew_kiface.dir/pcbnew.cpp.o

I am using ld version 2.22

$ ld -v

2.22

Revision history for this message
Best Maciej Suminski (orsonmmz) said :
#5

Kunal,

You should go to the directory that contains KiCad sources (by default ~/kicad_sources/kicad.bzr), download the mentioned patch and save it there. After that run:
$ patch -p1 < rdynamic.patch
and rerun the kicad-install.sh script. Could you also tell us what Linux distribution do you use? Please post here the output of "ld -v" command here.

Regards,
Orson

Revision history for this message
kunal keshwani (kunalkeshwani6) said :
#6

Thanks Maciej Sumiński, that solved my question.

Revision history for this message
kunal keshwani (kunalkeshwani6) said :
#7

This is the output of "ld -v" command in my machine.

"GNU ld (GNU Binutils for Ubuntu) 2.23.2"

On Tue, May 27, 2014 at 8:36 PM, kunal keshwani <
<email address hidden>> wrote:

> Your question #249292 on KiCad changed:
> https://answers.launchpad.net/kicad/+question/249292
>
> Status: Answered => Solved
>
> You confirmed that the question is solved:
> Thanks Maciej Sumiński, that solved my question.
>
> --
> You received this question notification because you asked the question.
>