On 24.07.2021 23:47, L A Walsh wrote:
I tried running bashdb on a script, but got:
bashdb /tmp/rearrange_files.sh bash debugger, bashdb, release 4.4-0.94
Copyright 2002, 2003, 2004, 2006-2012, 2014, 2016 Rocky Bernstein This is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions.
/usr/share/bashdb/command/set_sub/dollar0.sh: line 23: enable: dynamic loading not available (/tmp/rearrange_files.sh:4):
--- sent something off to bash list, and got back:
-------- Original Message -------- Subject: Re: should bashdb be included w/bash? Date: Sat, 24 Jul 2021 15:34:39 -0400 From: Chet Ramey <chet.ramey@case.edu> Reply-To: chet.ramey@case.edu Organization: ITS, Case Western Reserve University To: L A Walsh <bash@tlinx.org>, bug-bash <bug-bash@gnu.org> CC: chet.ramey@case.edu References: <60FC6582.2030006@tlinx.org>
On 7/24/21 3:09 PM, L A Walsh wrote:
Not entirely sure how, but have been running 5.1.8(3)-release which seems fine...up until I wanted to single step a script... bashdb <file>...and saw /usr/share/bashdb/command/set_sub/dollar0.sh: line 23: enable: dynamic loading not available (/tmp/rearrange_files.sh:4): 4: shopt -s expand_aliases bashdb<0>
It looks like your system doesn't have the right dlopen support for dynamic loading builtins, so bash didn't compile it in.
----- (And people wonder why I build so many tools on my own machine to run here).
Basically, if I want bash built for my machine, I can't use a generic one built in a generic build environment.
When I built bash 5.0 on my machine, it DID have the dlopen support for dynamic loading of builtins -- like the debugger.
bor@tw:~> cat foo.c int foo () { return 0; } struct builtin { char *name; void *func; int flags; char *doc; const char *doc_short; char *handle; } foo_struct = { "foo", foo, 1, 0, 0, 0 }; bor@tw:~> gcc -o foo.so -shared foo.c bor@tw:~> enable -f ./foo.so foo bor@tw:~> type foo foo is a shell builtin bor@tw:~> grep VERSION_ID /etc/os-release VERSION_ID="20210708"