From nobody@FreeBSD.org  Thu Nov 24 13:17:57 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9A1F11065674
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 24 Nov 2011 13:17:57 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 8A6E18FC1A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 24 Nov 2011 13:17:57 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id pAODHvBr011325
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 24 Nov 2011 13:17:57 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id pAODHvsn011324;
	Thu, 24 Nov 2011 13:17:57 GMT
	(envelope-from nobody)
Message-Id: <201111241317.pAODHvsn011324@red.freebsd.org>
Date: Thu, 24 Nov 2011 13:17:57 GMT
From: Pavel Timofeev <timp87@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: clang doesn't compile games/jaggedalliance2
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         162813
>Category:       ports
>Synopsis:       clang doesn't compile games/jaggedalliance2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 24 13:20:08 UTC 2011
>Closed-Date:    Wed May 16 06:27:50 UTC 2012
>Last-Modified:  Wed May 16 06:27:50 UTC 2012
>Originator:     Pavel Timofeev
>Release:        FreeBSD 9.0-RC2 amd64
>Organization:
>Environment:
FreeBSD timp 9.0-RC2 FreeBSD 9.0-RC2 #0: Sun Nov 20 11:44:04 MSK 2011     mox@timp:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
[root@timp /usr/ports/games/jaggedalliance2]# make install clean
.....
===> CXX Build/Utils/_RussianText.cc
Build/Utils/_RussianText.cc:160:2: error: initializer-string for char array is too long
        L"&#1055;&#1080;&#1089;&#1090;&#1086;&#1083;&#1077;&#1090;-&#1087;&#1091;&#1083;&#1077;&#1084;&#1077;&#1090;",
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Build/Utils/_RussianText.cc:933:2: error: initializer-string for char array is too long
        L"&#1044;&#1077;&#1085;&#1077;&#1075; &#1074;",
        ^~~~~~~~~~~~~~~~
Build/Utils/_RussianText.cc:935:2: error: initializer-string for char array is too long
        L"&#1054;&#1090;&#1076;&#1077;&#1083;&#1080;&#1090;&#1100;",
        ^~~~~~~~~~~~~~~~~~~
Build/Utils/_RussianText.cc:938:2: error: initializer-string for char array is too long
        L"&#1058;&#1077;&#1082;&#1091;&#1097;&#1080;&#1081;",
        ^~~~~~~~~~~~~~~~~
Build/Utils/_RussianText.cc:940:2: error: initializer-string for char array is too long
        L"&#1042;&#1079;&#1103;&#1090;&#1100; &#1089;&#1086;",
        ^~~~~~~~~~~~~~~~~~
Build/Utils/_RussianText.cc:949:2: error: initializer-string for char array is too long
        L"&#1059;&#1052;&#1048;&#1056;&#1040;&#1045;&#1058;",  // >=  0
        ^~~~~~~~~~~~~~~~~
Build/Utils/_RussianText.cc:950:2: error: initializer-string for char array is too long
        L"&#1050;&#1056;&#1048;&#1058;&#1048;&#1063;&#1053;&#1054;", // >= 15
        ^~~~~~~~~~~~~~~~~~~
Build/Utils/_RussianText.cc:955:2: error: initializer-string for char array is too long
        L"&#1054;&#1058;&#1051;&#1048;&#1063;&#1053;&#1054;",  // >= 90
        ^~~~~~~~~~~~~~~~~
8 errors generated.
gmake: *** [Build/Utils/_RussianText.o] Error 1
gmake: *** Waiting for unfinished jobs....
*** Error code 1

Stop in /usr/ports/games/jaggedalliance2.
*** Error code 1




[root@timp /usr/ports/games/jaggedalliance2]# make showconfig
===> The following configuration options are available for ja2-0.12.1:
     DUTCH=off "Compile for Dutch version (choose ONE)"
     ENGLISH=off "Compile for English version (choose ONE)"
     FRENCH=off "Compile for French version (choose ONE)"
     GERMAN=off "Compile for German version (choose ONE)"
     ITALIAN=off "Compile for Italian version (choose ONE)"
     POLISH=off "Compile for Polish version (choose ONE)"
     RUSSIAN=off "Compile for Russian version (choose ONE)"
     RUSSIAN_GOLD=on "Compile for Russian Gold version (choose ONE)"
