Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 41947 - wine-20040213 fails to build when collating locale uses UTF-8: `authors.c' errors
Summary: wine-20040213 fails to build when collating locale uses UTF-8: `authors.c' er...
Status: RESOLVED DUPLICATE of bug 57973
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High major
Assignee: Wine Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-17 12:55 UTC by Ed Catmur
Modified: 2005-07-17 13:06 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch (wine-20040213-authors.c-LC_ALL-fix-Makefile.in.patch,590 bytes, patch)
2004-02-17 14:04 UTC, Ed Catmur
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Catmur 2004-02-17 12:55:31 UTC
...
authors.c:483: error: (near initialization for `SHELL_Authors[481]')
authors.c:483: error: syntax error before string constant
authors.c:613: error: stray '\305' in program
authors.c:613: error: stray '\366' in program
authors.c:613: error: `ngstr' undeclared here (not in a function)
authors.c:613: error: initializer element is not constant
authors.c:613: error: (near initialization for `SHELL_Authors[612]')
authors.c:613: error: syntax error before "m"
make: *** [authors.o] Error 1

Offending lines in authors.c are as these:

  "Jean-Bruno Luginb",
Comment 1 Ed Catmur 2004-02-17 12:55:31 UTC
...
authors.c:483: error: (near initialization for `SHELL_Authors[481]')
authors.c:483: error: syntax error before string constant
authors.c:613: error: stray '\305' in program
authors.c:613: error: stray '\366' in program
authors.c:613: error: `ngstr' undeclared here (not in a function)
authors.c:613: error: initializer element is not constant
authors.c:613: error: (near initialization for `SHELL_Authors[612]')
authors.c:613: error: syntax error before "m"
make: *** [authors.o] Error 1

Offending lines in authors.c are as these:

  "Jean-Bruno Luginb",ühl
  "Per ",Ångström

authors.c is autogenerated on build by this command:

(LANG=C; echo 'const char * const SHELL_Authors[] = {' && \
 sed -e '1,2d' -e 's/\(.*\)/  \"\1\",/' ../../AUTHORS && \
 echo '  0 };') >authors.c || (rm -f authors.c && false)

As ../../AUTHORS uses an ISO-8859 encoding, the accented characters fall outside the UTF-8 collating locale's set of printing characters and thus are not matched by `.' in the sed command.

Prepending "LC_ALL=C" to the above sed command in the Makefile fixes this issue.

This may have been a bug for some time; I postponed switching to UTF-8 until en_GB.utf8 reached the Gentoo glibc.
Comment 2 Ed Catmur 2004-02-17 14:04:48 UTC
Created attachment 25799 [details, diff]
Patch

Feh, I meant character type locale.

Anyways, this fixes it.
Comment 3 Ed Catmur 2004-02-17 14:26:32 UTC
Upstreamed as http://bugs.winehq.org/show_bug.cgi?id=2029
Comment 4 Siuchung Cheung (Clement) 2004-02-20 10:54:05 UTC
I think gentoo developers may want to consider doing a global export LANG=C in portage. I'm using LC_CTYPE=zh_TW.big5 and I've just experience the same problem here and also a similar problem in the Java bindings of pilot-link-0.11.8. That'd make our lives a whole lot easier when more and more programs start using funky characters.
Comment 5 Heinrich Wendel (RETIRED) gentoo-dev 2004-09-21 06:37:17 UTC

*** This bug has been marked as a duplicate of 57973 ***