Bug 245698 - multimedia/webcamd: fails to compile on i386
Summary: multimedia/webcamd: fails to compile on i386
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: i386 Any
: --- Affects Only Me
Assignee: Hans Petter Selasky
URL:
Keywords: buildisok
Depends on:
Blocks:
 
Reported: 2020-04-17 14:49 UTC by Martin Birgmeier
Modified: 2020-05-11 12:55 UTC (History)
1 user (show)

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


Attachments
patch to multimedia/webcamd/Makefile (542 bytes, text/plain)
2020-04-17 15:46 UTC, Martin Birgmeier
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2020-04-17 14:49:54 UTC
Scenario:
- ports at r531928
- Using portmaster in a VirtualBox VM running FreeBSD 12.1-RELEASE-p2
- recompiling webcamd

Result:
- Fails with duplicate case value:

--- objwarn ---
Warning: Object directory not changed from original /usr/tmp/a/SRC/FreeBSD-ports/head/multimedia/webcamd/work/webcamd-5.7.1.1
--- obj-media_tree-drivers-media-v4l2-core-v4l2-subdev.o ---
cc -c -DCURR_FILE_NAME=\"v4l2-subdev\" -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -D_GNU_SOURCE -DLINUX -Wall -Wno-pointer-sign -Wno-unused-variable -I/usr/tmp/a/SRC/FreeBSD-ports/head/multimedia/webcamd/work/webcamd-5.7.1.1 -I/usr/tmp/a/SRC/FreeBSD-ports/head/multimedia/webcamd/work/webcamd-5.7.1.1/dummy -I/usr/tmp/a/SRC/FreeBSD-ports/head/multimedia/webcamd/work/webcamd-5.7.1.1/headers -Imedia_tree/drivers/media/common -Imedia_tree/drivers/media/common/tuners -Imedia_tree/drivers/media/dvb/dvb-core -Imedia_tree/drivers/media/dvb/dvb-usb -Imedia_tree/drivers/media/dvb/frontends -Imedia_tree/drivers/media/dvb/ttpci -Imedia_tree/drivers/media/video/gspca -Imedia_tree/drivers/media/video/hdpvr -Imedia_tree/drivers/media/dvb-core -Imedia_tree/drivers/media/dvb-usb -Imedia_tree/drivers/media/dvb-frontends -Imedia_tree/drivers/media/tuners -Imedia_tree/drivers/media/pci/ttpci -Imedia_tree/drivers/media/common/siano -Imedia_tree/drivers/media/common/b2c2 -Imedia_tree/drivers/media/usb/gspca -Imedia_tree/drivers/media/usb/dvb-usb -Imedia_tree/drivers/media/usb/dvb-usb-v2 -Imedia_tree/include -Imedia_tree/include/uapi -Imedia_tree/include/media -I/usr/local -I/usr/local/include -include webcamd_global.h -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/local/include/hal -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include  -DHAVE_CUSE   -std=gnu99 -fstack-protector-strong    -Qunused-arguments  -o obj-media_tree-drivers-media-v4l2-core-v4l2-subdev.o media_tree/drivers/media/v4l2-core/v4l2-subdev.c
media_tree/drivers/media/v4l2-core/v4l2-subdev.c:396:7: error: duplicate case value '1081628249'
        case VIDIOC_DQEVENT_TIME32: {
             ^
media_tree/include/media/v4l2-ioctl.h:750:32: note: expanded from macro 'VIDIOC_DQEVENT_TIME32'
#define VIDIOC_DQEVENT_TIME32    _IOR('V', 89, struct v4l2_event_time32)
                                 ^
/usr/include/sys/ioccom.h:60:21: note: expanded from macro '_IOR'
#define _IOR(g,n,t)     _IOC(IOC_OUT,   (g), (n), sizeof(t))
                        ^
/usr/include/sys/ioccom.h:56:35: note: expanded from macro '_IOC'
#define _IOC(inout,group,num,len)       ((unsigned long) \
                                        ^
media_tree/drivers/media/v4l2-core/v4l2-subdev.c:389:7: note: previous case defined here
        case VIDIOC_DQEVENT:
             ^
media_tree/include/uapi/linux/videodev2.h:2536:26: note: expanded from macro 'VIDIOC_DQEVENT'
#define VIDIOC_DQEVENT           _IOR('V', 89, struct v4l2_event)
                                 ^
/usr/include/sys/ioccom.h:60:21: note: expanded from macro '_IOR'
#define _IOR(g,n,t)     _IOC(IOC_OUT,   (g), (n), sizeof(t))
                        ^
/usr/include/sys/ioccom.h:56:35: note: expanded from macro '_IOC'
#define _IOC(inout,group,num,len)       ((unsigned long) \
                                        ^
1 error generated.
*** [obj-media_tree-drivers-media-v4l2-core-v4l2-subdev.o] Error code 1

make[2]: stopped in /usr/tmp/a/SRC/FreeBSD-ports/head/multimedia/webcamd/work/webcamd-5.7.1.1
1 error

make[2]: stopped in /usr/tmp/a/SRC/FreeBSD-ports/head/multimedia/webcamd/work/webcamd-5.7.1.1
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /a/SRC/FreeBSD-ports/head/multimedia/webcamd
*** Error code 1

Stop.
make: stopped in /a/SRC/FreeBSD-ports/head/multimedia/webcamd

Remark:
- On a VM running amd64 the compilation is successful

-- Martin
Comment 1 Hans Petter Selasky freebsd_committer 2020-04-17 14:52:32 UTC
Hi,

Can you check if the COMPAT32 bit option is enabled for webcamd.

You cannot enable this option when building for i386.

Maybe the automatic logic for COMPAT32 is broken!

--HPS
Comment 2 Martin Birgmeier 2020-04-17 15:29:22 UTC
Hi Hans-Petter,

Thank you, it was indeed set. Unsetting this option solved the problem.

However, I am sharing /var/db/ports between my various build machines (currently for amd64, i386, and armv6). So it would be nice if the port could tolerate OPTIONS_FILE_SET+=COMPAT32 and just ignore it when building on i386.

Best regards,

Martin

p.s. The OPTIONS_FILE_SET+=COMPAT32 seems to be set by default when on amd64, which is always the first architecture I update.
Comment 3 Hans Petter Selasky freebsd_committer 2020-04-17 15:34:29 UTC
Can you make a patch?
Comment 4 Martin Birgmeier 2020-04-17 15:46:21 UTC
Created attachment 213500 [details]
patch to multimedia/webcamd/Makefile



:-)

