Bug 210122 - building lang/gcc port on 11-current with non-C locale fails
Summary: building lang/gcc port on 11-current with non-C locale fails
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Gerald Pfeifer
URL: https://lists.freebsd.org/pipermail/f...
Keywords:
Depends on:
Blocks: 211742
  Show dependency treegraph
 
Reported: 2016-06-08 05:07 UTC by graham
Modified: 2017-01-15 21:20 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description graham 2016-06-08 05:07:42 UTC
> c++ -c   -O2 -pipe -DLIBICONV_PLUG -fno-strict-aliasing  -DLIBICONV_PLUG -DIN_GCC   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wm
> issing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I/usr/ports/lang/gcc/work/gcc-4.8.5/gcc -I/usr/ports
> /lang/gcc/work/gcc-4.8.5/gcc/build -I/usr/ports/lang/gcc/work/gcc-4.8.5/gcc/../include  -I/usr/ports/lang/gcc/work/gcc-4.8.5/gcc/../libcpp/include -DLIBICONV_PLUG \
>         -o build/gencheck.o /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/gencheck.c
> c++: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
> /bin/sh /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/../move-if-change tmp-gtype.state gtype.state
> build/gengtype  \
>                     -r gtype.state
> In file included from /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/gencheck.c:23:
> In file included from ./tm.h:16:
> ./options.h:4293:3: error: redefinition of enumerator 'OPT_C'
>   OPT_C = 129,                               /* -C */
>   ^
> ./options.h:4290:3: note: previous definition is here
>   OPT_C = 126,                               /* -C */
>   ^
> ./options.h:4301:3: error: redefinition of enumerator 'OPT_d'
>   OPT_d = 137,                               /* -d */
>   ^
> ./options.h:4299:3: note: previous definition is here
>   OPT_d = 135,                               /* -d */
>   ^

[snip several more like it]

> ./options.h:5183:3: error: redefinition of enumerator 'OPT_v'
>   OPT_v = 1019,                              /* -v */
>   ^
> ./options.h:5181:3: note: previous definition is here
>   OPT_v = 1017,                              /* -v */
>   ^
> fatal error: too many errors emitted, stopping now [-ferror-limit=]
> 20 errors generated.
> Makefile:3840: recipe for target 'build/gencheck.o' failed
> gmake[4]: *** [build/gencheck.o] Error 1
> gmake[4]: *** Waiting for unfinished jobs....
> echo timestamp > s-gtype
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/passes.texi:7: warning: node next `Passes' in menu `GENERIC' and in sectioning `RTL' differ
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/rtl.texi:5: warning: node next `RTL' in menu `Control Flow' and in sectioning `GENERIC' differ
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/rtl.texi:5: warning: node prev `RTL' in menu `Tree SSA' and in sectioning `Passes' differ
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/generic.texi:9: warning: node prev `GENERIC' in menu `Passes' and in sectioning `RTL' differ
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/tree-ssa.texi:9: warning: node next `Tree SSA' in menu `RTL' and in sectioning `Loop Analysis and Representation' differ
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/loop.texi:10: warning: node next `Loop Analysis and Representation' in menu `Machine Desc' and in sectioning `Control Flow' differ
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/loop.texi:10: warning: node prev `Loop Analysis and Representation' in menu `Control Flow' and in sectioning `Tree SSA' differ
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/cfg.texi:10: warning: node next `Control Flow' in menu `Loop Analysis and Representation' and in sectioning `Machine Desc' differ
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/cfg.texi:10: warning: node prev `Control Flow' in menu `RTL' and in sectioning `Loop Analysis and Representation' differ
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/md.texi:6: warning: node prev `Machine Desc' in menu `Loop Analysis and Representation' and in sectioning `Control Flow' differ
> rm cpp.pod gfortran.pod gcc.pod
> gmake[4]: Leaving directory '/usr/ports/lang/gcc/work/.build/gcc'
> Makefile:3908: recipe for target 'all-gcc' failed
> gmake[3]: *** [all-gcc] Error 2
> gmake[3]: Leaving directory '/usr/ports/lang/gcc/work/.build'
> Makefile:856: recipe for target 'all' failed
> gmake[2]: *** [all] Error 2
> gmake[2]: Leaving directory '/usr/ports/lang/gcc/work/.build'
> ===> Compilation failed unexpectedly.
> Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
> the maintainer.
> *** Error code 1
> Stop.
> make[1]: stopped in /usr/ports/lang/gcc
> *** Error code 1
> Stop.
> make: stopped in /usr/ports/lang/gcc


