in reply to Re^2: Tcl for Strawberry Perl on Windows 64bit
in thread Tcl for Strawberry Perl on Windows 64bit

not quite so simple.

It still looks very very simple :)

Ok, this is simpler, portable activeperl, it comes with Tcl/Tkx http://downloads.activestate.com/ActivePerl/releases/5.20.2.2001/ActivePerl-5.20.2.2001-MSWin32-x64-298913.zip

This is the result from attempting to build Tcl using lateset Strawberry Perl (perl 5, version 22, subversion 0 (v5.22.0) built for MSWin32-x64-multi-thread) and AS TCl (ActiveState ActiveTcl 8.6.4.1.299124 distribution for Win32/x64)

result from perl Makefile.PL C:\Tcl\lib\tcl86.lib: error adding symbols: File format not recognized

Any ideas? Its clearly struggling with the tcl86.lib format...

That is simple, examine the file

Step one, get diagnostics

file "C:\Tcl\lib\tcl86.lib" sha1sum "C:\Tcl\lib\tcl86.lib" objdump -p "C:\Tcl\lib\tcl86.lib" |head

Replies are listed 'Best First'.
Re^4: Tcl for Strawberry Perl on Windows 64bit
by DaveARoberts (Acolyte) on Jul 21, 2015 at 20:46 UTC

    I'm not sure where the file command comes from. Anyway the size/datetime....

    06/06/2015 06:17 181,880 tcl86.lib

    I downloaded an sha1sum.exe, here's the result

    5b2c87ccbc0838d7c9687f15f5ab6a33f7f77837 C:\Tcl\lib\tcl86.lib

    and the results of objdumo

    C:\Tcl\lib>objdump -p "C:\Tcl\lib\tcl86.lib" |head In archive C:\Tcl\lib\tcl86.lib: tcl86.dll: file format pe-x86-64 Characteristics 0x0 Time/Date Sat Jun 06 05:37:55 2015 Magic 0000 MajorLinkerVersion 0 MinorLinkerVersion 0

    I appreciate your help

      Hmm, thats kinda interesting :)

      Ok next step is do what syphilis suggested which is generate a new "lib" from the dll( HOWTO Create an Import Library for a DLL using MinGW | MinGW )

      So start a new shell and run

      chdir C:\Tcl\lib move tcl86.lib original-tcl86.lib gendef C:\Tcl\bin\tcl86.dll dlltool --kill-at --input-def tcl86.def --output-lib tcl86.lib

      Then back in the the other cmd window run dmake again

      If it doesn't work copy/paste the error to share with us here :)

      Then try again with     dlltool -z tcl86.def --export-all-symbol C:\Tcl\bin\tcl86.dll instead of gendef

        Thanks for this guidance. Made a little progress, but still could use your help. The commands you suggested worked without error....

        C:\Tcl\lib>move tcl86.lib original-tcl86.lib 1 file(s) moved. C:\Tcl\lib>gendef C:\Tcl\bin\tcl86.dll * [C:\Tcl\bin\tcl86.dll] Found PE+ image C:\Tcl\lib>dlltool --kill-at --input-def tcl86.def --output-lib tcl86. +lib C:\Tcl\lib>

        I was able to dmake the Tcl package without error. However when I tried to test I got the following for each test (including just one to save your eyes).

        C:\STRAWB~1\cpan\build\Tcl-1.02-DZAeQs>dmake test "C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::H +arness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\l +ib', 'blib\arch')" t/ *.t t/call.t ........... Can't load 'C:\STRAWB~1\cpan\build\Tcl-1.02-DZAeQ +s\blib\arch/auto/Tcl/Tcl.xs.dll' for module Tcl: load_file:The specif +ied procedure could not be found at C:/Strawberry/perl/lib/DynaLoader +.pm line 193. at t/call.t line 6. Compilation failed in require at t/call.t line 6. BEGIN failed--compilation aborted at t/call.t line 6. t/call.t ........... Dubious, test returned 255 (wstat 65280, 0xff00) No subtests run

        In addition I was presented with the windows error message "The procedure entry point inflateGetHeader could not be located in the dynamic link library zlib1.dll"

        zlib1.dll is included in c:\Tcl\bin, but without a corresponding library in c:\Tcl\lib

        I ran the following code to create the symbol list from zlib1.dll, and indeed the symmbol inflateGetHeader is included in zlib1.def. I also created libzlib1.a

        C:\Tcl\lib>gendef C:\Tcl\bin\zlib1.dll * [C:\Tcl\bin\zlib1.dll] Found PE+ image C:\Tcl\lib>dlltool --kill-at --input-def zlib1.def --output-lib zlib1. +lib C:\Tcl\lib>

        I then went through dmake clean, perl Malefile.PL, dmake and dmake test again. Same result.

        I also tried adding libzlib1.a as an additional library in the makefile so that the output from perl Makefile.pl is

        tclsh=C:/Tcl/bin/tclsh.exe tclConfig.sh=C:/Tcl/lib/tclConfig.sh tcl_library=C:/Tcl/lib/tcl8.6 tcl_version=8.6 LIBS = -LC:/Tcl/lib -ltcl86 -lzlib1 INC = -IC:/Tcl/include DEFINE = Checking if your kit is complete... Looks good Generating a dmake-style Makefile Writing Makefile for Tcl Writing MYMETA.yml and MYMETA.json

        I repeated the dmake and test again, but with same results. Any recommendations on my next steps?