Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jun 2012 11:40:52 GMT
From:      Pawel Pekala <pawel@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/169369: multimedia/libvpx fails to build on systems with non UTF-8 locale
Message-ID:  <201206241140.q5OBeqww087387@red.freebsd.org>
Resent-Message-ID: <201206241150.q5OBo5rh059711@freefall.freebsd.org>

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

>Number:         169369
>Category:       ports
>Synopsis:       multimedia/libvpx fails to build on systems with non UTF-8 locale
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 24 11:50:05 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Pawel Pekala
>Release:        10.0-CURRENT
>Organization:
>Environment:
FreeBSD blaviken.slowicza.org 10.0-CURRENT FreeBSD 10.0-CURRENT #7: Sat Jun 23 10:34:22 CEST 2012     corn@blaviken.slowicza.org:/usr/obj/usr/src/sys/BLAVIKEN  i386

>Description:
Build fails due to tr(1) hackery in ${WRKSRC}/build/make/rtcd.sh file.
This is probably caused by feeding UTF-8 encoded strings to tr(1) while systems locale is not UTF-8 and outcome in ${WRKSRC}/vpx_rtcd.h is garbled to the compiler.

Error log:

cc  -O2 -pipe -fno-strict-aliasing -m32 -fomit-frame-pointer -O3 -fPIC -D_FORTIFY_SOURCE=0 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wdeclaration-after-statement -Wdisabled-optimization -Wpointer-arith -Wcast-qual -Wimplicit-function-declaration -Wuninitialized -Wunused-variable -Wno-unused-function -I. -I"/usr/ports/multimedia/libvpx/work/libvpx-v1.1.0" -c -o vp8/common/rtcd.c.o vp8/common/rtcd.c
In file included from vp8/common/rtcd.c:12:
./vpx_rtcd.h:1:14: warning: extra tokens at end of #ifndef directive
./vpx_rtcd.h:2:14: warning: missing whitespace after the macro name
cc  -O2 -pipe -fno-strict-aliasing -m32 -fomit-frame-pointer -O3 -fPIC -D_FORTIFY_SOURCE=0 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wdeclaration-after-statement -Wdisabled-optimization -Wpointer-arith -Wcast-qual -Wimplicit-function-declaration -Wuninitialized -Wunused-variable -Wno-unused-function -I. -I"/usr/ports/multimedia/libvpx/work/libvpx-v1.1.0" -c -o vp8/common/loopfilter.c.o vp8/common/loopfilter.c
In file included from vp8/common/rtcd.c:12:
./vpx_rtcd.h: In function 'vpx_rtcd':
./vpx_rtcd.h:559: error: 'HAS_MMY' undeclared (first use in this function)
./vpx_rtcd.h:559: error: (Each undeclared identifier is reported only once
./vpx_rtcd.h:559: error: for each function it appears in.)
gmake[1]: *** [vp8/common/rtcd.c.o] B&#322;&#261;d 1
gmake[1]: *** Oczekiwanie na niezako&#324;czone zadania....
In file included from vp8/common/loopfilter.c:13:
./vpx_rtcd.h:1:14: warning: extra tokens at end of #ifndef directive
./vpx_rtcd.h:2:14: warning: missing whitespace after the macro name
gmake: *** [.DEFAULT] B&#322;&#261;d 2
*** [do-build] Error code 1

Stop in /usr/ports/multimedia/libvpx.
[corn:ports/multimedia/libvpx]# echo $LANG
pl_PL.ISO8859-2

Port builds fine with LANG=pl_PL.UTF-8
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -urN /usr/ports/multimedia/libvpx/files/patch-build_make_rtcd.sh ./files/patch-build_make_rtcd.sh
--- /usr/ports/multimedia/libvpx/files/patch-build_make_rtcd.sh	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-build_make_rtcd.sh	2012-06-24 13:13:47.000000000 +0200
@@ -0,0 +1,9 @@
+--- build/make/rtcd.sh.orig	2012-06-24 13:12:00.000000000 +0200
++++ build/make/rtcd.sh	2012-06-24 13:13:01.000000000 +0200
+@@ -1,5 +1,6 @@
+ #!/bin/sh
+ self=$0
++LANG=C
+ 
+ usage() {
+   cat <<EOF >&2


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



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