Menu

#394 Segmentation fault on ppc64le

crash or data loss
open
nobody
5
2021-04-22
2021-04-19
Draena Xon
No

Greetings, after being able to build BRLCAD without "-DBRLCAD_BUNDLED_LIBS=ON" option, both Archer and Mged crash.

This is the output from Mged while using GDB:

gdb bin/mged
GNU gdb (GDB) 10.1
Copyright (C) 2020 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 "powerpc64le-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from bin/mged...
(gdb) run
Starting program: /home/yamira/software/brlcad-7.32.2/build/bin/mged 
warning: Could not load shared library symbols for linux-vdso64.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
[New Thread 0x3fffe7685070 (LWP 17504)]
[New Thread 0x3fffe6d43070 (LWP 17505)]
[New Thread 0x3fffe6542070 (LWP 17506)]
[New Thread 0x3fffe5d41070 (LWP 17507)]
[New Thread 0x3fffe5540070 (LWP 17508)]
[New Thread 0x3fffe4d3f070 (LWP 17509)]
[New Thread 0x3fffcffff070 (LWP 17510)]
[New Thread 0x3fffcf7fe070 (LWP 17511)]
[New Thread 0x3fffceffd070 (LWP 17512)]
[New Thread 0x3fffce7fc070 (LWP 17513)]
[New Thread 0x3fffcdffb070 (LWP 17514)]
[New Thread 0x3fffcd7fa070 (LWP 17515)]
[New Thread 0x3fffccff9070 (LWP 17516)]
[New Thread 0x3fffaffff070 (LWP 17517)]
[New Thread 0x3fffaf7fe070 (LWP 17518)]
[New Thread 0x3fffaeffd070 (LWP 17519)]
[New Thread 0x3fffae7fc070 (LWP 17520)]
[New Thread 0x3fffadffb070 (LWP 17521)]
[New Thread 0x3fffad7fa070 (LWP 17522)]
[New Thread 0x3fffacff9070 (LWP 17523)]
[New Thread 0x3fff8ffff070 (LWP 17525)]
[New Thread 0x3fff8f7fe070 (LWP 17526)]
[New Thread 0x3fff8effd070 (LWP 17527)]
[New Thread 0x3fff8e7fc070 (LWP 17528)]
[New Thread 0x3fff8dffb070 (LWP 17529)]
[New Thread 0x3fff8d7fa070 (LWP 17530)]
[New Thread 0x3fff8cff9070 (LWP 17531)]
[New Thread 0x3fff6ffff070 (LWP 17532)]
[New Thread 0x3fff6f7fe070 (LWP 17533)]
[New Thread 0x3fff6effd070 (LWP 17534)]
[New Thread 0x3fff6e7fc070 (LWP 17535)]
[New Thread 0x3fff6dffb070 (LWP 17536)]
[New Thread 0x3fff6d7fa070 (LWP 17537)]
[New Thread 0x3fff6cff9070 (LWP 17538)]
[New Thread 0x3fff4ffff070 (LWP 17539)]
[New Thread 0x3fff4f7fe070 (LWP 17540)]
[New Thread 0x3fff4effd070 (LWP 17541)]
[New Thread 0x3fff4e7fc070 (LWP 17542)]
[New Thread 0x3fff4dffb070 (LWP 17543)]
[New Thread 0x3fff4d7fa070 (LWP 17544)]

Thread 1 "mged" received signal SIGSEGV, Segmentation fault.
--Type <RET> for more, q to quit, c to continue without paging--
0x00003fffeff09b54 in glGetIntegerv () from /usr/lib/libGLX_mesa.so.0
(gdb) quit 
A debugging session is active.

    Inferior 1 [process 17499] will be killed.

Regarding Archer, the output is different:

gdb bin/archer
GNU gdb (GDB) 10.1
Copyright (C) 2020 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 "powerpc64le-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from bin/archer...
(gdb) run
Starting program: /home/yamira/software/brlcad-7.32.2/build/bin/archer 
warning: Could not load shared library symbols for linux-vdso64.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
[New Thread 0x3fffef90c070 (LWP 17592)]
invalid command name "::hv3::formmanager"

