Re: [ANN] critcl v3 and other news



Dave <use@xxxxxxxxxxxxxxxxxxxxxx> writes:

On 10/17/2011 10:42 PM, Andreas Kupries wrote:

Some news regarding Jean-Claude Wippler's venerable "C Runtime In
Tcl" package and application, short "critcl".


Very long post... sorry.

Win7x64, ActiveTcl 8.5.10.1 64-bit

Tried to install per instructions. I wanted to install everything in
the Temp/ directory and try it out.

Note that the location I gave also has a link to a critcl starkit for
download.

Here's what I got after starting a
windows command shell in the directory (jcw-critcl-e1d3dc7) created
when unpacking the sources:


Installed package: C:/Users/imdave/AppData/Local/Temp/CriTcl/critcl3
Installed package:

couldn't open "C:/Users/imdave/AppData/Local/Temp/bin/critcl": no
such file or directory
while executing
"open $dsta/critcl w"
(procedure "_install" line 48)
invoked from within
"_install C:/Users/imdave/AppData/Local/Temp/CriTcl"
("eval" body line 1)
invoked from within
"eval _$argv"

Oops.

OK, so I have to make a "bin" directory:

To be fixed in build.tcl

My tests usually either did not specify a directory, or explicitly
pointed into a Tcl installation, meaning that all the directories were
present already in both cases.

C:\Users\imdave\Downloads\TclPackages\CriTcl\jcw-critcl-e1d3dc7>md
%TEMP%\bin

So now it's "installed". Run it:

C:\Users\imdave\AppData\Local\Temp>tclsh bin/critcl


So now it seems that I should be able to run it.

I next changed to the examples/clist directory in the source
distribution since it looked like it was the easiest to try.

I did a "tclsh build.tcl"
It started a GUI
I specified "." as the install directory
It failed -- the last message seemed to indicate that it could not

exec "cl.exe"

You have MSVC installed, or the Platform SDK ?
And the directory containing the compiler (cl.exe) is in the PATH ?

Nevermind, I see the next steps you took.

Should update the documentation, that a working compiler is expected.

Also, the GUI hung, I had to use task manager to kill the tclsh.exe process

Not sure how that came about. I'll have a look.
Hm. Were the buttons in the GUI disabled ?
It should not happen, the 'Install' procedure catches errors and
reactivates all buttons regardless, including 'Exit', which simply
calls Tcl's 'exit' command.

I've installed Visual Studio Express 10.0
There were several cl.exe's that I found

Likely for the various architectures supported by the VSE, like 32bit
intel, 64bit intel, itanium, etc.

After a little googling, I created this init.bat file:

set TCLLIBPATH={C:/Program Files/Tcl/lib/tcl8.5} {C:/Program
Files/Tcl/lib} {c:/program
files/tcl/lib/teapot/package/win32-x86_64/lib} {c:/program
files/tcl/lib/teapot/package/tcl/lib}
C:/Users/imdave/AppData/Local/Temp/CriTcl
call "C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\vcvarsall.bat"
cd
C:\Users\imdave\Downloads\TclPackages\CriTcl\jcw-critcl-e1d3dc7\examples\clist
tclsh build.tcl

It started a GUI
I specified "." as the install directory again

Seems that I should [file normalize] the path, to make it independent
of whatever changed to the CWD happen latter. Just in case. Not sure
at this point if that would be a fix.

It failed. Here's the Tcl error trace:

error renaming "./clist": no such file or directory
error renaming "./clist": no such file or directory
while executing
"file rename $ldir/$p $ldir/$p$version"


That is where it tries to move the generated package into the selected
destination directory. That is fairly late in the process, after
compilation and linking.

.... Now knowing that the link phase failed the package dir hierarchy
was not made, and that is likely the issue at hand. However, it would
be better if the code would not try to install anything with the
linking failed. That I have to make better.


Here's what was shown in the GUI:

[elided the ok parts].

C:/Users/imdave/Downloads/TclPackages/CriTcl/jcw-critcl-e1d3dc7/examples/clist/BUILD/v3_86debd742deffa5378d9000a448a3210_pic.obj:
1792 bytes

link
-nologo
-release
-opt:ref
-opt:icf,3
-ws:aggressive
-verbose:lib
bufferoverflowU.lib
-dll
-out:C:/Users/imdave/Downloads/TclPackages/CriTcl/jcw-critcl-e1d3dc7/examples/clist/BUILD/v3_86debd742deffa5378d9000a448a3210.dll
@C:/Users/imdave/Downloads/TclPackages/CriTcl/jcw-critcl-e1d3dc7/examples/clist/BUILD/link.fil

ERROR while linking
LINK : fatal error LNK1181: cannot open input file 'bufferoverflowU.lib'
child process exited abnormally

Yes. The configuration for Windows 64 bit assumes that bufferoverflowU.lib
is required for proper linking, and accessible.

Can you check your VSE installation, if it contains that library ?

And if yes, if the "vcvarsall.bat" actually exports the directory it
is in ?

I will cross-check this with my system tomorrow. That one uses the
Platform SDK, and I know that the library in question is there.

critcl build failed
(C:/Users/imdave/Downloads/TclPackages/CriTcl/jcw-critcl-e1d3dc7/examples/clist/clist.dll)
(FAILED) Files left in
C:/Users/imdave/Downloads/TclPackages/CriTcl/jcw-critcl-e1d3dc7/examples/clist/BUILD
FAILURES 1
FAILED: <<Bracket>>
FAILED

There was a BUILD directory created with two .obj files, link.fil, and
a tcl8.5 directory -- so I guess the cl.exe worked

Yes.

Finally, my request:

Would it be possible to either point me to or provide an extremely
simple/basic "hello world" type of example with all the steps laid out
for a total newby?

Thank you.

Well, that is what I wanted to provide with the examples. Obviously
that did not work out that well :(

Tomorrow, when I am back in the office, I will use my windows hosts
and work through the issues, fixing the build.tcl scripts, updating
documentation, etc. As far as I can. The bufferoverflowU.lib I am not
sure about yet. I know that my Win64 system has it around somewhere,
asnd the linker is able to find it.


--
So long,
Andreas Kupries <akupries@xxxxxxx>
<http://www.purl.org/NET/akupries/>
Developer @ <http://www.activestate.com/>
18'th Annual Tcl/Tk Conference: 2011, Manassas, VA USA
http://www.tcl.tk/community/tcl2011/
-------------------------------------------------------------------------------
.



Relevant Pages

  • Errors applying kernel patch 118833-36
    ... install of Solaris 10 11/06. ... However, once the package list is done, I see a worrisome message: ... Below is the complete console output of the patch run. ... Changes for package SUNWnfsskr will not be applied to the system. ...
    (SunManagers)
  • Re: tile package provide
    ... My first, most earnest, and sincere suggestion - install ActiveTcl ... I came across the Tile package because I just installed ActiveTcl on ... TCL has the nice feature that the code does not have to be compiled, ...
    (comp.lang.tcl)
  • Re: tile package provide
    ... My first, most earnest, and sincere suggestion - install ActiveTcl ... I came across the Tile package because I just installed ActiveTcl on ... TCL has the nice feature that the code does not have to be compiled, ...
    (comp.lang.tcl)
  • Re: SmartMenu - was: VRPC on a USB pen
    ... in applications distributed via package systems which are supposed to ... having to get the user to install it, or they could present the user ... Haskell compiler and associated tools (collectively referred to on ... haskell.org as the 'platform' package). ...
    (comp.sys.acorn.misc)
  • Re: Stronghelp - can I change location set by Packman?
    ... it was needed to install a package though. ... RISC OS desktop. ... Simpler for the newbies arriving from Linux, ...
    (comp.sys.acorn.apps)