Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Tk on windows 7?

by Anonymous Monk
on Nov 21, 2011 at 14:24 UTC ( [id://939207]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks,
I tried to install Tk on Strawberry perl (portable), by typing cpan Tk at the promt from the portableshell.bat
But I get the following error at the end:
collect2: ld returned 1 exit status dmake.exe: Error code 129, while making 'blib\arch\auto\Tk\Tk.dll' SREZIC/Tk-804.030.tar.gz E:\Perl\c\bin\dmake.exe -- NOT OK Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible
Anybody knows how to get around that?
perl version is 5.12.3.0.
Thanks

Replies are listed 'Best First'.
Re: Tk on windows 7?
by VinsWorldcom (Prior) on Nov 21, 2011 at 16:26 UTC
Re: Tk on windows 7?
by lamprecht (Friar) on Nov 24, 2011 at 09:57 UTC
    The problem was described and fixed here (thanks to kmx):
    http://www.mail-archive.com/win32-vanilla@perl.org/msg00343.html

    strawberry-portable 5.12.3 needs the following patches:

    diff -ru portable.orig\perl\vendor\lib\Portable\Config.pm portable.new\perl\vendor\lib\Portable\Config.pm --- portable.orig\perl\vendor\lib\Portable\Config.pm Wed Apr 13 02: +20:12 2011 +++ portable.new\perl\vendor\lib\Portable\Config.pm Mon Oct 31 13: +00:13 2011 @@ -32,7 +32,7 @@ and length $conf->{$key} and not - $key =~ /^ld/ + $key =~ /(^ld|^libpth$)/ ) { $self->{$key} = $conf->{$key}; next; @@ -42,7 +42,7 @@ $root, split /\//, $conf->{$key}, ); #join path to directory of portable perl with value + from config file } - foreach my $key ( grep { /^ld/ } keys %$self ) { #linker confi +g variables + foreach my $key ( grep { /(^ld|^libpth$)/ } keys %$self ) { #l +inker config variables next unless defined $self->{$key}; $self->{$key} =~ s/\$(\w+)/$self->{$1}/g; } diff -ru portable.orig\portable.perl portable.new\portable.perl --- portable.orig\portable.perl Sun Feb 06 21:19:30 2011 +++ portable.new\portable.perl Mon Oct 31 12:59:14 2011 @@ -56,10 +56,12 @@ installvendorman3dir: '' installvendorscript: 'perl/bin' ld: g++.exe - lddlflags: '-mdll -s -L"$archlib\CORE" -L"$libpth"' - ldflags: '-s -L"$archlib\CORE" -L"$libpth"' - ldflags_nolargefiles: '-s -L"$archlib\CORE" -L"$libpth"' - libpth: c/lib + lddlflags: '-mdll -s -L"$archlib\CORE" -L"$_workaround1"' + ldflags: '-s -L"$archlib\CORE" -L"$_workaround1"' + ldflags_nolargefiles: '-s -L"$archlib\CORE" -L"$_workaround1"' + _workaround1: c/lib + _workaround2: c/i686-w64-mingw32/lib + libpth: $_workaround1 $_workaround2 perlpath: perl/bin/perl.exe prefix: perl prefixexp: perl
    Cheers, Christoph
      Hi Christoph
      Thanks a lot-lot-lot for this!
      I did apply the changes you mentioned, re-ran cpan Tk and it worked.
Re: Tk on windows 7?
by Anonymous Monk on Nov 21, 2011 at 14:59 UTC

    Anybody knows how to get around that?

    You do not provide enough information

      What other information do you need?

        Can you guess?

        The last error is never as useful as the first error

        But you should really post the output from perl Makefile.PL && dmake test

        Last time I saw that the fix was
        --- Tk\MMutil.pm.orig 2009-10-07 03:08:28.781250000 -0700 +++ Tk\MMutil.pm 2009-10-07 03:14:37.390625000 -0700 @@ -583,6 +583,7 @@ } push(@opt,'DEFINE' => $define, 'INC' => $i); } + for(@{$att{LIBS}}){ $_=":nosearch $_"}; WriteMakefile(@opt, %att); }
        http://win32.perl.org/wiki/index.php?title=Tk-804.028_501

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://939207]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-25 20:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found