"error: cannot combine with previous 'int' declaration specifier" building FreeBSD 10.0 releng
December 2014.
===> drm2/radeonkms (all)
cc -O2 -pipe -march=native -fms-extensions -fno-strict-aliasing -D_KERNEL -DKLD_MODULE -nostdinc -I/usr/src/sys/modules/drm2/radeonkms/../../../dev/drm2/radeon -
DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/ENCEINTE/opt_global.h -I. -I@ -I@/contrib/altq -fno-common -g -fno-omit-frame-pointer -mno-omit-leaf-fram
e-pointer -I/usr/obj/usr/src/sys/ENCEINTE -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreest
anding -fstack-protector -std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes
-Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empt
y-body -Wno-error-parentheses-equality -Wno-format -Wno-format -c /usr/src/sys/modules/drm2/radeonkms/../../../dev/drm2/radeon/radeon_acpi.c
In file included from /usr/src/sys/modules/drm2/radeonkms/../../../dev/drm2/radeon/radeon_acpi.c:27:
In file included from @/dev/drm2/drmP.h:43:
In file included from @/sys/param.h:88:
In file included from @/sys/types.h:44:
In file included from /usr/obj/usr/src/sys/ENCEINTE/machine/endian.h:6:
In file included from /usr/obj/usr/src/sys/ENCEINTE/x86/endian.h:37:
In file included from @/sys/_types.h:33:
In file included from /usr/obj/usr/src/sys/ENCEINTE/machine/_types.h:6:
/usr/obj/usr/src/sys/ENCEINTE/x86/_types.h:145:14: error: cannot combine with previous 'int' declaration specifier
typedef int __wchar_t;
^
/usr/obj/usr/src/sys/ENCEINTE/x86/_types.h:145:1: warning: typedef requires a name [-Wmissing-declarations]
typedef int __wchar_t;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
*** Error code 1
Stop.
bmake[5]: stopped in /usr/src/sys/modules/drm2/radeonkms
*** Error code 1
Stop.
bmake[4]: stopped in /usr/src/sys/modules/drm2
*** Error code 1
Stop.
bmake[3]: stopped in /usr/src/sys/modules
*** Error code 1
Stop.
bmake[2]: stopped in /usr/obj/usr/src/sys/ENCEINTE
*** Error code 1
Stop.
bmake[1]: stopped in /usr/src
*** Error code 1
Stop.
make: stopped in /usr/src
The problem is that clang 3.4 with
-fms-extensions
defines things that are already defined in the code, hence the error.The fix is in r260495.