Subject: pkg/24211: lang/perl58 build fails if LANG is set
To: None <>
From: Min Sik Kim <>
List: netbsd-bugs
Date: 01/24/2004 02:22:18
>Number:         24211
>Category:       pkg
>Synopsis:       lang/perl58 build fails if LANG is set
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 24 08:23:00 UTC 2004
>Originator:     Min Sik Kim
>Release:        NetBSD 1.6ZH
Perl-5.8 runs a perl binary to figure out if it can use the binary.  A
proper perl binary is expected to return "VER_OK\n".  However, if LANG
is set, it dumps some warnings before it prints "VER_OK\n" as follows:

  perl: warning: Setting locale failed.
  perl: warning: Please check that your locale settings:
          LC_ALL = (unset),
          LANG = "en_US.UTF-8"
      are supported and installed on your system.
  perl: warning: Falling back to the standard locale ("C").

Since perl58 uses the follwing condition, it rejects the binary if it
prints anything before "VER_OK\n".

  ($val =~ /^VER_OK/)

lang/perl5 doesn't have such a problem because it uses a less strict
condition: ($val =~ /VER_OK/).


In lang/perl58,

% env LANG=en_US.UTF-8 make


Index: Makefile
RCS file: /cvsroot/pkgsrc/lang/perl58/Makefile,v
retrieving revision 1.30
diff -u -r1.30 Makefile
--- Makefile	2004/01/23 23:26:25	1.30
+++ Makefile	2004/01/24 08:18:25
@@ -93,6 +93,7 @@
 PERL5_CC=		${CC:T}
 .if ${OPSYS} == "Darwin"
 System: NetBSD 1.6ZH NetBSD 1.6ZH (SULLEY) #3: Fri Jan 16 16:57:45 CST 2004 i386
 Architecture: i386
 Machine: i386