On Wed, 23 Nov 2005, Sisyphus wrote:
> With AS build 815 I'm having trouble building Math::GMP (or indeed any
> module that needs to link to an external library) using MinGW and dmake.

Thanks for pointing this out.  You are certainly correct that 815 will not
automatically link with .a files.  Just changing lib_ext to .a will not really
solve this though, as are also linking against perl58.lib instead of 
libperl58.a,
so we really need to support "both".  I guess this needs some more research.

[...]

> So I thought I would override $Config{lib_ext} in
> site/lib/ActiveState/Config.pm and change it to '.a' ... and see what
> happens.
> 
> So ... in site/lib/ActiveState/Config.pm, I added lib_ext to the list that
> gets used to create %COMPILER_ENV, and then added:
> 
> _override("lib_ext", ".a");
> 
> just below all of the other _override() calls. This procedure worked fine
> for changing $Config{i64type} from '__int64' to 'long long', but it doesn't
> work for $Config{lib_ext}:
>
> E:\comp_815\Math-GMP-2.04>perl -V:i64type
> Set up gcc environment - 3.4.4 (mingw special)
> i64type='long long';
> 
> E:\comp_815\Math-GMP-2.04>perl -V:lib_ext
> lib_ext='.lib';
> 
> Why *is* that ??
> 
> Eventually I changed $Config{lib_ext} to '.a' by editting lib/Config.pm -
> but Math::GMP still refuses to build (for the same reason).

You need to delete the entry for lib_ext from Config.pm.  Those are just
"cached" values from config_heavy.pl, and ActivePerl::Config can only
override non-cached entries.
 
> There's an issue that EU::FC's Config_m.pm resolves that is otherwise left
> unaddressed ... but just what is this "issue" and how is it being resolved
> ??
[...] 
> The most notable difference in the makefiles that are produced is that with
> Config_m.pm the generated makefile has a listing for EXTRALIBS and
> LDLOADLIBS that contains libgmp.a (fully qualified), whereas the other way
> there's no such listing - and running 'dmake' therefore results in
> 'unresolved references' because libgmp.a does not get linked in.

I'll look into it in time for 816; I don't have time to do so right now.

Thanks again for reporting this; I'll create a Bugzilla entry for it so it
doesn't get lost.

Cheers,
-Jan


_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to