X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <4EFCE839.4070904@cpan.org> References: <4EFCE839 DOT 4070904 AT cpan DOT org> Date: Sat, 31 Dec 2011 11:05:03 -0600 Message-ID: Subject: Re: broke my perlbrewed perl with rebase From: Reini Urban To: rkitover AT cpan DOT org, cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id pBVH5S71027651 On Thu, Dec 29, 2011 at 4:22 PM, Rafael Kitover wrote: > I made a perl to test some stuff with perlbrew, a 5.12.0. > > I installed some CPAN modules into it, then I needed to rebase because > of mapping errors. > > I made a copy of perlrebase and modified it thusly: > > #!/bin/sh > > baseaddr=0x57000000 > > perl=`which perl` > > dll=$(ldd $perl | $perl -anle 'print $F[2] if /cygperl/') > > echo $dll >> rebase.lst > /usr/bin/find ~/perl5 -name \*.dll >> rebase.lst > /usr/bin/cat rebase.lst | /usr/bin/xargs chmod ug+w > [ -e /usr/bin/peflags.exe ] && /usr/bin/peflags -t $perl > /usr/bin/rebase -v -b $baseaddr -T rebase.lst > [ -e /usr/bin/peflags.exe ] && /usr/bin/grep \.dll rebase.lst \ >        | /usr/bin/peflags -d0 -T - >/dev/null > > perlbrew puts its stuff into ~/perl5/perlbrew > > I ran this script, and now my perlbrewed perl no longer works at all. It > exits immediately when I run it, not even perl -v works. > > This is what I see in gdb `which perl` after doing a run: > Starting program: > /c/Users/rkitover/perl5/perlbrew/perls/perl-5.12.0/bin/perl > [New Thread 8156.0x9ec] > [Inferior 1 (process 8156) exited with code 030000000005] > > The perlbrew command I used was: > perlbrew install -n -j 3 perl-5.12.0 -D DEBUGGING -D optimize="-ggdb3" > -D usethreads > > Did I do something wrong with rebase here? I don't see the error immediately. You have to check the rebase.lst and ldd perl.exe. But I strongly advise against using perlbrew on cygwin. There's something odd going on with PERL5LIB and could not find a solution. Either us my build.sh and build_common.sh scripts to compile your perls or use my new App-perlall from my github or CPAN. Using a customized build.sh is still a bit better. It is easy to generate custom perl exe and dll and archlib's to seperate various perl installations globally, which can be easily rebased and maintained. I have almost every combination of perl versions, threaded/non-threaded, DEBUG/non-debug on cygwin to test in /usr/local/bin/ -- Reini Urban http://cpanel.net/   http://www.perl-compiler.org/ -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple