Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 May 2006 11:44:43 GMT
From:      Vaclav Haisman <v.haisman@sh.cvut.cz>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/98008: Having set UTF-8 locale break build of security/libgpg-error port
Message-ID:  <200605271144.k4RBihfS022872@www.freebsd.org>
Resent-Message-ID: <200605271150.k4RBoIjf034460@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         98008
>Category:       ports
>Synopsis:       Having set UTF-8 locale break build of security/libgpg-error port
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 27 11:50:18 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Vaclav Haisman
>Release:        5.4
>Organization:
None
>Environment:
reeBSD amber2.local 5.5-PRERELEASE FreeBSD 5.5-PRERELEASE #0: Wed May 17 15:07:39 CEST 2006     root@amber2.local:/usr/obj/usr/src/sys/AMBER2  i386
>Description:
During the build, if locale is .UTF-8 locale, then the following error appears:

gawk -f ./mkerrcodes1.awk ./errnos.in >_mkerrcodes.h
cc -E _mkerrcodes.h | grep GPG_ERR_ | gawk -f ./mkerrcodes.awk >mkerrcodes.h
rm _mkerrcodes.h
cc -I. -I. -o mkerrcodes ./mkerrcodes.c
In file included from ./mkerrcodes.c:26:
./mkerrcodes.h:17: error: syntax error before "GPG_ERR_EBADF"
./mkerrcodes.h:17: warning: initialization makes integer from pointer without a cast
./mkerrcodes.h:38: error: syntax error before "GPG_ERR_EINTR"
./mkerrcodes.h:38: warning: initialization makes integer from pointer without a cast
./mkerrcodes.h:40: error: syntax error before "GPG_ERR_EIO"
./mkerrcodes.h:40: warning: initialization makes integer from pointer without a cast
./mkerrcodes.h:55: error: syntax error before "GPG_ERR_ENOENT"
./mkerrcodes.h:55: warning: initialization makes integer from pointer without a cast
./mkerrcodes.h:57: error: syntax error before "GPG_ERR_ENOLCK"
./mkerrcodes.h:57: warning: initialization makes integer from pointer without a cast
./mkerrcodes.h:58: error: syntax error before "GPG_ERR_ENOMEM"
./mkerrcodes.h:58: warning: initialization makes integer from pointer without a cast
./mkerrcodes.h:59: error: syntax error before "GPG_ERR_ENOMSG"
./mkerrcodes.h:59: warning: initialization makes integer from pointer without a cast
./mkerrcodes.h:70: error: syntax error before "GPG_ERR_ENXIO"
./mkerrcodes.h:70: warning: initialization makes integer from pointer without a cast
./mkerrcodes.h:73: error: syntax error before "GPG_ERR_EPERM"
./mkerrcodes.h:73: warning: initialization makes integer from pointer without a cast
./mkerrcodes.h:89: error: syntax error before "GPG_ERR_ESRCH"
./mkerrcodes.h:89: warning: initialization makes integer from pointer without a cast
*** Error code 1

Stop in /usr/ports/security/libgpg-error/work/libgpg-error-1.3/src.
*** Error code 1
[etc.]

The affected lines are wrongly generated by the mkerrcodes.awk script:
[...]
  { 80, "GPG_ERR_EAUTH" },
  { 9 GPG_ERR_EBADF, "GPG_ERR_" },
  { 72, "GPG_ERR_EBADRPC" },
[...]

Notice the middle line. All the errors are the similar and the error number is always only one decimal digit. Obviously it is problem with gawk's ability to separate the input line into fields in presence of UTF-8 locale.
>How-To-Repeat:
Set locale to some .UTF-8 locale, in my case it was en_GB.UTF-8.

>Fix:
Either unset LANG variable for the command or fix Gawk.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605271144.k4RBihfS022872>