Bug 207097 - misc/raspberrypi-userland: error: variable 'i' is incremented both in the loop header and in the loop body (stops the build)
Summary: misc/raspberrypi-userland: error: variable 'i' is incremented both in the loo...
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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-11 03:10 UTC by Mark Millard
Modified: 2016-03-17 20:17 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (mikael)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Millard 2016-02-11 03:10:38 UTC
[Context basics: projects/clang380-import -r295351 for buildworld/buildkernel that targeted an rpi2 (armv7-a/cortex-a7).]

When I attempt portinstall/portmaster builds for misc/raspberrypi-userland I get the following.

. . .
[ 21%] Building C object interface/khronos/CMakeFiles/EGL_static.dir/vg/vg_int_mat3x3.c.o
/usr/obj/portswork/usr/ports/misc/raspberrypi-userland/work/userland-fcbf8a3/interface/mmal/util/mmal_param_convert.c:47:7: error: variable 'i' is incremented both in the loop header and in the loop body [-Werror,-Wfor-loop-analysis]
      i++;
      ^
/usr/obj/portswork/usr/ports/misc/raspberrypi-userland/work/userland-fcbf8a3/interface/mmal/util/mmal_param_convert.c:40:25: note: incremented here
   for (i=0; i<n_pairs; i++)
                        ^
1 error generated.
--- interface/mmal/util/CMakeFiles/mmal_util.dir/mmal_param_convert.c.o ---
*** [interface/mmal/util/CMakeFiles/mmal_util.dir/mmal_param_convert.c.o] Error code 1

make[4]: stopped in /usr/obj/portswork/usr/ports/misc/raspberrypi-userland/work/.build
1 error
. . .

which stops the overall build.


There are also some reports like:

[ 18%] Building C object interface/khronos/CMakeFiles/EGL_static.dir/common/khrn_client_global_image_map.c.o
In file included from /usr/obj/portswork/usr/ports/misc/raspberrypi-userland/work/userland-fcbf8a3/interface/mmal/core/mmal_clock.c:28:
In file included from /usr/obj/portswork/usr/ports/misc/raspberrypi-userland/work/userland-fcbf8a3/build/inc/interface/vcos/vcos.h:185:
/usr/obj/portswork/usr/ports/misc/raspberrypi-userland/work/userland-fcbf8a3/build/inc/interface/vcos/vcos_timer.h:80:15: warning: inline function 'vcos_timer_create' is not defined [-Wundefined-inline]
VCOS_STATUS_T vcos_timer_create(VCOS_TIMER_T *timer,
              ^
/usr/obj/portswork/usr/ports/misc/raspberrypi-userland/work/userland-fcbf8a3/interface/mmal/core/mmal_clock.c:190:12: note: used here
   return (vcos_timer_create(timer, "mmal-clock timer", mmal_clock_timer_cb, ctx) == VCOS_SUCCESS);
           ^
(I will not list all of them.)

Stop reading the description here if you do not care about supporting details at this point.

Other context details:

# freebsd-version -ku; uname -aKU
11.0-CURRENT
11.0-CURRENT
FreeBSD rpi2 11.0-CURRENT FreeBSD 11.0-CURRENT #14 r295351M: Sun Feb  7 03:23:24 PST 2016     markmi@FreeBSDx64:/usr/obj/clang/arm.armv6/usr/src/sys/RPI2-NODBG  arm 1100097 1100097

# svnlite info /usr/ports/misc/raspberrypi-userland
Path: misc/raspberrypi-userland
Working Copy Root Path: /usr/ports
URL: https://svn0.us-west.freebsd.org/ports/head/misc/raspberrypi-userland
Relative URL: ^/head/misc/raspberrypi-userland
Repository Root: https://svn0.us-west.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 408464
Node Kind: directory
Schedule: normal
Last Changed Author: amdmi3
Last Changed Rev: 408041
Last Changed Date: 2016-02-04 15:13:32 +0000 (Thu, 04 Feb 2016)

$ more /etc/make.conf 
DEFAULT_VERSIONS+=perl5=5.22
WRKDIRPREFIX=/usr/obj/portswork
WITH_DEBUG=
WITH_DEBUG_FILES=
MALLOC_PRODUCTION=
#
TO_TYPE=armv6
VERSION_CONTEXT=11.0
CFLAGS+=-target ${TO_TYPE}--freebsd${VERSION_CONTEXT}-gnueabi -march=armv7-a -mcpu=cortex-a7 -mfloat-abi=softfp -mno-unaligned-access
.if ${.MAKE.LEVEL} == 0
CC=/usr/bin/clang
CXX=/usr/bin/clang++
CPP=/usr/bin/clang-cpp
.export CC
.export CXX
.export CPP
.endif

(In case it is not clear: This is clang 3.8.0 that is in use. It was used for buildworld and buildkernel as well.)
Comment 1 Mark Millard 2016-02-11 08:39:23 UTC
(In reply to Mark Millard from comment #0)

My listing WITH_DEBUG= as in the make.conf was incorrect: this submittal is for without it.

I have submitted bug 207102 for what happens when make.conf has WITH_DEBUG= listed: it stops much earlier [0%] with a different message.

Sorry for grabbing the wrong text ( missing a # to comment out the WITH_DEBUG= ).
Comment 2 Mikael Urankar freebsd_committer freebsd_triage 2016-02-15 08:16:11 UTC
I've opened a PR upstream:
https://github.com/raspberrypi/userland/issues/291
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-03-17 20:16:42 UTC
A commit references this bug:

Author: feld
Date: Thu Mar 17 20:16:25 UTC 2016
New revision: 411305
URL: https://svnweb.freebsd.org/changeset/ports/411305

Log:
  misc/raspberrypi-userland: Update to 20160306

  This update also adds a DEBUG option.

  PR:		207790, 207097, 207102

Changes:
  head/misc/raspberrypi-userland/Makefile
  head/misc/raspberrypi-userland/distinfo