===> Use 'make config' to modify these settings
>How-To-Repeat:
Try to compile games/jaggedalliance2 with RUSSIAN_GOLD=on using clang.
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Nov 24 13:20:18 UTC 2011 
Responsible-Changed-Why:  
miwi@ wants his PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162813 

From: Jan Beich <jbeich@tormail.net>
To: Pavel Timofeev <timp87@gmail.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/162813: clang doesn't compile games/jaggedalliance2
Date: Thu, 24 Nov 2011 13:26:15 -0200

 --=-=-=
 Content-Type: text/plain; charset=utf-8
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Pavel Timofeev <timp87@gmail.com> writes:
 
 > =3D=3D=3D> CXX Build/Utils/_RussianText.cc
 > Build/Utils/_RussianText.cc:160:2: error: initializer-string for char arr=
 ay is too long
 >         L"=D0=9F=D0=B8=D1=81=D1=82=D0=BE=D0=BB=D0=B5=D1=82-=D0=BF=D1=83=
 =D0=BB=D0=B5=D0=BC=D0=B5=D1=82",
 
 16 (length) * 2b (in utf-8) =3D 32b, but the char array bound is 30
 
 >         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 > Build/Utils/_RussianText.cc:933:2: error: initializer-string for char arr=
 ay is too long
 >         L"=D0=94=D0=B5=D0=BD=D0=B5=D0=B3 =D0=B2",
 >         ^~~~~~~~~~~~~~~~
 [...]
 
 Can you test the following patch? Try English version, too.
 
 
 --=-=-=
 Content-Type: text/x-patch
 Content-Disposition: attachment; filename=non-fixed_length.diff
 
 Index: games/jaggedalliance2/Makefile
 ===================================================================
 RCS file: /a/.csup/ports/games/jaggedalliance2/Makefile,v
 retrieving revision 1.16
 diff -u -p -r1.16 Makefile
 --- games/jaggedalliance2/Makefile	6 Jun 2010 01:09:30 -0000	1.16
 +++ games/jaggedalliance2/Makefile	24 Nov 2011 15:08:20 -0000
 @@ -66,6 +66,11 @@ MAKE_ARGS+=	SGPDATADIR=${DATADIR}
  
  MAN6=	ja2.6
  
 +post-patch:	.SILENT
 +	${REINPLACE_CMD} 's|const wchar_t[[:blank:]]*\(.*\)\[\(.*\)]\[.*]|const wchar_t *\1[\2]|' \
 +		${WRKSRC}/Build/Utils/_*Text.cc \
 +		${WRKSRC}/Build/Utils/Text.h
 +
  post-install:
  	@${MKDIR} ${DATADIR}/Data/TILECACHE
  	@${CAT} ${PKGMESSAGE}
 
 --=-=-=--

From: Pavel Timofeev <timp87@gmail.com>
To: Jan Beich <jbeich@tormail.net>
Cc: bug-followup@freebsd.org
Subject: Re: ports/162813: clang doesn't compile games/jaggedalliance2
Date: Fri, 25 Nov 2011 12:28:17 +0400

 Thanks!
 This patch helps with compile english and russian* versions, but look
 at screenshots (this is russian_gold)
 http://img-fotki.yandex.ru/get/4418/16519813.0/0_7c2f5_ee8d561f_orig
 http://img-fotki.yandex.ru/get/4419/16519813.0/0_7c2f6_20343c65_orig
 http://img-fotki.yandex.ru/get/4524/16519813.0/0_7c2f8_8d80b34b_orig
 
 ???? instead of russian.
 Anyway, let's start a new game or load saved game - oops:
 Segmentation fault (core dumped)
 
 
 24 =D0=BD=D0=BE=D1=8F=D0=B1=D1=80=D1=8F 2011=C2=A0=D0=B3. 19:26 =D0=BF=D0=
 =BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Jan Beich <=
 jbeich@tormail.net> =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:
 > Pavel Timofeev <timp87@gmail.com> writes:
 >
 >> =3D=3D=3D> CXX Build/Utils/_RussianText.cc
 >> Build/Utils/_RussianText.cc:160:2: error: initializer-string for char ar=
 ray is too long
 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 L"=D0=9F=D0=B8=D1=81=D1=82=D0=BE=D0=BB=D0=B5=
 =D1=82-=D0=BF=D1=83=D0=BB=D0=B5=D0=BC=D0=B5=D1=82",
 >
 > 16 (length) * 2b (in utf-8) =3D 32b, but the char array bound is 30
 >
 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 >> Build/Utils/_RussianText.cc:933:2: error: initializer-string for char ar=
 ray is too long
 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 L"=D0=94=D0=B5=D0=BD=D0=B5=D0=B3 =D0=B2",
 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^~~~~~~~~~~~~~~~
 > [...]
 >
 > Can you test the following patch? Try English version, too.
 >
 >

