#91 mged gets illegal instruction in ubuntu oneiric

closed-works-for-me
Jordi Sayol
3
2012-02-25
2011-12-23
Elven Decker
No

I downloaded a fresh copy of BRL-CAD 7.20.4 (Debian build) and did an auto-install on my Ubuntu Oneiric system.

When I issue the "mged" command, I get the response "Illegal instruction".

Am I missing something easy? I am a new user.

Thanks

Discussion

  • Tom Browder
    Tom Browder
    2011-12-23

    32- or 64-bit Ubuntu?

     
  • Elven Decker
    Elven Decker
    2011-12-23

    I am using 32 bit Ubuntu... I'm going to try the previous release 7.20.2 and I'll let you know how I make out.

     
  • Jordi Sayol
    Jordi Sayol
    2011-12-23

    I've successfully tested brlcad_7.20.4-0_i386.deb on Ubuntu Oneiric 32-bit.
    After install, you have to re-login to update the paths environment variables.
    Regards,

     
  • Elven Decker
    Elven Decker
    2011-12-23

    I un-installed, re-installed, logged out, logged in, and got "Illegal instruction" again. Are there any experiments I could try to get some insight? Other executables?

    ./wish fails immediately, ./tclsh gives a prompt and then gives an "Illegal instruction" when I hit Enter. Both are already installed in /usr/bin. I didn't recognize anything else.

    Thanks

    dad@harry:/usr/brlcad/bin$ ./wish
    Illegal instruction
    dad@harry:/usr/brlcad/bin$ ./tclsh
    %
    Illegal instruction
    dad@harry:/usr/brlcad/bin$

    dad@harry:~$ mged -v
    BRL-CAD Release 7.20.4 MGED Geometry Editor
    Mon, 31 Oct 2011 12:00:06 +0100, Compilation 0
    jordi@jordi-desktop:/usr/brlcad
    BRL-CAD Release 7.20.4 The BRL-CAD Display Manager Library
    Mon, 31 Oct 2011 12:00:06 +0100, Compilation 0
    jordi@jordi-desktop:/usr/brlcad
    BRL-CAD Release 7.20.4 The BRL-CAD Framebuffer Library
    Mon, 31 Oct 2011 12:00:06 +0100, Compilation 0
    jordi@jordi-desktop:/usr/brlcad
    BRL-CAD Release 7.20.4 The BRL-CAD Ray-Tracing Library
    Mon, 31 Oct 2011 12:00:06 +0100, Compilation 0
    jordi@jordi-desktop:/usr/brlcad
    BRL-CAD Release 7.20.4 The BRL-CAD Numerical Computation Library
    Mon, 31 Oct 2011 12:00:06 +0100, Compilation 0
    jordi@jordi-desktop:/usr/brlcad
    BRL-CAD Release 7.20.4 The BRL-CAD Utility Library
    Mon, 31 Oct 2011 12:00:06 +0100, Compilation 0
    jordi@jordi-desktop:/usr/brlcad

    dad@harry:~$ echo $PATH
    /usr/lib/jvm/java-6-sun/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/brlcad/bin:.
    dad@harry:~$
    dad@harry:~$ mged
    Illegal instruction
    dad@harry:~$

     
  • Elven Decker
    Elven Decker
    2011-12-23

    Checking package dependencies, I am using libgl1-mesa-glx and libglu1-mesa. Neither libgl1 or libglu1 are on my system.

     
  • Jordi Sayol
    Jordi Sayol
    2011-12-23

    Can you properly run this command?
    $ glxgears

     
  • Elven Decker
    Elven Decker
    2011-12-24

    A nice graphical display of three meshed gears rotating.

    glxgears
    Running synchronized to the vertical refresh. The framerate should be
    approximately the same as the monitor refresh rate.
    1192 frames in 5.0 seconds = 238.232 FPS
    1263 frames in 5.0 seconds = 252.418 FPS
    1284 frames in 5.0 seconds = 256.649 FPS
    1333 frames in 5.0 seconds = 266.478 FPS
    1279 frames in 5.0 seconds = 255.781 FPS
    ^C

     
  • Jordi Sayol
    Jordi Sayol
    2011-12-24

    I really don't understand what's happening on your system.
    I've properly installed and run "brlcad_7.20.4-0_i386.deb" on a fresh/clean Ubuntu 10.10 32-bit.

     
  • Elven Decker
    Elven Decker
    2011-12-24

    • priority: 5 --> 3
     
  • Elven Decker
    Elven Decker
    2011-12-24

    OK. Thanks for your efforts. I note the time on your post!

    Let me tinker with it for a few weeks. I use a CAD package at work and I'm looking for a tool to fit my hobby requirements at home. BRL-CAD looks like the right tool, and I'm pretty confident I can sort it out over time. I'm putting together a clean Oneiric install soon (my current environment has been a series of upgrades) and I suspect that it will work just fine in that environment.

    Thank you!

     
  • Sean Morrison
    Sean Morrison
    2012-01-04

    Elven,

    Try running mged from within a debugger:

    gdb --args mged
    ...
    gdb> run
    gdb> backtrace

    Save the backtrace output to a file and attach that to this tracker. It should hopefully shed some light on why mged is failing to start.

     
  • Sean Morrison
    Sean Morrison
    2012-01-04

    • assigned_to: nobody --> jordisayol
    • status: open --> pending-works-for-me
     
  • Elven Decker
    Elven Decker
    2012-01-08

    gdb mged
    GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08
    Copyright (C) 2011 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law. Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "i686-linux-gnu".
    For bug reporting instructions, please see:
    <http://bugs.launchpad.net/gdb-linaro/>...
    Reading symbols from /usr/brlcad/bin/mged...(no debugging symbols found)...done.
    (gdb) run
    Starting program: /usr/brlcad/bin/mged
    [Thread debugging using libthread_db enabled]
    [New Thread 0xa94e2b70 (LWP 10851)]

    Program received signal SIGILL, Illegal instruction.
    0x00e6a617 in ?? () from /usr/brlcad/lib/libtcl.so.8.5
    (gdb) where
    #0 0x00e6a617 in ?? () from /usr/brlcad/lib/libtcl.so.8.5
    #1 0x00e6c150 in TclParseNumber () from /usr/brlcad/lib/libtcl.so.8.5
    #2 0x00dfa565 in ?? () from /usr/brlcad/lib/libtcl.so.8.5
    #3 0x00dfc72c in ?? () from /usr/brlcad/lib/libtcl.so.8.5
    #4 0x00dfdcdb in TclCompileExpr () from /usr/brlcad/lib/libtcl.so.8.5
    #5 0x00e03ee9 in TclCompileExprWords () from /usr/brlcad/lib/libtcl.so.8.5
    #6 0x00df4d63 in TclCompileIfCmd () from /usr/brlcad/lib/libtcl.so.8.5
    #7 0x00e0182a in TclCompileScript () from /usr/brlcad/lib/libtcl.so.8.5
    #8 0x00e04814 in TclSetByteCodeFromAny () from /usr/brlcad/lib/libtcl.so.8.5
    #9 0x00e04a24 in ?? () from /usr/brlcad/lib/libtcl.so.8.5
    #10 0x00e5e113 in ?? () from /usr/brlcad/lib/libtcl.so.8.5
    #11 0x00e5e2b0 in ?? () from /usr/brlcad/lib/libtcl.so.8.5
    #12 0x00e5efac in TclObjInterpProc () from /usr/brlcad/lib/libtcl.so.8.5
    #13 0x00dc8de7 in TclEvalObjvInternal () from /usr/brlcad/lib/libtcl.so.8.5
    #14 0x00dc8ceb in TclEvalObjvInternal () from /usr/brlcad/lib/libtcl.so.8.5
    #15 0x00e14e40 in TclExecuteByteCode () from /usr/brlcad/lib/libtcl.so.8.5
    #16 0x00e1eede in TclCompEvalObj () from /usr/brlcad/lib/libtcl.so.8.5
    #17 0x00dc9ee1 in TclEvalObjEx () from /usr/brlcad/lib/libtcl.so.8.5
    #18 0x00dd3a37 in Tcl_ForeachObjCmd () from /usr/brlcad/lib/libtcl.so.8.5
    #19 0x00dc8de7 in TclEvalObjvInternal () from /usr/brlcad/lib/libtcl.so.8.5
    #20 0x00dc9865 in TclEvalEx () from /usr/brlcad/lib/libtcl.so.8.5
    #21 0x00dc9ba6 in Tcl_EvalEx () from /usr/brlcad/lib/libtcl.so.8.5
    #22 0x00e3bb12 in Tcl_FSEvalFileEx () from /usr/brlcad/lib/libtcl.so.8.5
    #23 0x00de1e47 in Tcl_SourceObjCmd () from /usr/brlcad/lib/libtcl.so.8.5
    #24 0x00dc8de7 in TclEvalObjvInternal () from /usr/brlcad/lib/libtcl.so.8.5
    #25 0x00dc9d97 in Tcl_EvalObjv () from /usr/brlcad/lib/libtcl.so.8.5
    #26 0x00dca1b8 in TclEvalObjEx () from /usr/brlcad/lib/libtcl.so.8.5
    #27 0x00e5f4d6 in Tcl_UplevelObjCmd () from /usr/brlcad/lib/libtcl.so.8.5
    #28 0x00dc8de7 in TclEvalObjvInternal () from /usr/brlcad/lib/libtcl.so.8.5
    #29 0x00e14e40 in TclExecuteByteCode () from /usr/brlcad/lib/libtcl.so.8.5
    #30 0x00e5ea5c in TclObjInterpProcCore () from /usr/brlcad/lib/libtcl.so.8.5
    #31 0x00e5efd7 in TclObjInterpProc () from /usr/brlcad/lib/libtcl.so.8.5
    #32 0x00dc8de7 in TclEvalObjvInternal () from /usr/brlcad/lib/libtcl.so.8.5
    #33 0x00e14e40 in TclExecuteByteCode () from /usr/brlcad/lib/libtcl.so.8.5
    #34 0x00e1eede in TclCompEvalObj () from /usr/brlcad/lib/libtcl.so.8.5
    #35 0x00dc9ee1 in TclEvalObjEx () from /usr/brlcad/lib/libtcl.so.8.5
    #36 0x00e4bc92 in ?? () from /usr/brlcad/lib/libtcl.so.8.5
    #37 0x00e4c87e in Tcl_NamespaceObjCmd () from /usr/brlcad/lib/libtcl.so.8.5
    #38 0x00dc8de7 in TclEvalObjvInternal () from /usr/brlcad/lib/libtcl.so.8.5
    #39 0x00dc9865 in TclEvalEx () from /usr/brlcad/lib/libtcl.so.8.5
    #40 0x00dc9ba6 in Tcl_EvalEx () from /usr/brlcad/lib/libtcl.so.8.5
    #41 0x00dc9bec in Tcl_Eval () from /usr/brlcad/lib/libtcl.so.8.5
    #42 0x003640e1 in Itcl_Init () from /usr/brlcad/lib/libitcl.so.3
    #43 0x080e7ca2 in mged_setup ()
    #44 0x080d379d in main ()
    (gdb)

    ***************************************
    I'm thinking this is really a Tcl problem...

    /usr/brlcad/bin$ ./wish
    Illegal instruction
    dad@harry:/usr/brlcad/bin$ gdb ./wish
    GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08
    Copyright (C) 2011 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law. Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "i686-linux-gnu".
    For bug reporting instructions, please see:
    <http://bugs.launchpad.net/gdb-linaro/>...
    Reading symbols from /usr/brlcad/bin/wish...(no debugging symbols found)...done.
    (gdb) run
    Starting program: /usr/brlcad/bin/wish
    [Thread debugging using libthread_db enabled]
    [New Thread 0xb7dddb70 (LWP 11096)]

    Program received signal SIGILL, Illegal instruction.
    0x002ffc1c in ?? () from /usr/brlcad/lib/libtk.so.8.5
    (gdb) where
    #0 0x002ffc1c in ?? () from /usr/brlcad/lib/libtk.so.8.5
    #1 0x002ff798 in ?? () from /usr/brlcad/lib/libtk.so.8.5
    #2 0x002ff94f in Tk_GetPixelsFromObj () from /usr/brlcad/lib/libtk.so.8.5
    #3 0x002bc5e5 in ?? () from /usr/brlcad/lib/libtk.so.8.5
    #4 0x002bbbab in Tk_InitOptions () from /usr/brlcad/lib/libtk.so.8.5
    #5 0x002bb9a8 in Tk_InitOptions () from /usr/brlcad/lib/libtk.so.8.5
    #6 0x002d0c82 in ?? () from /usr/brlcad/lib/libtk.so.8.5
    #7 0x002d050d in TkCreateFrame () from /usr/brlcad/lib/libtk.so.8.5
    #8 0x00341d06 in ?? () from /usr/brlcad/lib/libtk.so.8.5
    #9 0x003414bd in Tk_Init () from /usr/brlcad/lib/libtk.so.8.5
    #10 0x080488ef in Tcl_AppInit ()
    #11 0x002f5bdf in Tk_MainEx () from /usr/brlcad/lib/libtk.so.8.5
    #12 0x080488c0 in main ()
    (gdb)

    I also have a local wish installed on my system at
    /usr/bin/wish

    Thanks

     
  • Elven Decker
    Elven Decker
    2012-01-08

    • status: pending-works-for-me --> open-works-for-me
     
  • notius
    notius
    2012-02-17

    Hi,

    I would like to give my conclusion firstly:
    This deb might be built on certain hardware dependencies, so when installed to another system, problem came out.
    Re-build from source could solve the problem.

    My OS is debian squeeze 6.0.4 installed on a USB hard driver using i686-kernal image and it can run with x86 PC that support USB boot.

    At first I install BRL-CAD using downloaded brlcad 7.20.4 deb file in this OS running with a desktop PC. $/usr/brlcad/bin/mged goes quite well.

    Later I move this OS with brlcad installed on it without any change to another PC. Then mged gives the "illegal instruction" output and fail to start. Acording to the suggestion here I used gdb and got the same output. So I thought it is the same problem.

    Move back to the first PC, it still runs without problem.

    So the probelm should locate at the hardware difference. The first PC is with Intel iCore CPU(64 bit 4 cores), 4G Memory; while the second PC is with Intel Pentium-M(32 bit), 512M Memory.

    I followed the http://brlcad.org/wiki/Compiling and http://brlcad.org/wiki/Building_from_SVN,
    compile it and build 7.20.4 source using the OS running on the second PC(32-bit)(ie, apt-get all the dependencies, then ./autogen.sh, then ./configure --enable-optimized, then make, make install) finally the mged runs on both PC.

    I hope this might give some clue for find a solution.

    Best Regards,

     
  • Jordi Sayol
    Jordi Sayol
    2012-02-18

    If the problem is the CPU where the deb was compiled, then you can try to compile/build a deb in your system.
    From brlcad root directory, run this script:
    $ sh/make_deb.sh -b
    If everything goes fine, you will get a deb package compatible with your CPU.

    Best regards,

     
  • notius
    notius
    2012-02-18

    Thank you, Jordi. Now I have found that script, good tools.

    Before, I didn't know there is a script for building it into deb, so I just complied and use "make install" to install by hand and it works.

    Best Regards,

     
  • notius
    notius
    2012-02-22

    Hi, Jordi,

    I have tested this deb package. Still the same error "illegal instruction"with my older PC, and no error on the newer PC.

    By the way , I noticed that my own complied libtk8.5.so and libtcl8.5.so is quite larger than the ones installed from deb(6M vs 1M). I tried replacing the libtk.so.8.5 and libtcl.so.8.5.9 with My own compiled ones, I found that mged could start without "illegal instruction" error and can open .g file and do some works. However, fail to "Raytrace". See if this might help avance?

    Best Regards,

     
  • Jordi Sayol
    Jordi Sayol
    2012-02-22

    notilus, many thanks for testing.

    With libtcl.so that properly run on your old system, can you run this?

    $ nm libtcl.so > objects.txt

    and send me objects.txt?

    Regards,

     
  • Jordi Sayol
    Jordi Sayol
    2012-02-24

    notius, thanks to your tests, Christopher has found the source of the problem and has corrected it.
    Can you test this deb package on your "Intel Pentium-M(32-bit), 512M Memory"?
    elvendecker, if you test it too, will be very usefull.

    https://brlcad.googlecode.com/files/brlcad_7.21.0-1_i386.deb

    many thanks,

     
  • notius
    notius
    2012-02-25

    Thank you all! I have tested the newest .deb and it works now!
    Best Regards,

     
  • Jordi Sayol
    Jordi Sayol
    2012-02-25

    notius, many thanks for your help to solve this problem.

     
  • Elven Decker
    Elven Decker
    2012-02-25

    • status: open-works-for-me --> closed-works-for-me