svn commit: r534893 - head/multimedia/webcamd

Jan Beich jbeich at FreeBSD.org
Mon May 11 12:08:41 UTC 2020


Hans Petter Selasky <hps at selasky.org> writes:

> On 2020-05-11 13:17, Jan Beich wrote:
>
>> Hans Petter Selasky <hselasky at FreeBSD.org> writes:
>> 
>>> Author: hselasky
>>> Date: Mon May 11 08:34:28 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)
>> [...]
>>> -.if exists(/usr/lib32/libcuse.so)
>>> +.include <bsd.port.options.mk>
>>> +
>>> +.if ${ARCH} == amd64 || ${ARCH} == aarch64
>>>   OPTIONS_DEFAULT+=	COMPAT32
>>>   .endif
>> Looks pointless. Not only it misses other 64-bit archs like
>> powerpc64 but
>> also doesn't address bug 245698 where user accidentally enabled COMPAT option.
>
> Hi Jan,
>
> The COMPAT32 option was enabled by error because the user tried to
> build both 32-bit and 64-bit world and ports from the same jail.
>
> The COMPAT32 option is mostly relevant for platforms that have lots of
> binary applications in 32-bit mode, like wine-i386-devel, and is not 
> that relevant for power64 nor sparc64, at the moment.

For example, lang/gcc* do enable MULTILIB by default on powerpc64.
Compare with aarch64 which doesn't support /usr/lib32 yet.

Looking at COMPAT32 code it defines CONFIG_X86_64 which is unlikely to
work on non-x86 architectures and CONFIG_COMPAT_32BIT_TIME which is not
true outside of i386 (time_t is int64_t on armv6, mips, powerpc).

> It would be better if the ports tree could set a variable by default
> if we are building for a 64-bit platform!
>
> .if ${ARCH64} != ""
>
> .endif

Why list COMPAT32 option even if non-default on architectures where it's
not supported? I can still reproduce bug 245698 on i386 e.g.,

$ poudriere options -nj 113i386 multimedia/webcamd
<mark COMPAT32 as enabled>
$ poudriere testport -j 113i386 multimedia/webcamd
[...]
--- obj-media_tree-drivers-media-v4l2-core-v4l2-subdev.o ---
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:58:21: note: expanded from macro '_IOR'
#define _IOR(g,n,t)     _IOC(IOC_OUT,   (g), (n), sizeof(t))
                        ^
/usr/include/sys/ioccom.h:54: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)
                                 ^
--- obj-media_tree-drivers-media-v4l2-core-v4l2-common.o ---
--- obj-media_tree-drivers-media-v4l2-core-v4l2-subdev.o ---
/usr/include/sys/ioccom.h:58:21: note: expanded from macro '_IOR'
#define _IOR(g,n,t)     _IOC(IOC_OUT,   (g), (n), sizeof(t))
                        ^
/usr/include/sys/ioccom.h:54:35: note: expanded from macro '_IOC'
#define _IOC(inout,group,num,len)       ((unsigned long) \
                                        ^
1 error generated.


More information about the svn-ports-head mailing list