Workaround is to use:
  LC_COLLATE="C" make
Comment 1 Randy Westlund 2016-06-08 05:27:07 UTC
This output is from -current at r301482, with the en_US.UTF-8 locale.  It builds with this locale on 10.3 just fine.
Comment 2 Oleh Hushchenkov 2016-06-10 04:32:41 UTC
I am affected too.
Comment 3 ultrageranium 2016-08-04 11:17:14 UTC
Same here (11-STABLE, r303474, amd64)
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2016-08-13 12:52:42 UTC
Though this issue was reported earlier, the fix was committed as part of bug 211742. Closing duplicate of that issue. Please follow-up there if necessary

*** This bug has been marked as a duplicate of bug 211742 ***
Comment 5 Gerald Pfeifer freebsd_committer freebsd_triage 2016-08-13 17:42:24 UTC
Not really a duplicate (same issue, but different port) - reopening,
until I have patched lang/gcc.
Comment 6 commit-hook freebsd_committer freebsd_triage 2016-08-13 20:44:35 UTC
A commit references this bug:

Author: gerald
Date: Sat Aug 13 20:44:21 UTC 2016
New revision: 420165
URL: https://svnweb.freebsd.org/changeset/ports/420165

Log:
  Update to the 20160811 snapshot of GCC 6.

  GCC uses an AWK script to generate source code that helps process
  command-line options.  According to POSIX, string comparisons (and
  hence sorting) are to be performed based on the locale's collating
  order.  Alas GNU AWK only does so in POSIX mode, whereas starting
  with FreeBSD 11 we do so by default, running into a bug (or false
  assumption) with that script used by GCC.

  Setting MAKE_ARGS such that AWK is always invoked in the C locale
  works around this bug. [1]

  PR:		210122 [1], 211742 [1]
  Submitted by:	jkim [1]

Changes:
  head/lang/gcc6-devel/Makefile
  head/lang/gcc6-devel/distinfo
Comment 7 commit-hook freebsd_committer freebsd_triage 2016-08-14 07:28:19 UTC
A commit references this bug:

Author: gerald
Date: Sun Aug 14 07:28:14 UTC 2016
New revision: 420178
URL: https://svnweb.freebsd.org/changeset/ports/420178

Log:
  GCC uses an AWK script to generate source code that helps process
  command-line options.  According to POSIX, string comparisons (and
  hence sorting) are to be performed based on the locale's collating
  order.  Alas GNU AWK only does so in POSIX mode, whereas starting
  with FreeBSD 11 we do so by default, running into a bug (or false
  assumption) with that script used by GCC.

  Setting MAKE_ARGS such that AWK is always invoked in the C locale
  works around this bug.

  PR:		210122, 211742
  Submitted by:	jkim

Changes:
  head/lang/gcc/Makefile
  head/lang/gcc/distinfo
Comment 8 Gerald Pfeifer freebsd_committer freebsd_triage 2016-08-14 09:25:36 UTC
Sorry this took two months to get resolved (partly because I have
not been able to work on FreeBSD for more or less a month, but still).

This should be fixed now.

Please let me know if this works for you now.
Comment 9 commit-hook freebsd_committer freebsd_triage 2016-08-16 07:21:11 UTC
A commit references this bug:

