Bug 232932

Summary: devel/elfutils fails to build with GCC 8 (and is two releases behind)
Product: Ports & Packages Reporter: Gerald Pfeifer <gerald>
Component: Individual Port(s)Assignee: Conrad Meyer <cem>
Status: Closed FIXED    
Severity: Affects Some People    
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Gerald Pfeifer freebsd_committer 2018-11-03 13:47:21 UTC
Cf. http://package22.nyi.freebsd.org/data/112amd64-default-PR231590/2018-10-29_06h48m05s/logs/errors/elfutils-0.172_1.log

obstack.c: In function '_obstack_begin':
obstack.c:167:17: error: cast between incompatible function types from 'void * (*)(long int)' to 'struct _obstack_chunk * (*)(void *, long int)' [-Werror=cast-function-type]
   h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
obstack.c:168:16: error: cast between incompatible function types from 'void (*)(void *)' to 'void (*)(void *, struct _obstack_chunk *)' [-Werror=cast-function-type]
   h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;

Also this port is two versions behind upstream which released 0.173
end of June and 0.174 in September.  With a bit of luck a version 
update is going to address this issue?
Comment 1 Conrad Meyer freebsd_committer 2018-11-03 17:28:46 UTC
(In reply to Gerald Pfeifer from comment #0)
> With a bit of luck a version update is going to address this issue?

With this port, new versions usually fix some issues and introduc new linuxisms :-).
Comment 2 Conrad Meyer freebsd_committer 2018-11-03 17:29:45 UTC
For what it's worth, it looks like the GCC8 build may be fixed by adding '-Wno-error=cast-function-type' to CFLAGS.
Comment 3 Conrad Meyer freebsd_committer 2018-11-03 17:57:21 UTC
Dependent ports that need to be verified if we update elfutils:

devel/abi-compliance-checker (well, RUN-only depend)
devel/kcov (LIB depends)
Comment 4 Conrad Meyer freebsd_committer 2018-11-04 03:48:52 UTC
WIP: https://reviews.freebsd.org/D17832
Comment 5 Gerald Pfeifer freebsd_committer 2018-11-04 10:46:37 UTC
(In reply to Conrad Meyer from comment #4)
> WIP: https://reviews.freebsd.org/D17832

Great, thank you, Conrad!
Comment 6 Jan Beich freebsd_committer 2018-11-07 04:45:54 UTC
No longer a blocking issue after ports r484385.
Comment 7 commit-hook freebsd_committer 2018-11-07 05:40:49 UTC
A commit references this bug:

Author: cem
Date: Wed Nov  7 05:39:49 UTC 2018
New revision: 484387
URL: https://svnweb.freebsd.org/changeset/ports/484387

  Update devel/elfutils to 0.174

  PR:		232932
  Reported by:	gerald
  Approved by:	gerald
  Differential Revision:	https://reviews.freebsd.org/D17832

Comment 8 Conrad Meyer freebsd_committer 2018-11-07 06:08:34 UTC
gcc8 part here: https://reviews.freebsd.org/D17882
Comment 9 commit-hook freebsd_committer 2018-11-07 21:14:12 UTC
A commit references this bug:

Author: cem
Date: Wed Nov  7 21:13:16 UTC 2018
New revision: 484412
URL: https://svnweb.freebsd.org/changeset/ports/484412

  devel/elfutils: Unbreak gcc8 build

  Drop one new gcc8 warning, and fix another in the FreeBSD glibc-
  compatibility shim patch.

  Re-enable gcc8 option (USE_GCC= yes).

  Bump PORTREVISION due to the patch change (no functional change).

  PR:		232932
  Reported by:	gerald, kib
  Reviewed by:	bdrewery
  Approved by:	bdrewery
  Sponsored by:	Dell EMC Isilon
  Differential Revision:	https://reviews.freebsd.org/D17882