Bug 232932 - devel/elfutils fails to build with GCC 8 (and is two releases behind)
Summary: devel/elfutils fails to build with GCC 8 (and is two releases behind)
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: Conrad Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-03 13:47 UTC by Gerald Pfeifer
Modified: 2018-11-07 21:17 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer freebsd_committer freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 2018-11-04 03:48:52 UTC
WIP: https://reviews.freebsd.org/D17832
Comment 5 Gerald Pfeifer freebsd_committer freebsd_triage 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 freebsd_triage 2018-11-07 04:45:54 UTC
No longer a blocking issue after ports r484385.
Comment 7 commit-hook freebsd_committer freebsd_triage 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

Log:
  Update devel/elfutils to 0.174

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

Changes:
  head/devel/elfutils/Makefile
  head/devel/elfutils/distinfo
  head/devel/elfutils/files/patch-libelf_elf_update.c
  head/devel/elfutils/files/patch-tests_Makefile.am
  head/devel/elfutils/pkg-plist
Comment 8 Conrad Meyer freebsd_committer freebsd_triage 2018-11-07 06:08:34 UTC
gcc8 part here: https://reviews.freebsd.org/D17882
Comment 9 commit-hook freebsd_committer freebsd_triage 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

Log:
  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

Changes:
  head/devel/elfutils/Makefile
  head/devel/elfutils/files/patch-lib_eu-config.h