I am developing a loadable builtin and I have a question about building it for distribution.

I am currently building it in the "Bash-5.0 patch 17" git commit and it works fine when I run it in the bash executable built from that same commit (5.0.17(4)) but it fails when I run it in the bash from the Ubuntu 20.04 repository which is almost the same version 5.0.17(1).

   *bobg@goodplace:~/github/bashParse/examples/loadables$*  ./ooTest.sh
   5.0.17(1)-release
   bash: symbol lookup error: ./_bgclassCallSetup: undefined symbol:
   sh_xmalloc
   *bobg@goodplace:~/github/bashParse/examples/loadables$*  ../../bash 
./ooTest.sh
   5.0.17(4)-release
   iamgrut _OID='myObj' _CLASS='MyObject'
   declare -- this="myObj"

Question 1: what is the meaning of the (1) or (4) at the end of the bash version?

Question 2: is this (...undefined symbol: sh_xmalloc) error indicative of a compiler/link option mismatch and what would it be?

Question 3: what is the best practice for maintaining loadable builtins? Can anyone suggest an existing loadable builtin project that I could model mine after?

Thanks,

--BobG

Reply via email to