Re: compile 13.2p8 on a recent current fails: compiler issue ?

2023-12-13 Thread Dag-Erling Smørgrav
Dimitry Andric  writes:
> henry vogt  writes:
> > ===> usr.sbin/zic (obj,all,install)
> > Building /usr/obj/usr/src/13.2/amd64.amd64/tmp/obj-tools/usr.sbin/zic/zic.o
> > --- zic.o ---
> > /usr/src/13.2/contrib/tzcode/zic.c:464:8: error: an attribute list cannot 
> > appear here
> >   464 | static ATTRIBUTE_NORETURN void
> >   |^~
> This appears to have been fixed upstream some time ago:
> https://github.com/eggert/tz/commit/9cfe9507fcc22cd4a0c4da486ea1c7f0de6b075f

It's also fixed in 14 and 15:
https://cgit.freebsd.org/src/commit/?id=75411d157232ee3b4789b92c9205453e7d59a3d2

It was too late for 13.2, but I'll make sure it's merged before 13.3.

DES
-- 
Dag-Erling Smørgrav - d...@freebsd.org



Re: compile 13.2p8 on a recent current fails: compiler issue ?

2023-12-13 Thread Dimitry Andric
On 13 Dec 2023, at 13:08, henry vogt  wrote:
> 
> attempt to compile 13.2p8 on a recent current fails: compiler issue ?
> 
> ...
> 
> ===> usr.sbin/zic (obj,all,install)
> Building /usr/obj/usr/src/13.2/amd64.amd64/tmp/obj-tools/usr.sbin/zic/zic.o
> --- zic.o ---
> /usr/src/13.2/contrib/tzcode/zic.c:464:8: error: an attribute list cannot 
> appear here
>   464 | static ATTRIBUTE_NORETURN void
>   |^~
> /usr/src/13.2/contrib/tzcode/private.h:471:30: note: expanded from macro 
> 'ATTRIBUTE_NORETURN'
>   471 | #  define ATTRIBUTE_NORETURN [[noreturn]]
>   |  ^~~~
> /usr/src/13.2/contrib/tzcode/zic.c:471:8: error: an attribute list cannot 
> appear here
>   471 | static ATTRIBUTE_NORETURN void
>   |^~
> /usr/src/13.2/contrib/tzcode/private.h:471:30: note: expanded from macro 
> 'ATTRIBUTE_NORETURN'
>   471 | #  define ATTRIBUTE_NORETURN [[noreturn]]
>   |  ^~~~
> /usr/src/13.2/contrib/tzcode/zic.c:669:8: error: an attribute list cannot 
> appear here
>   669 | static ATTRIBUTE_NORETURN void
>   |^~
> /usr/src/13.2/contrib/tzcode/private.h:471:30: note: expanded from macro 
> 'ATTRIBUTE_NORETURN'
>   471 | #  define ATTRIBUTE_NORETURN [[noreturn]]
>   |  ^~~~
> /usr/src/13.2/contrib/tzcode/zic.c:3778:8: error: an attribute list cannot 
> appear here
>  3778 | static ATTRIBUTE_NORETURN void
>   |^~
> /usr/src/13.2/contrib/tzcode/private.h:471:30: note: expanded from macro 
> 'ATTRIBUTE_NORETURN'
>   471 | #  define ATTRIBUTE_NORETURN [[noreturn]]
>   |  ^~~~
> 4 errors generated.
> *** [zic.o] Error code 1
> 
> make[3]: stopped in /usr/src/13.2/usr.sbin/zic
> 
> # cc -v
> FreeBSD clang version 17.0.6 (https://github.com/llvm/llvm-project.git 
> llvmorg-17.0.6-0-g6009708b4367)
> Target: x86_64-unknown-freebsd15.0
> Thread model: posix
> InstalledDir: /usr/bin

This appears to have been fixed upstream some time ago:
https://github.com/eggert/tz/commit/9cfe9507fcc22cd4a0c4da486ea1c7f0de6b075f

but clang 17 has become more strict about invalid attribute placement, possibly 
to be more like gcc (which should already have given this as a warning or 
error).

So I guess for 13.2-p8 you will have to apply that fix manually, if you want to 
build it on a 15-CURRENT box. Otherwise, I would advise a jail.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


compile 13.2p8 on a recent current fails: compiler issue ?

2023-12-13 Thread henry vogt

Hi

attempt to compile 13.2p8 on a recent current fails: compiler issue ?

...

===> usr.sbin/zic (obj,all,install)
Building /usr/obj/usr/src/13.2/amd64.amd64/tmp/obj-tools/usr.sbin/zic/zic.o
--- zic.o ---
/usr/src/13.2/contrib/tzcode/zic.c:464:8: error: an attribute list 
cannot appear here

  464 | static ATTRIBUTE_NORETURN void
  |    ^~
/usr/src/13.2/contrib/tzcode/private.h:471:30: note: expanded from macro 
'ATTRIBUTE_NORETURN'

  471 | #  define ATTRIBUTE_NORETURN [[noreturn]]
  |  ^~~~
/usr/src/13.2/contrib/tzcode/zic.c:471:8: error: an attribute list 
cannot appear here

  471 | static ATTRIBUTE_NORETURN void
  |    ^~
/usr/src/13.2/contrib/tzcode/private.h:471:30: note: expanded from macro 
'ATTRIBUTE_NORETURN'

  471 | #  define ATTRIBUTE_NORETURN [[noreturn]]
  |  ^~~~
/usr/src/13.2/contrib/tzcode/zic.c:669:8: error: an attribute list 
cannot appear here

  669 | static ATTRIBUTE_NORETURN void
  |    ^~
/usr/src/13.2/contrib/tzcode/private.h:471:30: note: expanded from macro 
'ATTRIBUTE_NORETURN'

  471 | #  define ATTRIBUTE_NORETURN [[noreturn]]
  |  ^~~~
/usr/src/13.2/contrib/tzcode/zic.c:3778:8: error: an attribute list 
cannot appear here

 3778 | static ATTRIBUTE_NORETURN void
  |    ^~
/usr/src/13.2/contrib/tzcode/private.h:471:30: note: expanded from macro 
'ATTRIBUTE_NORETURN'

  471 | #  define ATTRIBUTE_NORETURN [[noreturn]]
  |  ^~~~
4 errors generated.
*** [zic.o] Error code 1

make[3]: stopped in /usr/src/13.2/usr.sbin/zic

# cc -v
FreeBSD clang version 17.0.6 (https://github.com/llvm/llvm-project.git 
llvmorg-17.0.6-0-g6009708b4367)

Target: x86_64-unknown-freebsd15.0
Thread model: posix
InstalledDir: /usr/bin

Kind Regards

Henry