I recently installed BRL-CAD 7.12.4 using the compiled packages. The default installation location with pkgadd is
/opt/BRL-CAD. This path doesn't match the one used to compile the binaries and makes it difficult to get mged to
run.
The default path for the package should be /usr/local/BRLCAD.
=============================================================================
Background info used to come to this conclusion
=============================================================================
I installed brlcad on s10u3 and s10u5.
If the default /opt/BRL-CAD path is used, mged won't run unless you setenv LD_LIBRARY_PATH /opt/BRL-CAD/lib.
The mged program then prints an error message and core dumps.
-------------------
Tcl_Init ERROR:
Can't find a usable init.tcl in the following directories:
/tcl8.5.1/library
This probably means that Tcl wasn't installed properly.
Tcl_Import ERROR: unknown namespace in import pattern "::itcl::*"
-------------------
The tclInterp.c file gives a clue about the Tcl error messages which can be quieted using setenv.
This doesn't help with the core dump though.
setenv TCL_LIBRARY /opt/BRL-CAD/lib/tcl8.5
gdb /opt/BRL-CAD/bin/mged core
(gdb) bt
#0 0xfdd1578c in strlen () from /lib/libc.so.1
#1 0xfdd6d976 in _ndoprnt () from /lib/libc.so.1
#2 0xfdd70734 in snprintf () from /lib/libc.so.1
#3 0x080e6230 in cmd_setup () at setup.c:421
#4 0x080e652c in mged_setup () at setup.c:577
#5 0x080d2989 in main (argc=1056585442, argv=0x3feffffd) at mged.c:507
(gdb) up
#1 0xfdd6d976 in _ndoprnt () from /lib/libc.so.1
(gdb) up
#2 0xfdd70734 in snprintf () from /lib/libc.so.1
(gdb) up
#3 0x080e6230 in cmd_setup () at setup.c:421
421 setup.c: No such file or directory.
in setup.c
(gdb) print pathname
$1 = 0x0
The bu_brlcad_data function is in libbu/brlcad_path.c. The comments above
the function identify the BRLCAD_DATA environment and/or compile time variable.
The magic of grep shows the value:
/opt/BRL-CAD> grep BRLCAD_DATA include/brlcad/brlcad_config.h
#define BRLCAD_DATA "/usr/local/BRLCAD/share/brlcad/7.12.4"
I simply defined a symbolic link for /usr/local/BRLCAD to point to /opt/BRL-CAD
to see if this helps. The mged command now runs as it should and setting the
LD_LIBRARY_PATH isn't needed.
Use /usr/local/BRLCAD at pkgadd (installation time) and running mged should be
trivial.
I hope this helps :-).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the report about the Solaris package not working right. I'll pass it along to the guy who put it together. That was an externally contributed binary install which we couldn't review as thoroughly for consistent behavior as we'd like (and we'd normally default to /usr/brlcad installs anyways).
That budding developer/Solaris dist maintainer did just make a new release for 7.12.6 that is being uploaded now. I'd be interested in hearing if the problem is fixed. Thanks again for the report regardless!
Cheers!
Sean
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Sean,
I just installed the 7.12.6 solaris x86 package. It has a slightly different version of the same problem. In this case, the BRLCAD_DATA line points to /usr/local/BRL-CAD//share. In version 7.12.4, it was /usr/local/BRLCAD.
In any case, the workaround is to simply make a symbolic link similar to what was done for version 7.12.4.
# cd /usr/local
# ln -s /opt/BRL-CAD BRL-CAD
I think the real fix will be to make sure the BASEDIR line in the pkginfo file matches the basename for the BRLCAD_DATA line in the brlcad_config.h. In the 7.12.6 version, it should have been /usr/local/BRL-CAD. There is a prototype2 included as part of the package but I don't see the pkginfo in the solaris x86 package or the source. Apparently, this is being done on the developers machine. That's okay.
Thanks for continuing to provide the binaries :-).
David
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
David, thanks for trying the updated tarball. I've sent a note to the contributor that put the package together so it can hopefully get fixed in a future version.
Cheers!
Sean
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I recently installed BRL-CAD 7.12.4 using the compiled packages. The default installation location with pkgadd is
/opt/BRL-CAD. This path doesn't match the one used to compile the binaries and makes it difficult to get mged to
run.
The default path for the package should be /usr/local/BRLCAD.
=============================================================================
Background info used to come to this conclusion
=============================================================================
I installed brlcad on s10u3 and s10u5.
If the default /opt/BRL-CAD path is used, mged won't run unless you setenv LD_LIBRARY_PATH /opt/BRL-CAD/lib.
The mged program then prints an error message and core dumps.
-------------------
Tcl_Init ERROR:
Can't find a usable init.tcl in the following directories:
/tcl8.5.1/library
This probably means that Tcl wasn't installed properly.
Tcl_Import ERROR: unknown namespace in import pattern "::itcl::*"
-------------------
The tclInterp.c file gives a clue about the Tcl error messages which can be quieted using setenv.
This doesn't help with the core dump though.
setenv TCL_LIBRARY /opt/BRL-CAD/lib/tcl8.5
gdb /opt/BRL-CAD/bin/mged core
(gdb) bt
#0 0xfdd1578c in strlen () from /lib/libc.so.1
#1 0xfdd6d976 in _ndoprnt () from /lib/libc.so.1
#2 0xfdd70734 in snprintf () from /lib/libc.so.1
#3 0x080e6230 in cmd_setup () at setup.c:421
#4 0x080e652c in mged_setup () at setup.c:577
#5 0x080d2989 in main (argc=1056585442, argv=0x3feffffd) at mged.c:507
(gdb) up
#1 0xfdd6d976 in _ndoprnt () from /lib/libc.so.1
(gdb) up
#2 0xfdd70734 in snprintf () from /lib/libc.so.1
(gdb) up
#3 0x080e6230 in cmd_setup () at setup.c:421
421 setup.c: No such file or directory.
in setup.c
(gdb) print pathname
$1 = 0x0
From setup.c:
420 pathname = bu_brlcad_data("tclscripts", 1);
421 snprintf(buffer, sizeof(buffer), "%s", pathname);
The bu_brlcad_data function is in libbu/brlcad_path.c. The comments above
the function identify the BRLCAD_DATA environment and/or compile time variable.
The magic of grep shows the value:
/opt/BRL-CAD> grep BRLCAD_DATA include/brlcad/brlcad_config.h
#define BRLCAD_DATA "/usr/local/BRLCAD/share/brlcad/7.12.4"
I simply defined a symbolic link for /usr/local/BRLCAD to point to /opt/BRL-CAD
to see if this helps. The mged command now runs as it should and setting the
LD_LIBRARY_PATH isn't needed.
Use /usr/local/BRLCAD at pkgadd (installation time) and running mged should be
trivial.
I hope this helps :-).
David,
Thanks for the report about the Solaris package not working right. I'll pass it along to the guy who put it together. That was an externally contributed binary install which we couldn't review as thoroughly for consistent behavior as we'd like (and we'd normally default to /usr/brlcad installs anyways).
That budding developer/Solaris dist maintainer did just make a new release for 7.12.6 that is being uploaded now. I'd be interested in hearing if the problem is fixed. Thanks again for the report regardless!
Cheers!
Sean
Hi Sean,
I just installed the 7.12.6 solaris x86 package. It has a slightly different version of the same problem. In this case, the BRLCAD_DATA line points to /usr/local/BRL-CAD//share. In version 7.12.4, it was /usr/local/BRLCAD.
/usr/local/BRL-CAD# grep BRLCAD_DATA include/brlcad/brlcad_config.h
#define BRLCAD_DATA "/usr/local/BRL-CAD//share"
In any case, the workaround is to simply make a symbolic link similar to what was done for version 7.12.4.
# cd /usr/local
# ln -s /opt/BRL-CAD BRL-CAD
I think the real fix will be to make sure the BASEDIR line in the pkginfo file matches the basename for the BRLCAD_DATA line in the brlcad_config.h. In the 7.12.6 version, it should have been /usr/local/BRL-CAD. There is a prototype2 included as part of the package but I don't see the pkginfo in the solaris x86 package or the source. Apparently, this is being done on the developers machine. That's okay.
Thanks for continuing to provide the binaries :-).
David
David, thanks for trying the updated tarball. I've sent a note to the contributor that put the package together so it can hopefully get fixed in a future version.
Cheers!
Sean