Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

minimal re-make of tcl from sources

88 views
Skip to first unread message

two...@gmail.com

unread,
Nov 13, 2018, 2:09:05 PM11/13/18
to
Is the generated Makefile (from configure) set up to do a minimal re-compile, link, and install, or only designed to build everything w/o checking file times from a previous build?

I'm trying to setup an environment where I can test a few very minor changes to tcl.

I've been able to build from source into a test directory. "make test" works. I'm on debian 9.0.

However, when I make a non-important change to a source file and do "make" again, it says there's nothing to be done for 'all'. Same if I delete some .o file.

Deleting the installed tclsh/wish from my test/bin directory and doing "make install" doesn't re-install the deleted file(s) either.


How do the developers re-build tcl/tk when testing their code?

Don Porter

unread,
Nov 13, 2018, 2:32:54 PM11/13/18
to
Demonstrations >>> descriptions

This is a cruel taunt to make people guess.

If you have a problem, spell it out.

--
| Don Porter Applied and Computational Mathematics Division |
| donald...@nist.gov Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|

Robert Heller

unread,
Nov 13, 2018, 3:59:09 PM11/13/18
to
At Tue, 13 Nov 2018 11:09:01 -0800 (PST) two...@gmail.com wrote:

>

> Is the generated Makefile (from configure) set up to do a minimal
> re-compile, link, and install, or only designed to build everything w/o
> checking file times from a previous build?

Make normally checks file times from a previous build.

>

> I'm trying to setup an environment where I can test a few very minor changes
> to tcl.

What sorts of changes?

>
> I've been able to build from source into a test directory. "make test"
> works. I'm on debian 9.0.

"make test" or "make all"?

You probably don't want to be doing "make test", unless you mean to run the
automated test set. And what directory did you do the ./configure in? And then
did the "make" in?

>
> However, when I make a non-important change to a source file and do "make"
> again, it says there's nothing to be done for 'all'. Same if I delete some
> .o file.

Are you in the proper directory?

>
> Deleting the installed tclsh/wish from my test/bin directory and doing "make
> install" doesn't re-install the deleted file(s) either.

This is strange. There is almost certainly something you are doing that you
are not really telling us about.

>
>
> How do the developers re-build tcl/tk when testing their code?

They edit the files and type make.

>

--
Robert Heller -- 978-544-6933
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
hel...@deepsoft.com -- Webhosting Services

two...@gmail.com

unread,
Nov 13, 2018, 4:25:57 PM11/13/18
to
On Tuesday, November 13, 2018 at 12:59:09 PM UTC-8, Robert Heller wrote:

> > How do the developers re-build tcl/tk when testing their code?
>
> They edit the files and type make.
>

Sorry, I didn't want to put too much detail in the earlier post, but I will try to do that now:


I downloaded 2 files from sourceforge.

I placed them in the dir /home/user/Desktop
I ran these two commands,

tar -xvzf tcl8.6.8-src.tar.gz
tar -xvzf tk8.6.8-src.tar.gz

I then have two dirs, tcl8.6.8 and tk8.6.8 in /home/user/Desktop

I then ran these commands from a script: (I've changed the directory from my actual user directory to "user" here for privacy only, otherwise everything is exactly as shown)

cd /home/user/Desktop
mkdir test
cd tcl8.6.8/unix/
mkdir test
cd test
/home/user/Desktop/tcl8.6.8/unix/configure --prefix=/home/user/Desktop/test --exec-prefix=/home/user/Desktop/test
make
make install
cd ..
cd ..
cd tk8.6.8/
cd unix/
mkdir test
cd test/
/home/user/Desktop/tk8.6.8/unix/configure --with-tcl=/home/user/Desktop/tcl8.6.8/unix/test --prefix=/home/user/Desktop/test --exec-prefix=/home/user/Desktop/test
make
make install




So, I tried making a source file change (just to make the file different, but all I did was add some spaces), to

/home/user/Desktop/tcl8.6.8/generic/tclMain.c

then from directory, /home/user/Desktop/tcl8.6.8/unix/test

I typed

make


and make said nothing to do. So, I tried deleting an object file thinking it should notice and re-compile it from source. I deleted tclGet.o from the unix/test directory.

I also deleted tclsh from that directory, and again make didn't do anything.



Robert Heller

unread,
Nov 13, 2018, 4:49:55 PM11/13/18
to
At Tue, 13 Nov 2018 13:25:54 -0800 (PST) two...@gmail.com wrote:

>
> On Tuesday, November 13, 2018 at 12:59:09 PM UTC-8, Robert Heller wrote:
>
> > > How do the developers re-build tcl/tk when testing their code?
> >
> > They edit the files and type make.
> >
>
> Sorry, I didn't want to put too much detail in the earlier post, but I will try to do that now:

You have to understand that none of us can read your mind and none of us are
able to look over your shoulder as you type on your computer. You need to
provide *lots* of detail, otherwise noone can provide you with any help.

two...@gmail.com

unread,
Nov 13, 2018, 5:56:02 PM11/13/18
to
On Tuesday, November 13, 2018 at 1:49:55 PM UTC-8, Robert Heller wrote:

>
> You have to understand that none of us can read your mind and none of us are
> able to look over your shoulder as you type on your computer. You need to
> provide *lots* of detail, otherwise noone can provide you with any help.
>


I understand. Often it's difficult to know when to post a huge log. I tried to ask the most important question first, which after you answered, told me it had to be something I was doing wrong.

At any rate, lo and behold, it's now working, and I haven't a clue as to why. I broke my script into two parts, and now its working. I can't even make it fail again, even though it failed 3 times before. I must have been in the wrong directories.

Ralf Fassel

unread,
Nov 14, 2018, 8:53:05 AM11/14/18
to
* two...@gmail.com
| cd /home/user/Desktop
| mkdir test
| cd tcl8.6.8/unix/
| mkdir test
| cd test
| /home/user/Desktop/tcl8.6.8/unix/configure --prefix=/home/user/Desktop/test --exec-prefix=/home/user/Desktop/test

Usually I invoke 'configure' from the unix subdir, not unix/test, and in
that case 'make' works as expected. Don't know if that makes a difference.

R'

Robert Heller

unread,
Nov 14, 2018, 10:41:43 AM11/14/18
to
The OP is doing an out-of-tree build. This is viable option with the GNU
autoconf tools. So long as one keeps one's directory struture in mind, it
works just fine.

>
> R'

two...@gmail.com

unread,
Nov 14, 2018, 12:54:06 PM11/14/18
to

> At Wed, 14 Nov 2018 14:53:01 +0100 Ralf Fassel <xxxxxxxxxxxxxx> wrote:
> The OP is doing an out-of-tree build. This is viable option with the GNU
> autoconf tools. So long as one keeps one's directory struture in mind, it
> works just fine.


One really STRANGE thing I've noticed, is there seems to be something funny about the tclsh it builds into my unix/test directory. While an ls -al tcls* shows the date/time as current, it seems to still be the prior version, UNTIL I also do 'make install'.

After make install, it then is running the new version. I'm guessing there's some sort of file link, otherwise I'm stumped.





Well, (sorry to be so verbose) below's my complete terminal log, with some extra spacing, some comments added.

Note, my terminal window prompt is 2 lines, the current directory a newline and [###]$ on the 2nd line.




Below, I run ./tclsh and do an "info glob" to see the variable name I added, so I could be sure of which version I was running. Then from another terminal window using a text editor I change the name of that variable from foobarxxx to foobarzzz. I run make, run tclsh, and it's still the old variable name. After make install, it has the new variable name. Yet the date/time on tclsh is the same.





To tell which version of tclsh I'm running with, I add a global variable in tclMain.c (foobarxxx) which was foobarzzz in previous version.

Tcl_SetVar2Ex(interp, "argc", NULL, Tcl_NewIntObj(argc), TCL_GLOBAL_ONLY);
Tcl_SetVar2Ex(interp, "foobarxxx", NULL, Tcl_NewIntObj(argc), TCL_GLOBAL_ONLY);












=============== terminal log ======================

<debian:/home/user/Desktop/tcl8.6.8/unix/test>
[653]$ ls -al /home/user/Desktop/tcl8.6.8/generic/tclMain.c
-rw-rw-r-- 1 user user 25486 Nov 14 08:47 /home/user/Desktop/tcl8.6.8/generic/tclMain.c

<debian:/home/user/Desktop/tcl8.6.8/unix/test>
[654]$ ./tclsh
% info glob
tcl_rcFileName tcl_interactive tcl_version argv0 argv auto_path auto_index env tcl_pkgPath tcl_patchLevel argc tcl_library tcl_platform foobarzzz <..... before change
% exit

<debian:/home/user/Desktop/tcl8.6.8/unix/test>
[650]$ ls -al /home/user/Desktop/tcl8.6.8/generic/tclMain.c
-rw-rw-r-- 1 user user 25486 Nov 14 09:12 /home/user/Desktop/tcl8.6.8/generic/tclMain.c

<debian:/home/user/Desktop/tcl8.6.8/unix/test>
[650]$ date
Wed Nov 14 09:13:24 PST 2018






============= make =========================




<debian:/home/user/Desktop/tcl8.6.8/unix/test>
[650]$ make
gcc -c -O2 -pipe -Wall -fPIC -DBUILD_tcl -I"." -I/home/user/Desktop/tcl8.6.8/unix -I/home/user/Desktop/tcl8.6.8/generic -I/home/user/Desktop/tcl8.6.8/libtommath -DPACKAGE_NAME=\"tcl\" -DPACKAGE_TARNAME=\"tcl\" -DPACKAGE_VERSION=\"8.6\" -DPACKAGE_STRING=\"tcl\ 8.6\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_ATFORK=1 -DTCL_THREADS=1 -DTCL_CFGVAL_ENCODING=\"iso8859-1\" -DHAVE_ZLIB=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DHAVE_HIDDEN=1 -DHAVE_CAST_TO_UNION=1 -DTCL_SHLIB_EXT=\".so\" -DNDEBUG=1 -DTCL_CFG_OPTIMIZED=1 -DTCL_TOMMATH=1 -DMP_PREC=4 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_DIRENT64=1 -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 -DHAVE_TYPE_OFF64_T=1 -DHAVE_GETCWD=1 -DHAVE_MKSTEMP=1 -DHAVE_OPENDIR=1 -DHAVE_STRTOL=1 -DHAVE_WAITPID=1 -DHAVE_GETNAMEINFO=1 -DHAVE_GETADDRINFO=1 -DHAVE_FREEADDRINFO=1 -DHAVE_GAI_STRERROR=1 -DHAVE_STRUCT_ADDRINFO=1 -DHAVE_STRUCT_IN6_ADDR=1 -DHAVE_STRUCT_SOCKADDR_IN6=1 -DHAVE_STRUCT_SOCKADDR_STORAGE=1 -DHAVE_GETPWUID_R_5=1 -DHAVE_GETPWUID_R=1 -DHAVE_GETPWNAM_R_5=1 -DHAVE_GETPWNAM_R=1 -DHAVE_GETGRGID_R_5=1 -DHAVE_GETGRGID_R=1 -DHAVE_GETGRNAM_R_5=1 -DHAVE_GETGRNAM_R=1 -DHAVE_GETHOSTBYNAME_R_6=1 -DHAVE_GETHOSTBYNAME_R=1 -DHAVE_GETHOSTBYADDR_R_8=1 -DHAVE_GETHOSTBYADDR_R=1 -DHAVE_TERMIOS_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_MKTIME=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_STRUCT_STAT_ST_BLOCKS=1 -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 -DHAVE_BLKCNT_T=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DNO_UNION_WAIT=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -DHAVE_MKSTEMPS=1 -DHAVE_FTS=1 -DHAVE_SYS_IOCTL_H=1 -DTCL_UNLOAD_DLLS=1 -DHAVE_CPUID=1 /home/user/Desktop/tcl8.6.8/generic/tclMain.c
rm -f libtcl8.6.so
gcc -O2 -pipe -Wl,--export-dynamic -shared -o libtcl8.6.so regcomp.o regexec.o regfree.o regerror.o tclAlloc.o tclAssembly.o tclAsync.o tclBasic.o tclBinary.o tclCkalloc.o tclClock.o tclCmdAH.o tclCmdIL.o tclCmdMZ.o tclCompCmds.o tclCompCmdsGR.o tclCompCmdsSZ.o tclCompExpr.o tclCompile.o tclConfig.o tclDate.o tclDictObj.o tclDisassemble.o tclEncoding.o tclEnsemble.o tclEnv.o tclEvent.o tclExecute.o tclFCmd.o tclFileName.o tclGet.o tclHash.o tclHistory.o tclIndexObj.o tclInterp.o tclIO.o tclIOCmd.o tclIORChan.o tclIORTrans.o tclIOGT.o tclIOSock.o tclIOUtil.o tclLink.o tclListObj.o tclLiteral.o tclLoad.o tclMain.o tclNamesp.o tclNotify.o tclObj.o tclOptimize.o tclPanic.o tclParse.o tclPathObj.o tclPipe.o tclPkg.o tclPkgConfig.o tclPosixStr.o tclPreserve.o tclProc.o tclRegexp.o tclResolve.o tclResult.o tclScan.o tclStringObj.o tclStrToD.o tclThread.o tclThreadAlloc.o tclThreadJoin.o tclThreadStorage.o tclStubInit.o tclTimer.o tclTrace.o tclUtf.o tclUtil.o tclVar.o tclZlib.o tclTomMathInterface.o tclUnixChan.o tclUnixEvent.o tclUnixFCmd.o tclUnixFile.o tclUnixPipe.o tclUnixSock.o tclUnixTime.o tclUnixInit.o tclUnixThrd.o tclUnixCompat.o tclUnixNotfy.o tclOO.o tclOOBasic.o tclOOCall.o tclOODefineCmds.o tclOOInfo.o tclOOMethod.o tclOOStubInit.o tclLoadDl.o bncore.o bn_reverse.o bn_fast_s_mp_mul_digs.o bn_fast_s_mp_sqr.o bn_mp_add.o bn_mp_and.o bn_mp_add_d.o bn_mp_clamp.o bn_mp_clear.o bn_mp_clear_multi.o bn_mp_cmp.o bn_mp_cmp_d.o bn_mp_cmp_mag.o bn_mp_cnt_lsb.o bn_mp_copy.o bn_mp_count_bits.o bn_mp_div.o bn_mp_div_d.o bn_mp_div_2.o bn_mp_div_2d.o bn_mp_div_3.o bn_mp_exch.o bn_mp_expt_d.o bn_mp_grow.o bn_mp_init.o bn_mp_init_copy.o bn_mp_init_multi.o bn_mp_init_set.o bn_mp_init_set_int.o bn_mp_init_size.o bn_mp_karatsuba_mul.o bn_mp_karatsuba_sqr.o bn_mp_lshd.o bn_mp_mod.o bn_mp_mod_2d.o bn_mp_mul.o bn_mp_mul_2.o bn_mp_mul_2d.o bn_mp_mul_d.o bn_mp_neg.o bn_mp_or.o bn_mp_radix_size.o bn_mp_radix_smap.o bn_mp_read_radix.o bn_mp_rshd.o bn_mp_set.o bn_mp_set_int.o bn_mp_shrink.o bn_mp_sqr.o bn_mp_sqrt.o bn_mp_sub.o bn_mp_sub_d.o bn_mp_to_unsigned_bin.o bn_mp_to_unsigned_bin_n.o bn_mp_toom_mul.o bn_mp_toom_sqr.o bn_mp_toradix_n.o bn_mp_unsigned_bin_size.o bn_mp_xor.o bn_mp_zero.o bn_s_mp_add.o bn_s_mp_mul_digs.o bn_s_mp_sqr.o bn_s_mp_sub.o Zadler32.o Zcompress.o Zcrc32.o Zdeflate.o Zinfback.o Zinffast.o Zinflate.o Zinftrees.o Ztrees.o Zuncompr.o Zzutil.o -ldl -lpthread -lieee -lm -Wl,-rpath,/home/user/Desktop/test/lib
gcc -O2 -pipe -Wl,--export-dynamic tclAppInit.o \
-L/home/user/Desktop/tcl8.6.8/unix/test -ltcl8.6 libtclstub8.6.a -ldl -lpthread -lieee -lm \
-Wl,-rpath,/home/user/Desktop/test/lib -o tclsh
Configuring package 'itcl4.1.1'
Configuring package 'sqlite3.21.0'
Configuring package 'tdbc1.0.6'
Configuring package 'tdbcmysql1.0.6'
Configuring package 'tdbcodbc1.0.6'
Configuring package 'tdbcpostgres1.0.6'
Configuring package 'tdbcsqlite3-1.0.6'
Configuring package 'thread2.8.2'
Building package 'itcl4.1.1'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/itcl4.1.1'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/itcl4.1.1'
Building package 'sqlite3.21.0'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/sqlite3.21.0'
If you have documentation to create, place the commands to
build the docs in the 'doc:' target. For example:
xml2nroff sample.xml > sample.n
xml2html sample.xml > sample.html
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/sqlite3.21.0'
Building package 'tdbc1.0.6'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbc1.0.6'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbc1.0.6'
Building package 'tdbcmysql1.0.6'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcmysql1.0.6'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcmysql1.0.6'
Building package 'tdbcodbc1.0.6'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcodbc1.0.6'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcodbc1.0.6'
Building package 'tdbcpostgres1.0.6'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcpostgres1.0.6'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcpostgres1.0.6'
Building package 'tdbcsqlite3-1.0.6'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcsqlite3-1.0.6'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcsqlite3-1.0.6'
Building package 'thread2.8.2'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/thread2.8.2'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/thread2.8.2'


====== end make =====================================






<debian:/home/user/Desktop/tcl8.6.8/unix/test>
[650]$ ls -al tclsh
-rwxrwxr-x 1 user user 7620 Nov 14 09:13 tclsh <............................... after make

<debian:/home/user/Desktop/tcl8.6.8/unix/test>
[651]$ date
Wed Nov 14 09:14:12 PST 2018

<debian:/home/user/Desktop/tcl8.6.8/unix/test>
[651]$ ./tclsh
% info name
/home/user/Desktop/tcl8.6.8/unix/test/tclsh
% info glob
tcl_rcFileName tcl_interactive tcl_version argv0 argv auto_path auto_index env tcl_pkgPath tcl_patchLevel argc tcl_library tcl_platform foobarzzz <..... old value
% exit


======================================================================= make install


<debian:/home/user/Desktop/tcl8.6.8/unix/test>
[651]$ make install
Installing libtcl8.6.so to /home/user/Desktop/test/lib/
Installing tclsh as /home/user/Desktop/test/bin/tclsh8.6
Installing tclConfig.sh to /home/user/Desktop/test/lib/
Installing tclooConfig.sh to /home/user/Desktop/test/lib/
Installing libtclstub8.6.a to /home/user/Desktop/test/lib/
Installing pkg-config file to /home/user/Desktop/test/lib/pkgconfig/
Installing library files to /home/user/Desktop/test/lib/tcl8.6/
Installing package http1.0 files to /home/user/Desktop/test/lib/tcl8.6/http1.0/
Installing package http 2.8.12 as a Tcl Module
Installing package opt0.4 files to /home/user/Desktop/test/lib/tcl8.6/opt0.4/
Installing package msgcat 1.6.1 as a Tcl Module
Installing package tcltest 2.4.1 as a Tcl Module
Installing package platform 1.0.14 as a Tcl Module
Installing package platform::shell 1.1.4 as a Tcl Module
Installing encoding files to /home/user/Desktop/test/lib/tcl8.6/encoding/
Installing message catalog files to /home/user/Desktop/test/lib/tcl8.6/msgs/
Installing and cross-linking top-level (.1) docs to /home/user/Desktop/test/man/man1/
Installing and cross-linking C API (.3) docs to /home/user/Desktop/test/man/man3/
Installing and cross-linking command (.n) docs to /home/user/Desktop/test/man/mann/
Installing header files to /home/user/Desktop/test/include/
Configuring package 'itcl4.1.1'
Configuring package 'sqlite3.21.0'
Configuring package 'tdbc1.0.6'
Configuring package 'tdbcmysql1.0.6'
Configuring package 'tdbcodbc1.0.6'
Configuring package 'tdbcpostgres1.0.6'
Configuring package 'tdbcsqlite3-1.0.6'
Configuring package 'thread2.8.2'
Building package 'itcl4.1.1'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/itcl4.1.1'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/itcl4.1.1'
Building package 'sqlite3.21.0'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/sqlite3.21.0'
If you have documentation to create, place the commands to
build the docs in the 'doc:' target. For example:
xml2nroff sample.xml > sample.n
xml2html sample.xml > sample.html
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/sqlite3.21.0'
Building package 'tdbc1.0.6'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbc1.0.6'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbc1.0.6'
Building package 'tdbcmysql1.0.6'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcmysql1.0.6'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcmysql1.0.6'
Building package 'tdbcodbc1.0.6'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcodbc1.0.6'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcodbc1.0.6'
Building package 'tdbcpostgres1.0.6'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcpostgres1.0.6'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcpostgres1.0.6'
Building package 'tdbcsqlite3-1.0.6'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcsqlite3-1.0.6'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcsqlite3-1.0.6'
Building package 'thread2.8.2'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/thread2.8.2'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/thread2.8.2'
Installing package 'itcl4.1.1'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/itcl4.1.1'
/bin/bash /home/user/Desktop/tcl8.6.8/pkgs/itcl4.1.1/tclconfig/install-sh -c -m 644 libitcl4.1.1.so /home/user/Desktop/test/lib/itcl4.1.1/libitcl4.1.1.so
: /home/user/Desktop/test/lib/itcl4.1.1/libitcl4.1.1.so
/bin/bash /home/user/Desktop/tcl8.6.8/pkgs/itcl4.1.1/tclconfig/install-sh -c -m 644 libitclstub4.1.1.a /home/user/Desktop/test/lib/itcl4.1.1/libitclstub4.1.1.a
ranlib /home/user/Desktop/test/lib/itcl4.1.1/libitclstub4.1.1.a
Install itcl.tcl /home/user/Desktop/test/lib/itcl4.1.1/itcl.tcl
Install itclWidget.tcl /home/user/Desktop/test/lib/itcl4.1.1/itclWidget.tcl
Install itclHullCmds.tcl /home/user/Desktop/test/lib/itcl4.1.1/itclHullCmds.tcl
Install pkgIndex.tcl /home/user/Desktop/test/lib/itcl4.1.1
/bin/bash /home/user/Desktop/tcl8.6.8/pkgs/itcl4.1.1/tclconfig/install-sh -c -m 644 itclConfig.sh /home/user/Desktop/test/lib/itcl4.1.1
Installing header files in /home/user/Desktop/test/include
Installing /home/user/Desktop/tcl8.6.8/pkgs/itcl4.1.1/generic/itcl.h
Installing /home/user/Desktop/tcl8.6.8/pkgs/itcl4.1.1/generic/itclDecls.h
Installing /home/user/Desktop/tcl8.6.8/pkgs/itcl4.1.1/generic/itclInt.h
Installing /home/user/Desktop/tcl8.6.8/pkgs/itcl4.1.1/generic/itclMigrate2TclCore.h
Installing /home/user/Desktop/tcl8.6.8/pkgs/itcl4.1.1/generic/itclTclIntStubsFcn.h
Installing /home/user/Desktop/tcl8.6.8/pkgs/itcl4.1.1/generic/itcl2TclOO.h
Installing /home/user/Desktop/tcl8.6.8/pkgs/itcl4.1.1/generic/itclIntDecls.h
Installing documentation in /home/user/Desktop/test/share/man
Installing body.n
Installing class.n
Installing code.n
Installing configbody.n
Installing delete.n
Installing ensemble.n
Installing find.n
Installing is.n
Installing itclcomponent.n
Installing itcldelegate.n
Installing itclextendedclass.n
Installing itcl.n
Installing itcloption.n
Installing itclvars.n
Installing itclwidget.n
Installing local.n
Installing scope.n
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/itcl4.1.1'
Installing package 'sqlite3.21.0'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/sqlite3.21.0'
If you have documentation to create, place the commands to
build the docs in the 'doc:' target. For example:
xml2nroff sample.xml > sample.n
xml2html sample.xml > sample.html
/bin/bash /home/user/Desktop/tcl8.6.8/pkgs/sqlite3.21.0/tclconfig/install-sh -c libsqlite3.21.0.so /home/user/Desktop/test/lib/sqlite3.21.0/libsqlite3.21.0.so
: /home/user/Desktop/test/lib/sqlite3.21.0/libsqlite3.21.0.so
Install pkgIndex.tcl /home/user/Desktop/test/lib/sqlite3.21.0
/bin/bash /home/user/Desktop/tcl8.6.8/pkgs/sqlite3.21.0/tclconfig/install-sh -c /home/user/Desktop/tcl8.6.8/pkgs/sqlite3.21.0/compat/sqlite3/spaceanal.tcl /home/user/Desktop/test/bin/sqlite3_analyzer
Installing header files in /home/user/Desktop/test/include
Installing documentation in /home/user/Desktop/test/share/man
Installing /home/user/Desktop/tcl8.6.8/pkgs/sqlite3.21.0/doc/sqlite3.n
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/sqlite3.21.0'
Installing package 'tdbc1.0.6'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbc1.0.6'
/bin/bash /home/user/Desktop/tcl8.6.8/pkgs/tdbc1.0.6/tclconfig/install-sh -c -m 644 libtdbc1.0.6.so /home/user/Desktop/test/lib/tdbc1.0.6/libtdbc1.0.6.so
: /home/user/Desktop/test/lib/tdbc1.0.6/libtdbc1.0.6.so
/bin/bash /home/user/Desktop/tcl8.6.8/pkgs/tdbc1.0.6/tclconfig/install-sh -c -m 644 libtdbcstub1.0.6.a /home/user/Desktop/test/lib/tdbc1.0.6/libtdbcstub1.0.6.a
ranlib /home/user/Desktop/test/lib/tdbc1.0.6/libtdbcstub1.0.6.a
Install tdbc.tcl /home/user/Desktop/test/lib/tdbc1.0.6/tdbc.tcl
Install pkgIndex.tcl /home/user/Desktop/test/lib/tdbc1.0.6
Install tdbcConfig.sh /home/user/Desktop/test/lib/tdbc1.0.6
Installing header files in /home/user/Desktop/test/include
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbc1.0.6/generic/tdbc.h
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbc1.0.6/generic/tdbcInt.h
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbc1.0.6/generic/tdbcDecls.h
Installing documentation in /home/user/Desktop/test/share/man
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbc1.0.6/doc/Tdbc_Init.3
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbc1.0.6/doc/tdbc_connection.n
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbc1.0.6/doc/tdbc_mapSqlState.n
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbc1.0.6/doc/tdbc.n
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbc1.0.6/doc/tdbc_resultset.n
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbc1.0.6/doc/tdbc_statement.n
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbc1.0.6/doc/tdbc_tokenize.n
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbc1.0.6'
Installing package 'tdbcmysql1.0.6'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcmysql1.0.6'
/bin/bash /home/user/Desktop/tcl8.6.8/pkgs/tdbcmysql1.0.6/tclconfig/install-sh -c -m 644 libtdbcmysql1.0.6.so /home/user/Desktop/test/lib/tdbcmysql1.0.6/libtdbcmysql1.0.6.so
: /home/user/Desktop/test/lib/tdbcmysql1.0.6/libtdbcmysql1.0.6.so
Install tdbcmysql.tcl /home/user/Desktop/test/lib/tdbcmysql1.0.6/tdbcmysql.tcl
Install pkgIndex.tcl /home/user/Desktop/test/lib/tdbcmysql1.0.6
Installing header files in /home/user/Desktop/test/include
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbcmysql1.0.6/generic/fakemysql.h
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbcmysql1.0.6/generic/mysqlStubs.h
Installing documentation in /home/user/Desktop/test/share/man
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbcmysql1.0.6/doc/tdbc_mysql.n
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcmysql1.0.6'
Installing package 'tdbcodbc1.0.6'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcodbc1.0.6'
/bin/bash /home/user/Desktop/tcl8.6.8/pkgs/tdbcodbc1.0.6/tclconfig/install-sh -c -m 755 libtdbcodbc1.0.6.so /home/user/Desktop/test/lib/tdbcodbc1.0.6/libtdbcodbc1.0.6.so
: /home/user/Desktop/test/lib/tdbcodbc1.0.6/libtdbcodbc1.0.6.so
Install tdbcodbc.tcl /home/user/Desktop/test/lib/tdbcodbc1.0.6/tdbcodbc.tcl
Install pkgIndex.tcl /home/user/Desktop/test/lib/tdbcodbc1.0.6
Installing header files in /home/user/Desktop/test/include
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbcodbc1.0.6/generic/fakesql.h
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbcodbc1.0.6/generic/odbcStubs.h
Installing documentation in /home/user/Desktop/test/share/man
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbcodbc1.0.6/doc/tdbc_odbc.n
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcodbc1.0.6'
Installing package 'tdbcpostgres1.0.6'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcpostgres1.0.6'
/bin/bash /home/user/Desktop/tcl8.6.8/pkgs/tdbcpostgres1.0.6/tclconfig/install-sh -c -m 444 libtdbcpostgres1.0.6.so /home/user/Desktop/test/lib/tdbcpostgres1.0.6/libtdbcpostgres1.0.6.so
: /home/user/Desktop/test/lib/tdbcpostgres1.0.6/libtdbcpostgres1.0.6.so
Install tdbcpostgres.tcl /home/user/Desktop/test/lib/tdbcpostgres1.0.6/tdbcpostgres.tcl
Install pkgIndex.tcl /home/user/Desktop/test/lib/tdbcpostgres1.0.6
Installing header files in /home/user/Desktop/test/include
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbcpostgres1.0.6/generic/fakepq.h
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbcpostgres1.0.6/generic/pqStubs.h
Installing documentation in /home/user/Desktop/test/share/man
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbcpostgres1.0.6/doc/tdbc_postgres.n
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcpostgres1.0.6'
Installing package 'tdbcsqlite3-1.0.6'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcsqlite3-1.0.6'
/bin/bash /home/user/Desktop/tcl8.6.8/pkgs/tdbcsqlite3-1.0.6/tclconfig/install-sh -c -m 444 /home/user/Desktop/tcl8.6.8/pkgs/tdbcsqlite3-1.0.6/library/tdbcsqlite3.tcl \
/home/user/Desktop/test/lib/tcl8/8.6/`echo tdbcsqlite3 | sed s=tdbc=tdbc/=`-1.0.6.tm
Installing documentation in /home/user/Desktop/test/share/man
Installing /home/user/Desktop/tcl8.6.8/pkgs/tdbcsqlite3-1.0.6/doc/tdbc_sqlite3.n
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/tdbcsqlite3-1.0.6'
Installing package 'thread2.8.2'
make[1]: Entering directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/thread2.8.2'
/bin/bash /home/user/Desktop/tcl8.6.8/pkgs/thread2.8.2/tclconfig/install-sh -c -m 644 libthread2.8.2.so /home/user/Desktop/test/lib/thread2.8.2/libthread2.8.2.so
: /home/user/Desktop/test/lib/thread2.8.2/libthread2.8.2.so
Install ttrace.tcl /home/user/Desktop/test/lib/thread2.8.2/ttrace.tcl
Install pkgIndex.tcl /home/user/Desktop/test/lib/thread2.8.2
Installing header files in /home/user/Desktop/test/include
Installing /home/user/Desktop/tcl8.6.8/pkgs/thread2.8.2/generic/tclThread.h
Installing documentation in /home/user/Desktop/test/share/man
Installing /home/user/Desktop/tcl8.6.8/pkgs/thread2.8.2/doc/man/thread.n
Installing /home/user/Desktop/tcl8.6.8/pkgs/thread2.8.2/doc/man/tpool.n
Installing /home/user/Desktop/tcl8.6.8/pkgs/thread2.8.2/doc/man/tsv.n
Installing /home/user/Desktop/tcl8.6.8/pkgs/thread2.8.2/doc/man/ttrace.n
make[1]: Leaving directory '/home/user/Desktop/tcl8.6.8/unix/test/pkgs/thread2.8.2'


====================================================================== end make install





<debian:/home/user/Desktop/tcl8.6.8/unix/test>
[651]$ ls -al tclsh
-rwxrwxr-x 1 user user 7620 Nov 14 09:13 tclsh <............................. after make install, same date as before

<debian:/home/user/Desktop/tcl8.6.8/unix/test>
[651]$ ./tclsh
% info glob
tcl_rcFileName tcl_interactive tcl_version argv0 argv auto_path auto_index env tcl_pkgPath foobarxxx tcl_patchLevel argc tcl_library tcl_platform <.... new value
% info name
/home/user/Desktop/tcl8.6.8/unix/test/tclsh
% exit

heinrichmartin

unread,
Nov 15, 2018, 3:50:15 AM11/15/18
to
On Wednesday, November 14, 2018 at 6:54:06 PM UTC+1, two...@gmail.com wrote:
> One really STRANGE thing I've noticed, is there seems to be something funny about the tclsh it builds into my unix/test directory. While an ls -al tcls* shows the date/time as current, it seems to still be the prior version, UNTIL I also do 'make install'.

Iirc, Tcl is linked as a lib, i.e. running a specific tclsh executable does not imply which Tcl binary you use. Review your execution environment. (The same is true about Tk; and also for package loading.)

Ralf Fassel

unread,
Nov 15, 2018, 5:07:52 AM11/15/18
to
* two...@gmail.com
| One really STRANGE thing I've noticed, is there seems to be something
| funny about the tclsh it builds into my unix/test directory. While an
| ls -al tcls* shows the date/time as current, it seems to still be the
| prior version, UNTIL I also do 'make install'.

That's because your changes in TclMain.c do not end up in the tclsh
*executable*, but in the *shared library* of TCL. The linker instructs
to add a load-path to the tclsh executable which points to the final
installation directory, so this is where your libtcl.so is loaded from
at *runtime*. Only if you do a "make install", the new version of the
shared library is installed there and used when running tclsh.

| <debian:/home/user/Desktop/tcl8.6.8/unix/test>
| [650]$ make
--<snip-snip>--
| rm -f libtcl8.6.so
| gcc -O2 ... -shared -o libtcl8.6.so ... -Wl,-rpath,/home/user/Desktop/test/lib

This builds the new shared lib in current directory and alos instructs
it to load any missing shared library at runtime from
-Wl,-rpath,/home/user/Desktop/test/lib

| gcc -O2 -pipe -Wl,--export-dynamic tclAppInit.o \
| -L/home/user/Desktop/tcl8.6.8/unix/test -ltcl8.6 libtclstub8.6.a -ldl -lpthread -lieee -lm \
| -Wl,-rpath,/home/user/Desktop/test/lib -o tclsh

This builds the new tclsh, and instructs it to load any missing shared
library *at runtime* from -Wl,-rpath,/home/user/Desktop/test/lib (the
installation directory). Though at *compile time* the shared library
version in -L/home/user/Desktop/tcl8.6.8/unix/test is consulted, at
*runtime* the version in -Wl,-rpath,/home/user/Desktop/test/lib is used.

No surprises so far :-)

HTH
R'

two...@gmail.com

unread,
Nov 15, 2018, 1:16:00 PM11/15/18
to
On Thursday, November 15, 2018 at 2:07:52 AM UTC-8, Ralf Fassel wrote:

> That's because your changes in TclMain.c do not end up in the tclsh
> *executable*, but in the *shared library* of TCL.

AHHHH, thanks for the great analysis and explanation. I've been using tclkits on windows for so long now, I forget about shared libraries. Even had I considered that, I likely would have thought it would use the library in the same directory as the ".exe" first, as seems to be the way windows works with .dll's.

So, now I can just "make ; cp -f ..." the .so file into the installation lib directory, which is faster than doing the make install, which takes the interminably long time of 6 seconds, vs. instantaneously with a cp :)

