Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 47138
Status: resolved
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: Nobody in particular
Requestors: mattn.jp [...] gmail.com
Cc: Jan Dubois <jand [...] ActiveState.com>
sho_pi [...] hotmail.com
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: ExtUtils::MakeMaker generate duplicate --image-base with gcc on windows.
Hi. I tried to compiler "Coro-5.132" using gcc on windows. And I found a bug in "ExtUtils::MakeMaker". When compiler is "gcc", "MM_Win32.pm" generate forcely "--image-base" linker option. ExtUtils::MM_Win32.pm:302 if ($GCC) { my $dllname = $self->{BASEEXT} . "." . $self->{DLEXT}; $dllname =~ /(....)(.{0,4})/; my $baseaddr = unpack("n", $1 ^ $2); $otherldflags .= sprintf("-Wl,--image-base,0x%x0000 ", $baseaddr); } "Coro::Event" is using "Event" that is XS. "Event"s is generated "--image-base" as unpack("n", "Even", "t.dl"). And "Coro::Event" is generated it also as unpack("n", "Even", "t.dll"). Thus, Coro::Event can't load "auto/Coro/Evnt/Event.dll" I think that it should use another logic for generating "--image-base". For example, using $self->{FULLEXT} instead of $self->{BASEEXT}. It will be unpack("n", "Even", "t.dl") and unpack("n", "Coro", "::Ev"). Or, exclude the logic from 'WW_Win32.pm' for enable auto generate "-image-base". Best Regards, Thanks. - Yasuhiro Matsumoto
CC: Jan Dubois <jand [...] activestate.com>, sho_pi [...] hotmail.com
Subject: Re: [rt.cpan.org #47138] ExtUtils::MakeMaker generate duplicate --image-base with gcc on windows.
Date: Sun, 21 Jun 2009 16:13:15 -0400
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
Yasuhiro Matsumoto via RT wrote: Show quoted text
> I tried to compiler "Coro-5.132" using gcc on windows. And I found a bug > in "ExtUtils::MakeMaker". When compiler is "gcc", "MM_Win32.pm" generate > forcely "--image-base" linker option. > > ExtUtils::MM_Win32.pm:302 > > if ($GCC) { > my $dllname = $self->{BASEEXT} . "." . $self->{DLEXT}; > $dllname =~ /(....)(.{0,4})/; > my $baseaddr = unpack("n", $1 ^ $2); > $otherldflags .= sprintf("-Wl,--image-base,0x%x0000 ", $baseaddr); > } > > "Coro::Event" is using "Event" that is XS. > "Event"s is generated "--image-base" as unpack("n", "Even", "t.dl"). > And "Coro::Event" is generated it also as unpack("n", "Even", "t.dll"). > > Thus, Coro::Event can't load "auto/Coro/Evnt/Event.dll" > > I think that it should use another logic for generating "--image-base". > For example, using $self->{FULLEXT} instead of $self->{BASEEXT}. > > It will be unpack("n", "Even", "t.dl") and unpack("n", "Coro", "::Ev"). > > Or, exclude the logic from 'WW_Win32.pm' for enable auto generate > "-image-base".
That code's been in there for a long time. commit 7a958ec31151f9d03a26dcab8abdf5c57315dc96 Author: Benjamin Stuhl <sho_pi@hotmail.com> Date: Thu Nov 18 10:45:27 1999 -0800 applied somewhat modified version of suggested patch Message-ID: <19991119024527.72749.qmail@hotmail.com> Subject: [PATCH 5.005_62] Perl on Win95, Mark IIB p4raw-id: //depot/perl@4653 I guess it wasn't as "hopefully unique" as the author thought. Here's the origin of that patch. http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/1999-11/msg00724.html I'm not a C programmer, but it seems very fishy that its going through such lengths to generate a filename. It looks like its doing a very poor job of making a hash. Maybe Jan or Ben can shed some light on this code? -- Hating the web since 1994.
Any thoughts on this? It seems from reading up on it a bit that gcc is capable of doing this automatically now. Can we just remove this code and let it take care of it?
I've relented and patched it in. If it breaks anything, mattn, you'll be the first to know. ;)