It appears that I finally have this working and in a manner that should not conflict with Manjaro updating the system. I’m sharing this because I found it rather challenging as a novice to even locate the steps, although they now seem not so complex to execute. This post is in no manner whatsoever intended to be instruction for others; but is only more information to add to the original question, modified now to ask if this is an acceptable approach or one expected to cause problems.
The objective was to install Tcl/Tk 9.0.2 (not available in repository), Tcllib 2.0, critcl 3.3.1 (not available), tDOM, and the tip-of-trunk versions of SQLite itself and its Tcl Interface. I wanted to be able to use the new features in Tcl/Tk and test SQLite’s tip of trunk and make use of critcl for added performance at times.
After downloading all the source code tar.gz files, placed them under usr/local/src and used sudo tar xzf each_src_name.tar.gz to unpack them into separate folders.
Started with Tcl and Tk; the instructions are at https://www.tcl-lang.org/doc/howto/compile.html.
For Tcl, the instructions state to go into the unix folder and configure. There are options and the default for location is usr/local; so, I left it at that. From the unix directory,
sudo ./configure
sudo make
sudo make test
This listed 143 tests, of which 127 passed, 16 were skipped, and 0 failed.
Then
sudo make install
After that, tested that it worked but trying tclsh9.0; and confiirmed using puts $tcl_version. If also try package require sqlite3, the version will be 3.49.1 but that will be fixed a bit later in this example. This does not remove Tcl8.6 if it is installed, and it can be opened using tclsh or tclsh8.6. And if try package require sqlite3 in Tcl 8.6, it returns the version last installed through Manjaro, which, for me, is 3.50.3.
The steps were similar for Tk. Unpack the tar.gz, go to tk9.0.2/unix. However, the configure was just a bit different to ensure that it is built with Tcl 9.0 rather than 8.6; but not sure what would happen it omitted that option. Would it use 8.6 by default?
sudo ./configure --with-tcl=/usr/local/src/tcl9.0.2/unix
sudo make
sudo make test
This listed 592 tests of which 575 passed, 17 were skipped, and 0 failed.
sudo make install
At this point, tried tclsh9.0 and package require tk, and it returned version 9.0.2.
EDIT
This next step is incorrect in that using installer.tcl to install tcllib will not build the C implementations of packages that have one, that is, the tcllibc binary. These instructions are more complete than the ones first linked below. This also means that must install critcl before tcllib, which is currently installed last in this post; and it appears that critcl can still be installed using the Tcl script as shown. The purpose is to use the C implementations via critcl to improve speed.
./configure
make install
And make or make install are both supposed to build tcllibc when critcl is already installed. I can see both the tcllib2.0 and tcllibc2.0 folders in usr/local/lib but have yet to run a real test to obseve a script completing more quickly with this set up than that of the package manager which does not have critcl or the tcllibc2.0 folder.
Next, installed tcllib, using instructions at wiki.tcl-lang.org/page/Tcllib+Installation and these were the easiest since Tcl and Tk have already been installed and it uses a littleTk GUI. After unpacking, went to that directory but there is no unix directory. There should be a file named installer.tcl. Then
sudo tclsh9.0 installer.tcl
and the Tk widget appears. The default selections seemed okay, so clicked Install. It installed in a few seconds. At the first attempt, I did not use sudo and after clicking Install, another Tk widget appeared and remained empty, whilst I waited stupidly until finally looking behind it to find a permission-denied dialogue.
Tested it by tclsh9.0 again and package require nmea (as in the instructions, or any other library package) and the version number was returned.
Next SQLite. I followed the instructions at sqlite.org/src/doc/trunk/README.md under Compiling for Unix-like systems, which is what I think they at SQLite refer to as the canonical build process.
The instructions recommend making a build directory. I made it under the sqlite directory that was made when unpacked the source. Then:
..sqlite/configure --enable-all
There are many options that can be added when building SQLite from source. I’m not sure at which step they go. For example, if want to build with the ICU in order to ORDER BY based on non-ascii characters, that can be added; and I wanted to test it but will experiment with that later. Didn’t try for this attempt.
sudo make sqlite
sudo make sqldiff
sudo make tclextension-install
sudo make sqlite3_analyzer
Also ran the make verify-source which returned okay.
Tried tclsh9.0 and package require sqlite3 and the version was no longer the 3.49 packaged with Tcl but the version I downloaded, which was the most recent available 3.51.0. In the “lib” folder, 3.49.1 is still there, which I assume can be deleted.
For the SQLite CLI application, if try sqlite3 ":memory:" the version will be from the Manjaro install. If want to run the one in local, I had to
/usr/local/src/sqlite/sqlite3 ":memory:"
Next tDOM. The instructions are in the README.md file after the source is unpacked. There are some options but none appeared to apply for my use; and I just took the defaults. Went in unix folder, and
../configure
make
make test
The results were 2459 total tests, of which 2414 passed, 45 were skipped,and 0 failed.
sudo make install
Then tclsh9.0 and package require tdom returned version 0.9.6.
Last, then, is critcl. After unpacking, went into the top level of that directory where a build.tcl script should be found. Apparently, critcl can be built differently depending upon the version of Tcl. Thus, found this suggestion:
/path/to/tclsh /path/to/critcl/build.tcl install
and from within that directory, ran
sudo tclsh9.0 build.tcl install
Then tested it by 'tclsh9.0 and package require critcl which returned version 3.3.1. The package is not found when try the same in Tcl 8.6. The build output mentioned Tcl 9; thus, it appears that critcl was built for Tcl 9.
Having SQLite, Tcl, and tcllib installed “normally” and also in usr/local doesn’t appear to cause an issue, but tDOM won’t install within Manjaro any longer. It appears to find Tcl 9.0 rather than 8.6. That is not an issue for me because I only need it in one location and no other software I use depends upon tDOM as many do on SQLite.
If my machine survives the next round of updates, this might work for my circumstances. Thanks.