Now that I've got past the "hello world" stage, I can try to work out a few changes I've been curious about.

Thanks so much!

Rich

unread,
Nov 15, 2018, 2:21:46 PM11/15/18
to
two...@gmail.com wrote:
> On Thursday, November 15, 2018 at 2:07:52 AM UTC-8, Ralf Fassel wrote:
>
>> That's because your changes in TclMain.c do not end up in the tclsh
>> *executable*, but in the *shared library* of TCL.
>
> AHHHH, thanks for the great analysis and explanation. I've been
> using tclkits on windows for so long now, I forget about shared
> libraries. Even had I considered that, I likely would have thought
> it would use the library in the same directory as the ".exe" first,
> as seems to be the way windows works with .dll's.

If you export a LD_LIBRARY_PATH environment variable pointing to the
local directory of the *.so object, the tcl executable should load the
local *.so object in preference to the system installed one.

That environment variable has the same flexibility as PATH, it can be a
colon delimited list of directories to search first for shared objects
to load.

two...@gmail.com

unread,
Nov 15, 2018, 3:11:47 PM11/15/18
to
On Thursday, November 15, 2018 at 11:21:46 AM UTC-8, Rich wrote:
> If you export a LD_LIBRARY_PATH environment variable pointing to the
> local directory of the *.so object...

Ah, ok, some of this is starting to come back, I recall now, so

LD_LIBRARY_PATH=`pwd` ./tclsh

will do it for me, thanks for that tip!

Rich

unread,
Nov 15, 2018, 3:39:16 PM11/15/18
to
Or, if running bash:

export LD_LIBRARY_PATH=`pwd`

and then as long as you are in the same shell, all your ./tclsh
invocations will find the *.so (assuming *.so files you want replaced
are in the 'pwd' location where you ran the export.
0 new messages