Bug 202528 - sysutils/openipmi: compile failure
Summary: sysutils/openipmi: compile failure
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jason Unovitch
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-20 20:13 UTC by Larry Rosenman
Modified: 2015-09-04 16:42 UTC (History)
1 user (show)

See Also:


Attachments
OpenIPMI, fix build error when port is already installed. (616 bytes, patch)
2015-09-04 11:51 UTC, Jason Unovitch
no flags Details | Diff
Poudriere testport log from 10.1-RELEASE jail (181.47 KB, text/x-log)
2015-09-04 12:40 UTC, Jason Unovitch
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Larry Rosenman freebsd_committer freebsd_triage 2015-08-20 20:13:11 UTC
/bin/sh ../libtool  --tag=CC   --mode=compile cc -DHAVE_CONFIG_H -I. -I..   -I/usr/local/include -Wall -Wsign-compare -I../include -I../include -DIPMI_CHECK_LOCKS  -O2 -pipe  -fstack-protector -fno-strict-aliasing -MT mc.lo -MD -MP -MF .deps/mc.Tpo -c -o mc.lo mc.c
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -Wall -Wsign-compare -I../include -I../include -DIPMI_CHECK_LOCKS -O2 -pipe -fstack-protector -fno-strict-aliasing -MT mc.lo -MD -MP -MF .deps/mc.Tpo -c mc.c  -fPIC -DPIC -o .libs/mc.o
mc.c:1952:19: error: no member named 'get_monotonic_time' in
      'struct os_handler_s'
    info->os_hnd->get_monotonic_time(info->os_hnd, &now);
    ~~~~~~~~~~~~  ^
mc.c:2051:19: error: no member named 'get_monotonic_time' in
      'struct os_handler_s'
    info->os_hnd->get_monotonic_time(info->os_hnd, &now);
    ~~~~~~~~~~~~  ^
mc.c:2326:48: error: too many arguments to function call, expected single
      argument 'mc', have 2 arguments
        rv = _ipmi_chassis_create_controls(mc, instance);
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     ^~~~~~~~
/usr/local/include/OpenIPMI/internal/ipmi_mc.h:206:1: note:
      '_ipmi_chassis_create_controls' declared here
int _ipmi_chassis_create_controls(ipmi_mc_t *mc);
^
3 errors generated.
Makefile:547: recipe for target 'mc.lo' failed
gmake[4]: *** [mc.lo] Error 1
gmake[4]: Leaving directory '/usr/ports/sysutils/openipmi/work/OpenIPMI-2.0.21/lib'
Makefile:503: recipe for target 'all-recursive' failed
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory '/usr/ports/sysutils/openipmi/work/OpenIPMI-2.0.21'
Makefile:414: recipe for target 'all' failed
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory '/usr/ports/sysutils/openipmi/work/OpenIPMI-2.0.21'
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/sysutils/openipmi
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/openipmi

===>>> make build failed for sysutils/openipmi
===>>> Aborting update


===>>> You can restart from the point of failure with this command line:
       portmaster <flags> sysutils/openipmi
Comment 1 Jason Unovitch freebsd_committer freebsd_triage 2015-08-23 15:56:30 UTC
Can you replicate this if you remove the current openipmi?  The ipmi_chassis_create_controls function in an installed openipmi-2.0.21's /usr/local/include/OpenIPMI/internal/ipmi_mc.h has two args but it looks like it's picking up the header from an older version.
Comment 2 Larry Rosenman freebsd_committer freebsd_triage 2015-08-23 17:14:56 UTC
If I uninstall the installed sysutils/openipmi, it compiles, so your theory seems to be correct.
Comment 3 Jason Unovitch freebsd_committer freebsd_triage 2015-09-04 11:51:57 UTC
Created attachment 160707 [details]
OpenIPMI, fix build error when port is already installed.

sysutils/openipmi: fix build and add LICENSE
- Prepend -I../include to CPPFLAGS to prevent header files from older versions breaking compilation
- While here, add LICENSE
Comment 4 Jason Unovitch freebsd_committer freebsd_triage 2015-09-04 12:40:58 UTC
Created attachment 160711 [details]
Poudriere testport log from 10.1-RELEASE jail

Poudriere with default options:

9.3-RELEASE-p24      amd64
9.3-RELEASE-p24      i386
10.1-RELEASE-p19     amd64
10.1-RELEASE-p19     i386
10.2-RELEASE-p2      amd64
10.2-RELEASE-p2      i386
11.0-CURRENT r286886 amd64
11.0-CURRENT r286888 i386

Also, per the original bug report, I tested `make package` in a jail that had openipmi-2.0.19_4 installed (available at http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/openipmi-2.0.19_4.txz) to validate that the patch does indeed fix the issue.
Comment 5 Jason Unovitch freebsd_committer freebsd_triage 2015-09-04 13:00:36 UTC
Review submitted to resolve this along with another OpenIPMI PR.  See
https://reviews.FreeBSD.org/D3568
Comment 6 commit-hook freebsd_committer freebsd_triage 2015-09-04 16:26:11 UTC
A commit references this bug:

Author: junovitch
Date: Fri Sep  4 16:25:12 UTC 2015
New revision: 396109
URL: https://svnweb.freebsd.org/changeset/ports/396109

Log:
  sysutils/openipmi: resolve build issues with 2.0.21
  - Return EAGAIN errno instead of EKEYREJECTED to fix build with SSL option [1]
  - Prepend -I../include to CPPFLAGS to stop build breakage from old .h files [2]
  - While here, add LICENSE and regen one of the original patches (portlint)

  PR:		202002 [1]
  PR:		202528 [2]
  Submitted by:	dennis.noordsij@helsinki.fi [1]
  Submitted by:	Anton Sayetsky <vsasjason@gmail.com> [1]
  Submitted by:	Larry Rosenman <ler@lerctr.org> [2]
  Approved by:	feld (mentor)
  Differential Revision:	https://reviews.freebsd.org/D3568

Changes:
  head/sysutils/openipmi/Makefile
  head/sysutils/openipmi/files/patch-OpenIPMIpthread.pc.in
  head/sysutils/openipmi/files/patch-lib_rakp.c
Comment 7 Jason Unovitch freebsd_committer freebsd_triage 2015-09-04 16:42:10 UTC
Committed. Thanks for the report!