like this?

Best regards, Martin

p.s. I only tried it on i386, but /var/db/ports/multimedia_webcamd/options has OPTIONS_FILE_SET+=COMPAT32
Comment 5 Hans Petter Selasky freebsd_committer 2020-04-17 15:50:36 UTC
Adding pi@
Comment 6 Automation User 2020-05-11 00:50:07 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/144524440
Comment 7 commit-hook freebsd_committer 2020-05-11 08:35:05 UTC
A commit references this bug:

Author: hselasky
Date: Mon May 11 08:34:29 UTC 2020
New revision: 534893
URL: https://svnweb.freebsd.org/changeset/ports/534893

Log:
  Only set COMPAT32 option when building 64-bit platforms.

  PR:		245698
  Approved by:	pi (implicit)

Changes:
  head/multimedia/webcamd/Makefile
Comment 8 Hans Petter Selasky freebsd_committer 2020-05-11 08:35:47 UTC
Let me know if there are more issues.
Comment 9 commit-hook freebsd_committer 2020-05-11 12:21:23 UTC
A commit references this bug:

Author: hselasky
Date: Mon May 11 12:20:39 UTC 2020
New revision: 534909
URL: https://svnweb.freebsd.org/changeset/ports/534909

Log:
  Fix setting COMPAT32 option when building 64-bit platforms.

  Suggested by:	jbeich@ and mat@
  PR:		245698
  Approved by:	pi (implicit)

Changes:
  head/multimedia/webcamd/Makefile
Comment 10 commit-hook freebsd_committer 2020-05-11 12:55:26 UTC
A commit references this bug:

Author: hselasky
Date: Mon May 11 12:55:19 UTC 2020
New revision: 534910
URL: https://svnweb.freebsd.org/changeset/ports/534910

Log:
  Let amd64 be the only platform which support COMPAT32 for now.
  While at it put the *DESC variables after the OPTIONS* one.

  Suggested by:	jbeich@
  PR:		245698
  Approved by:	pi (implicit)

Changes:
  head/multimedia/webcamd/Makefile