Skip Menu |

This queue is for tickets about the Gettext CPAN distribution.

Report information
The Basics
Id: 14968
Status: new
Priority: 0/
Queue: Gettext

People
Owner: Nobody in particular
Requestors: dvornik [...] gmail.com
Cc:
AdminCc:

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



Subject: Makefile.PL doesn't correctly detect -lintl on some systems
Currently, building gettext fails on Cygwin. This is because Makefile.PL doesn't invoke the compiler quite correctly. On at least some OSes (e.g. Cygwin), the order of source files and -l flags in compilation invocations matters. In other words, "foo.c -lbar" is *not* the same as "-lbar foo.c". Only he "foo.c -lbar" case will work correctly (since dependencies in foo.c will get satisfied from -lbar, in the UNIXish left-to-right order). Makefile.PL for gettext currently tries to invoke the compiler as $cc -o conftest -lintl conftest.c I would suggest replacing that with $cc -o conftest conftest.c -lintl The attached patch does exactly that, and fixes the problem on Cygwin. Thanks, --Albert Dvornik <dvornik@gmail.com>
--- Makefile.PL.orig 2005-01-30 18:30:22.000000000 -0500 +++ Makefile.PL 2005-10-07 05:35:46.297520000 -0400 @@ -50,7 +50,7 @@ close TEST; open(SAVE, ">&STDERR"); open(STDERR, ">/dev/null"); - system($cc . " -o conftest " . $libs . " conftest.c"); + system($cc . " -o conftest conftest.c " . $libs); my $exitstatus = $?; open(STDERR, ">&SAVE"); if ($exitstatus != 0) {
From: rurban [...] cpan.org
[guest - Fri Oct 7 05:51:55 2005]: Show quoted text
> Currently, building gettext fails on Cygwin. This is because > Makefile.PL doesn't invoke the compiler quite correctly.
This patch is not only needed on Cygwin, but on all platforms which use a modern gcc. Please apply