Unexpected error encountered while running Archer.
Aborting.
[Thread 0x3fffef90c070 (LWP 17592) exited]
[Inferior 1 (process 17589) exited with code 01]

Discussion

  • Sean Morrison

    Sean Morrison - 2021-04-19

    Thank you for this report. Can you tell what your operating system and hardware is? Also, it would help if you ran "b exit" and "bt" so we can see the full backtrace where they are halting. At a glance, archer and mged appear to be failing for completely different reasons.

    One workaround is to disable opengl (-DBRLCAD_ENABLE_OPENGL=OFF) which should make mged work, but will disable archer completely.

     
  • Draena Xon

    Draena Xon - 2021-04-19

    My apologies for my ignorance:

    Operating system: Void GNU Linux

    CPU: POWER9 ppc64le

    GPU: AMD Vega 64

    Motherboard: Talos II Lite (https://www.raptorcs.com/content/TL1MB1/intro.html)

    regarding "bt" and "b exit " on mged:

    (gdb) bt
    #0  0x00003fffeff09b54 in glGetIntegerv () from /usr/lib/libGLX_mesa.so.0
    #1  0x00003fffefefa954 in ?? () from /usr/lib/libGLX_mesa.so.0
    #2  0x00003fffefee1a74 in ?? () from /usr/lib/libGLX_mesa.so.0
    #3  0x00003ffff27b4290 in glXUseXFont () from /usr/lib/libGLX.so.0
    #4  0x00003ffff65e06bc in glXUseXFont () from /usr/lib/libGL.so.1
    #5  0x00003ffff260c5b8 in ogl_configureWin_guts (dmp=0x1004c7b30, force=1) at /home/yamira/software/brlcad-7.32.2/src/libdm/glx/dm-ogl.c:263
    #6  0x00003ffff260ecbc in ogl_open (vinterp=0x100223d80, argc=6, argv=0x100228f78)
        at /home/yamira/software/brlcad-7.32.2/src/libdm/glx/dm-ogl.c:1030
    #7  0x00003ffff7de51c8 in dm_open (interp=0x100223d80, type=0x10027d540 "ogl", argc=7, argv=0x100228f70)
        at /home/yamira/software/brlcad-7.32.2/src/libdm/dm_plugins.cpp:61
    #8  0x00000001000251e0 in mged_dm_init (o_dm=0x100207b40, dm_type=0x10027d540 "ogl", argc=8, argv=0x100228f70)
        at /home/yamira/software/brlcad-7.32.2/src/mged/attach.c:94
    #9  0x0000000100026870 in mged_attach (wp_name=0x10027d540 "ogl", argc=8, argv=0x100228f70)
        at /home/yamira/software/brlcad-7.32.2/src/mged/attach.c:448
    #10 0x0000000100026148 in f_attach (UNUSED_clientData=0x1001479a8 <mged_cmdtab+408>, interpreter=0x100223d80, argc=8, argv=0x100228f70)
        at /home/yamira/software/brlcad-7.32.2/src/mged/attach.c:310
    #11 0x00003ffff5c57e48 in TclInvokeStringCommand (clientData=0x1006cc7a0, interp=0x100223d80, objc=<optimized out>, objv=<optimized out>)
        at /home/yamira/software/brlcad-7.32.2/src/other/tcl/generic/tclBasic.c:2505
    #12 0x00003ffff5c571a0 in Dispatch (data=<optimized out>, interp=<optimized out>, result=<optimized out>)
        at /home/yamira/software/brlcad-7.32.2/src/other/tcl/generic/tclBasic.c:4456
    #13 0x00003ffff5c5ede0 in TclNRRunCallbacks (interp=0x100223d80, result=0, rootPtr=0x0)
        at /home/yamira/software/brlcad-7.32.2/src/other/tcl/generic/tclBasic.c:4492
    #14 0x00003ffff5c5eeb4 in Tcl_EvalObjv (interp=0x100223d80, objc=<optimized out>, objv=<optimized out>, flags=<optimized out>)
        at /home/yamira/software/brlcad-7.32.2/src/other/tcl/generic/tclBasic.c:4215
    #15 0x00003ffff5c60db0 in TclEvalEx (interp=0x100223d80, script=0x100790da0 "gui", numBytes=<optimized out>, flags=<optimized out>, 
        line=<optimized out>, clNextOuter=<optimized out>, outerScript=0x100790da0 "gui")
        at /home/yamira/software/brlcad-7.32.2/src/other/tcl/generic/tclBasic.c:5361
    #16 0x00003ffff5c614a4 in Tcl_EvalEx (interp=<optimized out>, script=<optimized out>, numBytes=<optimized out>, flags=<optimized out>)
        at /home/yamira/software/brlcad-7.32.2/src/other/tcl/generic/tclBasic.c:5026
    #17 0x00003ffff5c614fc in Tcl_Eval (interp=<optimized out>, script=<optimized out>)
        at /home/yamira/software/brlcad-7.32.2/src/other/tcl/generic/tclBasic.c:5955
    #18 0x00000001000b9604 in main (argc=0, argv=0x3fffffffe960) at /home/yamira/software/brlcad-7.32.2/src/mged/mged.c:1487
    (gdb) b exit
    Breakpoint 1 at 0x3ffff6dd7818: file exit.c, line 138.
    

    regarding "bt" and "b exit " on Archer:

    (gdb) bt
    No stack.
    (gdb) b exit
    Breakpoint 1 at 0x3ffff6bb5818: file exit.c, line 138.
    

    I can confirm I can run Mged by disabling OpenGL.

    Tell me if you need more info, I will gladly provide it.

     
    • Sean Morrison

      Sean Morrison - 2021-04-19

      That's perfect for mged, thank you! For archer, you have to run "b exit" first, then "run", then "bt". You may need to run "b exit_" alternatively.

       
  • Draena Xon

    Draena Xon - 2021-04-19

    Ok, this is the output, you can tell that I don't know what I'm doing :P

    gdb bin/archer
    GNU gdb (GDB) 10.1
    Copyright (C) 2020 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 "powerpc64le-unknown-linux-gnu".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <https://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
        <http://www.gnu.org/software/gdb/documentation/>.
    
    For help, type "help".
    Type "apropos word" to search for commands related to "word"...
    Reading symbols from bin/archer...
    (gdb) b exit
    Function "exit" not defined.
    Make breakpoint pending on future shared library load? (y or [n]) y
    Breakpoint 1 (exit) pending.
    (gdb) run
    Starting program: /home/yamira/software/brlcad-7.32.2/build/bin/archer 
    warning: Could not load shared library symbols for linux-vdso64.so.1.
    Do you need "set solib-search-path" or "set sysroot"?
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/usr/lib64/libthread_db.so.1".
    
    [New Thread 0x3fffef90c070 (LWP 18646)]
    invalid command name "::hv3::formmanager"
    
    Unexpected error encountered while running Archer.
    Aborting.
    [Thread 0x3fffef90c070 (LWP 18646) exited]
    
    Thread 1 "archer" hit Breakpoint 1, __GI_exit (status=1) at exit.c:139
    139 exit.c: No such file or directory.
    (gdb) 
    (gdb) b exit_
    Function "exit_" not defined.
    Make breakpoint pending on future shared library load? (y or [n]) y
    Breakpoint 2 (exit_) pending.
    (gdb) b exit
    Note: breakpoint 1 also set at pc 0x3ffff6bb5818.
    Breakpoint 3 at 0x3ffff6bb5818: file exit.c, line 138.
    (gdb) b exit
    Note: breakpoints 1 and 3 also set at pc 0x3ffff6bb5818.
    Breakpoint 4 at 0x3ffff6bb5818: file exit.c, line 138.
    (gdb) b exit
    Note: breakpoints 1, 3 and 4 also set at pc 0x3ffff6bb5818.
    Breakpoint 5 at 0x3ffff6bb5818: file exit.c, line 138.
    (gdb) b exit
    Note: breakpoints 1, 3, 4 and 5 also set at pc 0x3ffff6bb5818.
    Breakpoint 6 at 0x3ffff6bb5818: file exit.c, line 138.
    (gdb) run
    The program being debugged has been started already.
    Start it from the beginning? (y or n) y
    Starting program: /home/yamira/software/brlcad-7.32.2/build/bin/archer 
    warning: Could not load shared library symbols for linux-vdso64.so.1.
    Do you need "set solib-search-path" or "set sysroot"?
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/usr/lib64/libthread_db.so.1".
    [New Thread 0x3fffef90c070 (LWP 18873)]
    invalid command name "::hv3::formmanager"
    
    Unexpected error encountered while running Archer.
    Aborting.
    [Thread 0x3fffef90c070 (LWP 18873) exited]
    
    Thread 1 "archer" hit Breakpoint 1, __GI_exit (status=1) at exit.c:139
    139 exit.c: No such file or directory.
    (gdb) b exit
    Note: breakpoints 1, 3, 4, 5 and 6 also set at pc 0x3ffff6bb5818.
    Breakpoint 7 at 0x3ffff6bb5818: file exit.c, line 138.
    (gdb) 
    

    I have to go so my next reply might be way later. I will be online as soon as I can.

     
    • Sean Morrison

      Sean Morrison - 2021-04-19

      thats my mistake, I meant "b _exit"...

       
  • Draena Xon

    Draena Xon - 2021-04-20

    Sorry for the delay:

    GNU gdb (GDB) 10.1
    Copyright (C) 2020 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 "powerpc64le-unknown-linux-gnu".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <https://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
        <http://www.gnu.org/software/gdb/documentation/>.
    
    For help, type "help".
    Type "apropos word" to search for commands related to "word"...
    Reading symbols from bin/archer...
    (gdb) b _exit
    Function "_exit" not defined.
    Make breakpoint pending on future shared library load? (y or [n]) y
    Breakpoint 1 (_exit) pending.
    (gdb) run
    Starting program: /home/yamira/software/brlcad-7.32.2/build/bin/archer 
    warning: Could not load shared library symbols for linux-vdso64.so.1.
    Do you need "set solib-search-path" or "set sysroot"?
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/usr/lib64/libthread_db.so.1".
    [New Thread 0x3fffef90c070 (LWP 7663)]
    invalid command name "::hv3::formmanager"
    
    Unexpected error encountered while running Archer.
    Aborting.
    [Thread 0x3fffef90c070 (LWP 7663) exited]
    
    Thread 1 "archer" hit Breakpoint 1, 0x00003ffff6c5f038 in __GI__exit (status=1) at ../sysdeps/unix/sysv/linux/_exit.c:27
    27  ../sysdeps/unix/sysv/linux/_exit.c: No such file or directory.
    (gdb) run
    The program being debugged has been started already.
    Start it from the beginning? (y or n) n
    Program not restarted.
    (gdb) b _exit
    Note: breakpoint 1 also set at pc 0x3ffff6c5f038.
    Breakpoint 2 at 0x3ffff6c5f038: file ../sysdeps/unix/sysv/linux/_exit.c, line 27.
    (gdb) run
    The program being debugged has been started already.
    Start it from the beginning? (y or n) y
    Starting program: /home/yamira/software/brlcad-7.32.2/build/bin/archer 
    warning: Could not load shared library symbols for linux-vdso64.so.1.
    Do you need "set solib-search-path" or "set sysroot"?
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/usr/lib64/libthread_db.so.1".
    [New Thread 0x3fffef90c070 (LWP 9294)]
    invalid command name "::hv3::formmanager"
    
    Unexpected error encountered while running Archer.
    Aborting.
    [Thread 0x3fffef90c070 (LWP 9294) exited]
    
    Thread 1 "archer" hit Breakpoint 1, 0x00003ffff6c5f038 in __GI__exit (status=1) at ../sysdeps/unix/sysv/linux/_exit.c:27
    27  ../sysdeps/unix/sysv/linux/_exit.c: No such file or directory.
    (gdb) b _exit
    Note: breakpoints 1 and 2 also set at pc 0x3ffff6c5f038.
    Breakpoint 3 at 0x3ffff6c5f038: file ../sysdeps/unix/sysv/linux/_exit.c, line 27.
    (gdb) 
    
     
  • Sean Morrison

    Sean Morrison - 2021-04-20

    You set the breakpoint correctly with "b _exit" but then needed to run "bt" to get the backtrace.

    Can you see if "bwish" runs? Should just pop open a simple window.

     
    • Draena Xon

      Draena Xon - 2021-04-20
      (gdb) bt
      #0  0x00003ffff6c5f038 in __GI__exit (status=1) at ../sysdeps/unix/sysv/linux/_exit.c:27
      #1  0x00003ffff6bb57bc in __run_exit_handlers (status=<optimized out>, listp=0x3ffff6d79818 <__exit_funcs>, 
          run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:132
      #2  0x00003ffff6bb5838 in __GI_exit (status=<optimized out>) at exit.c:139
      #3  0x00003ffff7bb1a64 in Tcl_Exit (status=<optimized out>) at /home/yamira/software/brlcad-7.32.2/src/other/tcl/generic/tclEvent.c:995
      #4  0x00003ffff7b1a15c in Tcl_ExitObjCmd (dummy=<optimized out>, interp=<optimized out>, objc=<optimized out>, objv=<optimized out>)
          at /home/yamira/software/brlcad-7.32.2/src/other/tcl/generic/tclCmdAH.c:1057
      #5  0x00003ffff7afd1a0 in Dispatch (data=<optimized out>, interp=<optimized out>, result=<optimized out>)
          at /home/yamira/software/brlcad-7.32.2/src/other/tcl/generic/tclBasic.c:4456
      #6  0x00003ffff7b04de0 in TclNRRunCallbacks (interp=0x1000e6ba0, result=0, rootPtr=0x0)
          at /home/yamira/software/brlcad-7.32.2/src/other/tcl/generic/tclBasic.c:4492
      #7  0x00003ffff7b04eb4 in Tcl_EvalObjv (interp=0x1000e6ba0, objc=<optimized out>, objv=<optimized out>, flags=<optimized out>)
          at /home/yamira/software/brlcad-7.32.2/src/other/tcl/generic/tclBasic.c:4215
      #8  0x00003ffff7b06db0 in TclEvalEx (interp=0x1000e6ba0, 
          script=0x1008a11b0 "#", ' ' <repeats 16 times>, "A R C H E R _ I N I T . T C L\n# BRL-CAD\n#\n# Copyright (c) 2002-2021 United States Government as represented by\n# the U.S. Army Research Laboratory.\n#\n# This library is free software; "..., numBytes=<optimized out>, 
          flags=<optimized out>, line=<optimized out>, clNextOuter=<optimized out>, 
          outerScript=0x1008a11b0 "#", ' ' <repeats 16 times>, "A R C H E R _ I N I T . T C L\n# BRL-CAD\n#\n# Copyright (c) 2002-2021 United States Government as represented by\n# the U.S. Army Research Laboratory.\n#\n# This library is free software; "...)
          at /home/yamira/software/brlcad-7.32.2/src/other/tcl/generic/tclBasic.c:5361
      #9  0x00003ffff7c03038 in Tcl_FSEvalFileEx (encodingName=<optimized out>, pathPtr=0x1001c7560, interp=0x1000e6ba0)
          at /home/yamira/software/brlcad-7.32.2/src/other/tcl/generic/tclIOUtil.c:1824
      #10 Tcl_FSEvalFileEx (interp=0x1000e6ba0, pathPtr=0x1001c7560, encodingName=<optimized out>)
          at /home/yamira/software/brlcad-7.32.2/src/other/tcl/generic/tclIOUtil.c:1724
      #11 0x00003ffff7c032bc in Tcl_FSEvalFile (interp=<optimized out>, pathPtr=<optimized out>)
          at /home/yamira/software/brlcad-7.32.2/src/other/tcl/generic/tclIOUtil.c:1720
      #12 0x00003ffff7c03330 in Tcl_EvalFile (interp=0x1000e6ba0, fileName=<optimized out>)
          at /home/yamira/software/brlcad-7.32.2/src/other/tcl/generic/tclIOUtil.c:424
      #13 0x0000000100001450 in main (argc=0, argv=0x3fffffffe960) at /home/yamira/software/brlcad-7.32.2/src/archer/archer.c:116
      

      And seems BWISH runs without issues

       
  • Sean Morrison

    Sean Morrison - 2021-04-20

    One detail, I see that you have not installed... on your hardware, installation may be necessary.

    You are on a hardware configuration that we've not tested the GUI on ourselves before. Both the OpenGL/Mesa issue affecting MGED and the hv3/tk8.6 issue affecting Archer appear to be likely related. Since you have a solution for MGED (i.e., X11-only), it may be best to focus on what's going wrong with Archer. Have you tried compiling against a system-installed tcl/tk 8.6 instead of bundled libs?

     
    • Draena Xon

      Draena Xon - 2021-04-20
      Post awaiting moderation.
    • Draena Xon

      Draena Xon - 2021-04-21

      Greetings, after realizing I didn't have tcl's dev packages installed, I proceeded in installing them and now I cannot compile it and the following error appears

       20%] Building C object src/other/itk3/CMakeFiles/itk.dir/generic/itkStubInit.c.o
      In file included from /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkStubInit.c:12:
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itk.h:114:5: error: unknown type name 'ItclMember'
        114 |     ItclMember *member;           /* info about this option */
            |     ^~~~~~~~~~
      In file included from /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itk.h:120,
                       from /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkStubInit.c:12:
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h: In function 'TCL_EXTERN':
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:33:18: error: expected declaration specifiers before 'Itk_Init'
         33 | TCL_EXTERN(int)  Itk_Init _ANSI_ARGS_((Tcl_Interp * interp));
            |                  ^~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:38:1: error: expected declaration specifiers before 'TCL_EXTERN'
         38 | TCL_EXTERN(int)  Itk_SafeInit _ANSI_ARGS_((Tcl_Interp * interp));
            | ^~~~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:43:1: error: expected declaration specifiers before 'TCL_EXTERN'
         43 | TCL_EXTERN(int)  Itk_ConfigBodyCmd _ANSI_ARGS_((ClientData cdata,
            | ^~~~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:50:1: error: expected declaration specifiers before 'TCL_EXTERN'
         50 | TCL_EXTERN(int)  Itk_UsualCmd _ANSI_ARGS_((ClientData cdata,
            | ^~~~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:57:1: error: expected declaration specifiers before 'TCL_EXTERN'
         57 | TCL_EXTERN(int)  Itk_ClassOptionDefineCmd _ANSI_ARGS_((
            | ^~~~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:64:1: error: expected declaration specifiers before 'TCL_EXTERN'
         64 | TCL_EXTERN(int)  Itk_ClassOptionIllegalCmd _ANSI_ARGS_((
            | ^~~~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:71:1: error: expected declaration specifiers before 'TCL_EXTERN'
         71 | TCL_EXTERN(int)  Itk_ConfigClassOption _ANSI_ARGS_((
            | ^~~~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:78:1: error: expected declaration specifiers before 'TCL_EXTERN'
         78 | TCL_EXTERN(ItkClassOptTable*) Itk_CreateClassOptTable _ANSI_ARGS_((
            | ^~~~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:84:1: error: expected declaration specifiers before 'TCL_EXTERN'
         84 | TCL_EXTERN(ItkClassOptTable*) Itk_FindClassOptTable _ANSI_ARGS_((
            | ^~~~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:91:1: error: expected declaration specifiers before 'TCL_EXTERN'
         91 | TCL_EXTERN(int)  Itk_CreateClassOption _ANSI_ARGS_((
            | ^~~~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:100:1: error: expected declaration specifiers before 'TCL_EXTERN'
        100 | TCL_EXTERN(ItkClassOption*) Itk_FindClassOption _ANSI_ARGS_((
            | ^~~~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:106:1: error: expected declaration specifiers before 'TCL_EXTERN'
        106 | TCL_EXTERN(void) Itk_DelClassOption _ANSI_ARGS_((ItkClassOption * opt));
            | ^~~~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:111:1: error: expected declaration specifiers before 'TCL_EXTERN'
        111 | TCL_EXTERN(int)  Itk_ArchetypeInit _ANSI_ARGS_((Tcl_Interp* interp));
            | ^~~~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:116:1: error: expected declaration specifiers before 'TCL_EXTERN'
        116 | TCL_EXTERN(void) Itk_OptListInit _ANSI_ARGS_((ItkOptList* olist,
            | ^~~~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:122:1: error: expected declaration specifiers before 'TCL_EXTERN'
        122 | TCL_EXTERN(void) Itk_OptListFree _ANSI_ARGS_((ItkOptList* olist));
            | ^~~~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:127:1: error: expected declaration specifiers before 'TCL_EXTERN'
        127 | TCL_EXTERN(void) Itk_OptListAdd _ANSI_ARGS_((ItkOptList* olist,
            | ^~~~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:133:1: error: expected declaration specifiers before 'TCL_EXTERN'
        133 | TCL_EXTERN(void) Itk_OptListRemove _ANSI_ARGS_((ItkOptList* olist,
            | ^~~~~~~~~~
      In file included from /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itk.h:120,
                       from /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkStubInit.c:12:
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:159:3: error: storage class specified for parameter 'ItkStubs'
        159 | } ItkStubs;
            |   ^~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:161:1: error: unknown type name 'TCL_EXTERNC'; did you mean 'ITCL_EXTERN'?
        161 | TCL_EXTERNC ItkStubs *itkStubsPtr;
            | ^~~~~~~~~~~
            | ITCL_EXTERN
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:161:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
        161 | TCL_EXTERNC ItkStubs *itkStubsPtr;
            |                      ^
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkStubInit.c:26:1: error: expected declaration specifiers before 'ItkStubs'
         26 | ItkStubs itkStubs = {
            | ^~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkStubInit.c:47:2: error: expected declaration specifiers before ';' token
         47 | };
            |  ^
      In file included from /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itk.h:120,
                       from /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkStubInit.c:12:
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:33:1: error: old-style parameter declarations in prototyped function definition
         33 | TCL_EXTERN(int)  Itk_Init _ANSI_ARGS_((Tcl_Interp * interp));
            | ^~~~~~~~~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkDecls.h:33:12: error: parameter name omitted
         33 | TCL_EXTERN(int)  Itk_Init _ANSI_ARGS_((Tcl_Interp * interp));
            |            ^~~
      /home/yamira/software/brlcad-7.32.2/src/other/itk3/generic/itkStubInit.c:49: error: expected '{' at end of input
         49 | /* !END!: Do not edit above this line. */
            | 
      make[2]: *** [src/other/itk3/CMakeFiles/itk.dir/build.make:82: src/other/itk3/CMakeFiles/itk.dir/generic/itkStubInit.c.o] Error 1
      make[1]: *** [CMakeFiles/Makefile2:16709: src/other/itk3/CMakeFiles/itk.dir/all] Error 2
      make: *** [Makefile:182: all] Error 2
      

      If I build it with the bundled libs, another compilation error appears:

      Scanning dependencies of target cad_user
      [ 18%] Building C object regress/user/CMakeFiles/cad_user.dir/cad_user.c.o
      [ 18%] Linking C executable ../../bin/cad_user
      /usr/bin/ld: ../../lib/libpng_brld.so.16.37.0: undefined reference to `brl_png_init_filter_functions_vsx'
      collect2: error: ld returned 1 exit status
      make[2]: *** [regress/user/CMakeFiles/cad_user.dir/build.make:132: bin/cad_user] Error 1
      make[1]: *** [CMakeFiles/Makefile2:60864: regress/user/CMakeFiles/cad_user.dir/all] Error 2
      make: *** [Makefile:182: all] Error 2
      

      Thank you a lof for your help

       
  • Sean Morrison

    Sean Morrison - 2021-04-22

    Hi Draena, so this is complex because each change you make or try involves a whole chain of events that have different requirements and things to check. When you installed new system libraries, did you rebuild completely fresh? You will want to delete your build directory every time you change what's installed on your system.

    The first error (default build) appears to be some incompatibility between Itk and (presumably) your system IncrTcl. What (if any) version of IncrTcl do you have installed on your system?

    For the second error (bundled build), that seems to be this issue: https://gitlab.kitware.com/paraview/paraview/-/issues/18176

     
  • Draena Xon

    Draena Xon - 2021-04-22

    Greetings Sean, I made sure I deleted the build directories after doing any changes, the error messages are the same.

    Regarding tcl, I have 8.6.11 installed on my system.

     

Log in to post a comment.

MongoDB Logo MongoDB