Author: gerald
Date: Tue Aug 16 07:21:05 UTC 2016
New revision: 420267
URL: https://svnweb.freebsd.org/changeset/ports/420267

Log:
  GCC uses an AWK script to generate source code that helps process
  command-line options.  According to POSIX, string comparisons (and
  hence sorting) are to be performed based on the locale's collating
  order.  Alas GNU AWK only does so in POSIX mode, whereas starting
  with FreeBSD 11 we do so by default, running into a bug (or false
  assumption) with that script used by GCC.

  Setting MAKE_ARGS such that AWK is always invoked in the C locale
  works around this bug.

  PR:		210122, 211742
  Submitted by:	jkim

Changes:
  head/lang/gcc48/Makefile
  head/lang/gcc48/distinfo
Comment 10 commit-hook freebsd_committer freebsd_triage 2016-08-17 09:03:24 UTC
A commit references this bug:

Author: gerald
Date: Wed Aug 17 09:02:54 UTC 2016
New revision: 420325
URL: https://svnweb.freebsd.org/changeset/ports/420325

Log:
  Update to the 20160816 snapshot of GCC 5.4.1.

  GCC uses an AWK script to generate source code that helps process
  command-line options.  According to POSIX, string comparisons (and
  hence sorting) are to be performed based on the locale's collating
  order.  Alas GNU AWK only does so in POSIX mode, whereas starting
  with FreeBSD 11 we do so by default, running into a bug (or false
  assumption) with that script used by GCC.

  Setting MAKE_ARGS such that AWK is always invoked in the C locale
  works around this bug. [1]

  PR:		210122 [1], 211742 [1]
  Submitted by:	jkim [1]

Changes:
  head/lang/gcc5-devel/Makefile
  head/lang/gcc5-devel/distinfo
Comment 11 commit-hook freebsd_committer freebsd_triage 2016-08-17 16:23:17 UTC
A commit references this bug:

Author: gerald
Date: Wed Aug 17 16:22:50 UTC 2016
New revision: 420359
URL: https://svnweb.freebsd.org/changeset/ports/420359

Log:
  Backport the following from lang/gcc5-devel:

  GCC uses an AWK script to generate source code that helps process
  command-line options.  According to POSIX, string comparisons (and
  hence sorting) are to be performed based on the locale's collating
  order.  Alas GNU AWK only does so in POSIX mode, whereas starting
  with FreeBSD 11 we do so by default, running into a bug (or false
  assumption) with that script used by GCC.

  Setting MAKE_ARGS such that AWK is always invoked in the C locale
  works around this bug.

  PR:		210122, 211742
  Submitted by:	jkim

Changes:
  head/lang/gcc5/Makefile
Comment 12 commit-hook freebsd_committer freebsd_triage 2016-08-22 13:21:19 UTC
A commit references this bug:

Author: gerald
Date: Mon Aug 22 13:20:47 UTC 2016
New revision: 420613
URL: https://svnweb.freebsd.org/changeset/ports/420613

Log:
  Update to the GCC 6.2 release with a fair number of fixes.

  files/patch-armv6-hf-support has been accepted upstream, even
  on the GCC 6-branch this release comes from, so remove it.

  Backport the following from lang/gcc6-devel:

  GCC uses an AWK script to generate source code that helps process
  command-line options.  According to POSIX, string comparisons (and
  hence sorting) are to be performed based on the locale's collating
  order.  Alas GNU AWK only does so in POSIX mode, whereas starting
  with FreeBSD 11 we do so by default, running into a bug (or false
  assumption) with that script used by GCC.

  Setting MAKE_ARGS such that AWK is always invoked in the C locale
  works around this bug. [1]

  PR:		210122 [1], 211742 [1]
  Submitted by:	jkim [1]

Changes:
  head/lang/gcc6/Makefile
  head/lang/gcc6/distinfo
  head/lang/gcc6/files/patch-armv6-hf-support