Overview
| Artifact ID: | af342b282941002feadf826700daebc739b27859 |
|---|---|
| Ticket: | 444308ffffffffffffffffffffffffffffffffff
Tcl can fail to compile from source |
| User & Date: | lloydlim on 2001-07-25 00:47:41 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
Tcl can sometimes fail to compile from source. This happens most often on FreeBSD machines when the Tcl source code is being checked out of a CVS repository. The details are as follows: Often Tcl source code that is being checked out of a CVS repository will end up with tcl.decls and/or tclInt.decls having modification times that are later than tclStubInit.c. Typically, the modification times will only be 1 second later, but that's enough to cause trouble. When Tcl is being built, it decides that it needs to regenerate tclStubInit.c. This happens, of course, before tclsh is built. If a working tclsh is not in the current path, the make fails when it tries to execute genStubs.tcl. FreeBSD machines install tclsh under tclshx.x, so compiles will fail even if Tcl was installed by default. To reproduce this problem, make sure that some other tclsh is not in your path. Touch the tcl.decls and/or tclInt.decls files to make their modification times later than tclStubInit.c. Then try to configure and make Tcl as usual. This behavior isn't desirable. The makefile shouldn't try to use something before it's built. I suggest testing for the existence of tclsh before running genStubs.tcl. Here is a patch to do this: --- Makefile.in.old Tue Jul 24 16:49:54 2001 +++ Makefile.in Tue Jul 24 16:52:42 2001 @@ -1039,8 +1039,10 @@ $(GENERIC_DIR)/tclStubInit.c: $(GENERIC_DIR)/tcl.decls \ $(GENERIC_DIR)/tclInt.decls - $(TCL_EXE) $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \ - $(GENERIC_DIR)/tcl.decls $(GENERIC_DIR)/tclInt.decls + if test -e $(TCL_EXE); then \ + $(TCL_EXE) $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \ + $(GENERIC_DIR)/tcl.decls $(GENERIC_DIR)/tclInt.decls; \ + fi genstubs: $(TCL_EXE) $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \ If someone is compiling from scratch, tclsh won't exist. However, if someone really modified the declarations, then they are likely to have already compiled the source and tclsh will exist. Some sequences of events won't be caught (eg--developer changes declarations, then developer does make distclean, then developer configures and makes). It will, however, compile correctly if the developer makes again or if the developer does an explicit make genstubs. It'd be better if it worked 100% of the time, but I can't think of a way to do that. Unless someone comes up with something better, I suggest incorporating the above patch. IMHO, it's better if the source code always compiles from scratch. - foundin changed to: "obsolete: 8.3.3"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "lloydlim"
- subsystem changed to: "53. Configuration and Build Tools"
- title changed to: "Tcl can fail to compile from source"
- type changed to: "Bug"