delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/07/10/04:33:11

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <6910a60807100132h78c334afl1095d866ee6b864f@mail.gmail.com>
Date: Thu, 10 Jul 2008 10:32:37 +0200
From: "Reini Urban" <rurban AT x-ray DOT at>
To: cygwin AT cygwin DOT com
Subject: Re: perl-5.10.0-4 -> perl-5.10.0-5 site_perl update needed
In-Reply-To: <6910a60807100116g628cf204yeb1c43cbece6802a@mail.gmail.com>
MIME-Version: 1.0
References: <6910a60807100116g628cf204yeb1c43cbece6802a AT mail DOT gmail DOT com>
X-Google-Sender-Auth: fe48de70e9861d28
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

2008/7/10 Reini Urban:
> I've analyzed the symbols in the dll's and found the explanation and
> solution for this update problems. p5p and module authors need not to
> be concerned. It's a simple cygwin perl update problem.
>
> In short:
> All old perl-5.10.0-4 generated binary site_perl modules need to be
> recompiled with perl-5.10.0-5.
> They are not ABI cross-compatible with the new vendor and archlib modules.
>
> Explanation:
> perl-5.10.0-5 is based on patchlevel 34065, perl-5.10.0-4 was based on
> plain 5.10.0 with a lot of patches.
>
> perl-5.10.0-5 adds a new utf8 handling of strings via a new
> newSVpvn_flags function
> sv.h: #define newSVpvn_utf8(s, len, u) newSVpvn_flags((s), (len), (u)
> ? SVf_UTF8 : 0)
> perl-5.10.0-4 does not contain newSVpvn_utf8 nor newSVpvn_flags.
>
> So any new XS module using strings may not call an old perl-5.10.0-4 dll, which
> does not contain the _utf8  and _flags functions.

Well, newSVpvn_utf8 is just a macro.

> Solution:
> # delete all old site packages with dll's and reinstall them
> for pack in $(find /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto \
>  -name .packlist \! -newer /bin/perl.exe);
> do
>  grep .dll $pack && rm -f $(cat $pack)
> done | \
> perl -MCPAN -ne'
> s|/usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/(.+?)/\w+\.dll$|$1|;
> s|/|::|g; push @p, $_; END {install(@p) }'
>
> should recompile them all.

Oops, I forgot the final \n. chomp is needed.
Removing the .packlist would also be good.

This is the script, needed if you installed binary cpan packages with
-4 or older 5.10 packages

<<<< ~/bin/perl-site-update-4 >>>>
for pack in $(find /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto \
 -name .packlist \! -newer /bin/perl.exe);
do
 grep .dll $pack && rm -f $(cat $pack) && rm -f $pack
done | \
  perl -MCPAN -ne'
s|/usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/(.+?)/\w+\.dll$|$1|;
s|/|::|g; chomp; push @p, $_; END {install(@p) }'

>>>> <<<<

-- 
Reini Urban
http://phpwiki.org/ http://murbreak.at/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019