From: Jan Beich <jbeich@tormail.net>
To: Pavel Timofeev <timp87@gmail.com>
Cc: bug-followup@freebsd.org
Subject: Re: ports/162813: clang doesn't compile games/jaggedalliance2
Date: Fri, 25 Nov 2011 16:21:06 -0300

 --=-=-=
 Content-Type: text/plain; charset=utf-8
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Pavel Timofeev <timp87@gmail.com> writes:
 
 > Thanks!
 > This patch helps with compile english and russian* versions, but look
 > at screenshots (this is russian_gold)
 > http://img-fotki.yandex.ru/get/4418/16519813.0/0_7c2f5_ee8d561f_orig
 > http://img-fotki.yandex.ru/get/4419/16519813.0/0_7c2f6_20343c65_orig
 > http://img-fotki.yandex.ru/get/4524/16519813.0/0_7c2f8_8d80b34b_orig
 >
 > ???? instead of russian.
 
 Likely a clang issue, e.g.
 
   setlocale(LC_CTYPE, "en_US.UTF-8");
   wprintf(L"%ls\n", L"=D0=9E=D1=82=D0=B4=D0=B5=D0=BB=D0=B8=D1=82=D1=8C");
 
 clang - '=C3=90=C2=9E=C3=91=C2=82=C3=90=C2=B4=C3=90=C2=B5=C3=90=C2=BB=C3=90=
 =C2=B8=C3=91=C2=82=C3=91=C2=8C'
 gcc - '=D0=9E=D1=82=D0=B4=D0=B5=D0=BB=D0=B8=D1=82=D1=8C'
 
 Not sure, on my box gcc even without patch has similar issue
 
   http://www.screenshots.cc/photos/original/51926-eqd3s.jpg
   http://www.screenshots.cc/photos/original/51927-8y7tn.jpg
   http://www.screenshots.cc/photos/original/51928-x5t5z.jpg
 
 > Anyway, let's start a new game or load saved game - oops:
 > Segmentation fault (core dumped)
 
 Can you get a backtrace? Try below patch and install WITH_DEBUG=3D.
 
 It doesn't crash here with russian_gold/english, new game/saved game,
 clang/gcc, with/without patch. Do you define any CFLAGS or CPUTYPE in
 make.conf? Try with empty file.
 
 
 --=-=-=
 Content-Type: text/x-patch
 Content-Disposition: attachment; filename=strip.diff
 
 Index: games/jaggedalliance2/Makefile
 ===================================================================
 RCS file: /a/.csup/ports/games/jaggedalliance2/Makefile,v
 retrieving revision 1.16
 diff -u -p -r1.16 Makefile
 --- games/jaggedalliance2/Makefile	6 Jun 2010 01:09:30 -0000	1.16
 +++ games/jaggedalliance2/Makefile	25 Nov 2011 17:54:00 -0000
 @@ -64,3 +64,5 @@ MAKE_ARGS+=	NO_DEPS=yes # For a single f
  MAKE_ARGS+=	SGPDATADIR=${DATADIR}
  
 +MAKE_ARGS+=	${MAKE_ENV:M*INSTALL*:S/BSD_//}
 +
  MAN6=	ja2.6
 
 --=-=-=--

From: Pavel Timofeev <timp87@gmail.com>
To: Jan Beich <jbeich@tormail.net>
Cc: bug-followup@freebsd.org
Subject: Re: ports/162813: clang doesn't compile games/jaggedalliance2
Date: Mon, 28 Nov 2011 17:33:33 +0400

 Sorry, seems like crashes is my local software problem.
 It works without crashes on different software installation:
 http://img-fotki.yandex.ru/get/4422/16519813.0/0_7c672_53131ffa_orig
 It's my saved game. Here and there russian lang looks good, but not everywh=
 ere
 
 
 25 =D0=BD=D0=BE=D1=8F=D0=B1=D1=80=D1=8F 2011=C2=A0=D0=B3. 23:21 =D0=BF=D0=
 =BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Jan Beich <=
 jbeich@tormail.net> =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:
 > Pavel Timofeev <timp87@gmail.com> writes:
 >
 >> Thanks!
 >> This patch helps with compile english and russian* versions, but look
 >> at screenshots (this is russian_gold)
 >> http://img-fotki.yandex.ru/get/4418/16519813.0/0_7c2f5_ee8d561f_orig
 >> http://img-fotki.yandex.ru/get/4419/16519813.0/0_7c2f6_20343c65_orig
 >> http://img-fotki.yandex.ru/get/4524/16519813.0/0_7c2f8_8d80b34b_orig
 >>
 >> ???? instead of russian.
 >
 > Likely a clang issue, e.g.
 >
 > =C2=A0setlocale(LC_CTYPE, "en_US.UTF-8");
 > =C2=A0wprintf(L"%ls\n", L"=D0=9E=D1=82=D0=B4=D0=B5=D0=BB=D0=B8=D1=82=D1=
 =8C");
 >
 > clang - '=C3=90=C5=BE=C3=91=E2=80=9A=C3=90=C2=B4=C3=90=C2=B5=C3=90=C2=BB=
 =C3=90=C2=B8=C3=91=E2=80=9A=C3=91=C5=92'
 > gcc - '=D0=9E=D1=82=D0=B4=D0=B5=D0=BB=D0=B8=D1=82=D1=8C'
 >
 > Not sure, on my box gcc even without patch has similar issue
 >
 > =C2=A0http://www.screenshots.cc/photos/original/51926-eqd3s.jpg
 > =C2=A0http://www.screenshots.cc/photos/original/51927-8y7tn.jpg
 > =C2=A0http://www.screenshots.cc/photos/original/51928-x5t5z.jpg
 >
 >> Anyway, let's start a new game or load saved game - oops:
 >> Segmentation fault (core dumped)
 >
 > Can you get a backtrace? Try below patch and install WITH_DEBUG=3D.
 >
 > It doesn't crash here with russian_gold/english, new game/saved game,
 > clang/gcc, with/without patch. Do you define any CFLAGS or CPUTYPE in
 > make.conf? Try with empty file.
 >
 >
State-Changed-From-To: open->feedback 
State-Changed-By: miwi 
State-Changed-When: Sat Jan 28 18:58:28 UTC 2012 
State-Changed-Why:  
jan what patch u want me to use here? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162813 

From: Jan Beich <jbeich@tormail.net>
To: miwi@freebsd.org
Cc: Pavel Timofeev <timp87@gmail.com>, bug-followup@freebsd.org
Subject: Re: ports/162813: clang doesn't compile games/jaggedalliance2
Date: Sat, 28 Jan 2012 19:46:26 -0300

 (CC me, I'm not in X-GNATS-Notify)
 
 > jan what patch u want me to use here?
 
 non-fixed_length.diff. On clang trunk even without changes the port
 builds fine and during game localized strings are displayed in place of
 question marks.
 
 Pavel, can you confirm there is no regression with gcc?

From: Pavel Timofeev <timp87@gmail.com>
To: Jan Beich <jbeich@tormail.net>
Cc: miwi@freebsd.org, bug-followup@freebsd.org
Subject: Re: ports/162813: clang doesn't compile games/jaggedalliance2
Date: Mon, 30 Jan 2012 11:20:15 +0400

 Yes, I confirm.
 
 29 =D1=8F=D0=BD=D0=B2=D0=B0=D1=80=D1=8F 2012=C2=A0=D0=B3. 2:46 =D0=BF=D0=BE=
 =D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Jan Beich <jbe=
 ich@tormail.net> =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:
 > (CC me, I'm not in X-GNATS-Notify)
 >
 >> jan what patch u want me to use here?
 >
 > non-fixed_length.diff. On clang trunk even without changes the port
 > builds fine and during game localized strings are displayed in place of
 > question marks.
 >
 > Pavel, can you confirm there is no regression with gcc?
State-Changed-From-To: feedback->closed 
State-Changed-By: miwi 
State-Changed-When: Wed May 16 06:27:49 UTC 2012 
State-Changed-Why:  
close here. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162813 
>Unformatted:
