Bug 226636 - devel/arm-none-eabi-gcc / devel/aarch64-none-elf-gcc: Fails to build unless LANG=C and LC_ALL=C
Summary: devel/arm-none-eabi-gcc / devel/aarch64-none-elf-gcc: Fails to build unless L...
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2018-03-15 17:47 UTC by tech-lists
Modified: 2020-09-22 13:45 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback+
koobs: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tech-lists 2018-03-15 17:47:55 UTC
context:
Working Copy Root Path: /usr/ports
URL: https://svn.freebsd.org/ports/head
Relative URL: ^/head
Repository Root: https://svn.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 464450

$ uname -KU
1101509 1101509

/etc/make.conf contains USE_LOCALE=en_GB.UTF-8

devel/arm-none-eabi-gcc fails to build:

gmake[2]: Entering directory
'/usr/ports/devel/arm-none-eabi-gcc/work/.build/gcc'
c++ -c   -fbracket-depth=512 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE
-fno-strict-aliasing -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-DHAVE_CONFIG_H -DGENERATOR_FILE -fno-PIE -I. -Ibuild
-I/usr/ports/devel/arm-none-eabi-gcc/work/gcc-6.3.0/gcc
-I/usr/ports/devel/arm-none-eabi-gcc/work/gcc-6.3.0/gcc/build
-I/usr/ports/devel/arm-none-eabi-gcc/work/gcc-6.3.0/gcc/../include
-I/usr/ports/devel/arm-none-eabi-gcc/work/gcc-6.3.0/gcc/../libcpp/include
-DLIBICONV_PLUG \
	-o build/genpreds.o
/usr/ports/devel/arm-none-eabi-gcc/work/gcc-6.3.0/gcc/genpreds.c
c++: warning: treating 'c' input as 'c++' when in C++ mode, this
behavior is deprecated [-Wdeprecated]
In file included from
/usr/ports/devel/arm-none-eabi-gcc/work/gcc-6.3.0/gcc/genpreds.c:25:
/usr/ports/devel/arm-none-eabi-gcc/work/gcc-6.3.0/gcc/coretypes.h:62:1:
warning: class 'rtx_def' was previously declared as a struct
[-Wmismatched-tags]
class rtx_def;
^
/usr/ports/devel/arm-none-eabi-gcc/work/gcc-6.3.0/gcc/coretypes.h:55:8:
note: previous use is here
struct rtx_def;
       ^
In file included from
/usr/ports/devel/arm-none-eabi-gcc/work/gcc-6.3.0/gcc/genpreds.c:26:
In file included from ./tm.h:17:
./options.h:5327:3: error: redefinition of enumerator 'OPT_C'
  OPT_C = 127,                               /* -C */
  ^
./options.h:5324:3: note: previous definition is here
  OPT_C = 124,                               /* -C */
  ^
./options.h:5335:3: error: redefinition of enumerator 'OPT_d'
  OPT_d = 135,                               /* -d */
  ^
./options.h:5333:3: note: previous definition is here
  OPT_d = 133,                               /* -d */
  ^
./options.h:5336:3: error: redefinition of enumerator 'OPT_D'
  OPT_D = 136,                               /* -D */
  ^
./options.h:5334:3: note: previous definition is here
  OPT_D = 134,                               /* -D */
  ^
./options.h:5337:3: error: redefinition of enumerator 'OPT_d'
  OPT_d = 137,                               /* -d */
  ^
./options.h:5333:3: note: previous definition is here
  OPT_d = 133,                               /* -d */
  ^
./options.h:5338:3: error: redefinition of enumerator 'OPT_D'
  OPT_D = 138,                               /* -D */
  ^
./options.h:5334:3: note: previous definition is here
  OPT_D = 134,                               /* -D */
  ^
./options.h:5339:3: error: redefinition of enumerator 'OPT_d'
  OPT_d = 139,                               /* -d */
  ^
./options.h:5333:3: note: previous definition is here
  OPT_d = 133,                               /* -d */
  ^
./options.h:5347:3: error: redefinition of enumerator 'OPT_E'
  OPT_E = 147,                               /* -E */
  ^
./options.h:5345:3: note: previous definition is here
  OPT_E = 145,                               /* -E */
  ^
./options.h:6029:3: error: redefinition of enumerator 'OPT_H'
  OPT_H = 829,                               /* -H */
  ^
./options.h:6027:3: note: previous definition is here
  OPT_H = 827,                               /* -H */
  ^
./options.h:6032:3: error: redefinition of enumerator 'OPT_I'
  OPT_I = 832,                               /* -I */
  ^
./options.h:6030:3: note: previous definition is here
  OPT_I = 830,                               /* -I */
  ^
./options.h:6068:3: error: redefinition of enumerator 'OPT_MF'
  OPT_MF = 868,                              /* -MF */
  ^
./options.h:6066:3: note: previous definition is here
  OPT_MF = 866,                              /* -MF */
  ^
./options.h:6071:3: error: redefinition of enumerator 'OPT_M'
  OPT_M = 871,                               /* -M */
  ^
./options.h:6060:3: note: previous definition is here
  OPT_M = 860,                               /* -M */
  ^
./options.h:6076:3: error: redefinition of enumerator 'OPT_M'
  OPT_M = 876,                               /* -M */
  ^
./options.h:6060:3: note: previous definition is here
  OPT_M = 860,                               /* -M */
  ^
./options.h:6082:3: error: redefinition of enumerator 'OPT_MM'
  OPT_MM = 882,                              /* -MM */
  ^
./options.h:6079:3: note: previous definition is here
  OPT_MM = 879,                              /* -MM */
  ^
./options.h:6089:3: error: redefinition of enumerator 'OPT_MP'
  OPT_MP = 889,                              /* -MP */
  ^
./options.h:6086:3: note: previous definition is here
  OPT_MP = 886,                              /* -MP */
  ^
./options.h:6102:3: error: redefinition of enumerator 'OPT_MT'
  OPT_MT = 902,                              /* -MT */
  ^
./options.h:6099:3: note: previous definition is here
  OPT_MT = 899,                              /* -MT */
  ^
./options.h:6126:3: error: redefinition of enumerator 'OPT_o'
  OPT_o = 926,                               /* -o */
  ^
./options.h:6123:3: note: previous definition is here
  OPT_o = 923,                               /* -o */
  ^
./options.h:6128:3: error: redefinition of enumerator 'OPT_o'
  OPT_o = 928,                               /* -o */
  ^
./options.h:6123:3: note: previous definition is here
  OPT_o = 923,                               /* -o */
  ^
./options.h:6135:3: error: redefinition of enumerator 'OPT_P'
  OPT_P = 935,                               /* -P */
  ^
./options.h:6131:3: note: previous definition is here
  OPT_P = 931,                               /* -P */
  ^
./options.h:6233:3: error: redefinition of enumerator 'OPT_U'
  OPT_U = 1033,                              /* -U */
  ^
./options.h:6231:3: note: previous definition is here
  OPT_U = 1031,                              /* -U */
  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
gmake[2]: *** [Makefile:2495: build/genpreds.o] Error 1
gmake[2]: Leaving directory
'/usr/ports/devel/arm-none-eabi-gcc/work/.build/gcc'
gmake[1]: *** [Makefile:4109: all-gcc] Error 2
gmake[1]: Leaving directory '/usr/ports/devel/arm-none-eabi-gcc/work/.build'
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/arm-none-eabi-gcc
Comment 1 tech-lists 2018-03-15 17:49:19 UTC
temporary workaround is to do this:
set LANG=C
export LANG
set LC_ALL=C
export LC_ALL
Comment 2 tech-lists 2018-03-15 17:50:09 UTC
please see bug 215882 for more information
Comment 3 tech-lists 2018-03-15 18:18:01 UTC
also affects devel/aarch64-none-elf-gcc
Comment 4 Rene Ladan freebsd_committer 2019-04-07 10:17:22 UTC
Maintainer reset.
Comment 5 Alexander Kabaev freebsd_committer 2019-12-16 00:28:17 UTC
I am not the ports committer anymore and eabi was never on the list of port I supported. being dependent on xtoolchain port does not make me the ports maintainer. Chances are this has been fixed since anyway.
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2019-12-16 00:42:37 UTC
^Triage: 

- (Ex) maintainer *feedback* (not approval) was provided -> +
- Affects some people: Appears to be scoped to users without pfilter support
Comment 7 Tijl Coosemans freebsd_committer 2019-12-16 09:22:26 UTC
This is not a bug I'm afraid.  USE_LOCALE is for port Makefiles, not for /etc/make.conf.  Ports need to be built with the C locale (unless the port Makefile says otherwise).  If I remember correctly, the gcc source code has a script somewhere that gives different output depending on LC_COLLATE and UTF-8 has different collation rules than the C locale.