Bug 196473 - sbin/camcontrol error no member ccb->cgds allocated or queued, during i386 rescue only compile
Summary: sbin/camcontrol error no member ccb->cgds allocated or queued, during i386 re...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.1-STABLE
Hardware: i386 Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-04 01:40 UTC by dewayne
Modified: 2015-01-04 02:07 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 dewayne 2015-01-04 01:40:41 UTC
While trying to recover an older machine.  I tried to build rescue ONLY on a separate i386 server, received this message.

cc -O2 -pipe -pipe -O2 -g0 -ggdb0 -DSTRIP_FBSDID -DRESCUE -std=gnu99 -Qunused-arguments  -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wmissing-variable-declarations -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -c /usr/src/sbin/camcontrol/camcontrol.c
/usr/src/sbin/camcontrol/camcontrol.c:4472:51: error: no member named 'allocated' in
      'struct ccb_getdevstats'
                fprintf(stdout, "allocated     %d\n", ccb->cgds.allocated);
                                                      ~~~~~~~~~ ^
/usr/src/sbin/camcontrol/camcontrol.c:4474:51: error: no member named 'queued' in 'struct ccb_getdevstats'
                fprintf(stdout, "queued        %d\n", ccb->cgds.queued);
                                                      ~~~~~~~~~ ^
2 errors generated.
*** Error code 1

Stop.
make[3]: stopped in /usr/src/sbin/camcontrol
*** Error code 1

Stop.
make[2]: stopped in /usr/obj/usr/src/rescue/rescue
*** Error code 1

Stop.
make[1]: stopped in /usr/src/rescue/rescue
*** Error code 1

Commenting out the associated lines enabled a clean compilation of camcontrol.

Though I probably should've just reverted 
https://svnweb.freebsd.org/base/head/sbin/camcontrol/camcontrol.c?r1=268240&r2=271588&sortby=date
Comment 1 dewayne 2015-01-04 02:07:34 UTC
Apologies, this is on a 10.1R system using an updated /usr/src from today's 10.1Stable.  I've verified that ccb_getdevstats existed
grep ccb_getdevstats /usr/include/cam/*
but failed to appreciate that I also needed to check the struct contents.

Please disregard/close, as a simple fix is to update the base system's include files.  (Though how to do that properly is a mystery, fortunately the differences are small)
diff /usr/include/cam/cam_ccb.h /usr/src/sys/cam/cam_ccb.h
and a cp is ok

Pity there isn't a 
cd /usr/src && make include ;)