# Problems with the build of pwcbsd (mmap-support enabled)



## Morpheus (Oct 1, 2010)

Hi together,

I'm not able to build the Port multimedia/pwcbsd with mmap support on FreeBSD 8.1-RELEASE.
I would like to install motion and it needs mmap support.

I tried this on different machines with same result.

Maybe someone here had the same problem and can help me.

Thanks in advance,
Torsten

Below the output of installing pwcbsd:


```
[root@nemesis /usr/ports/multimedia/pwcbsd]# make install clean
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for pwcbsd-1.4.1_7
=> pwcbsd-1.4.1.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from [url]http://raaf.atspace.org/[/url].
fetch: [url]http://raaf.atspace.org/pwcbsd-1.4.1.tar.gz:[/url] size mismatch: expected 66279, actual 15397
=> Attempting to fetch from [url]http://www.bsd-geek.de/FreeBSD/distfiles/[/url].
pwcbsd-1.4.1.tar.gz                           100% of   64 kB  258 kBps
===>  Extracting for pwcbsd-1.4.1_7
=> MD5 Checksum OK for pwcbsd-1.4.1.tar.gz.
=> SHA256 Checksum OK for pwcbsd-1.4.1.tar.gz.
===>  Patching for pwcbsd-1.4.1_7
===>  Applying extra patch /usr/ports/multimedia/pwcbsd/files/extra-patch-Makefile.kld
===>  Applying extra patch /usr/ports/multimedia/pwcbsd/files/extra-patch-pwc-ctrl.c
===>  Applying extra patch /usr/ports/multimedia/pwcbsd/files/extra-patch-pwc-v4l.c
===>  Applying extra patch /usr/ports/multimedia/pwcbsd/files/extra-patch-pwc.c
===>  Applying extra patch /usr/ports/multimedia/pwcbsd/files/extra-patch-pwc.h
===>  Applying FreeBSD patches for pwcbsd-1.4.1_7
===>   pwcbsd-1.4.1_7 depends on file: /usr/local/bin/sdl-config - found
===>   pwcbsd-1.4.1_7 depends on shared library: jpeg.11 - found
===>   pwcbsd-1.4.1_7 depends on shared library: SDL-1.2.11 - found
===>  Configuring for pwcbsd-1.4.1_7
===>  Building for pwcbsd-1.4.1_7
echo '#define USE_MMAP 1' > opt_usb.h
make -f Makefile.kld all
Warning: Object directory not changed from original /usr/ports/multimedia/pwcbsd/work/pwcbsd
@ -> /usr/src/sys
machine -> /usr/src/sys/i386/include
awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h
awk -f @/tools/makeobjops.awk @/kern/device_if.m -h
:> opt_bus.h
awk -f @/tools/makeobjops.awk @/dev/usb/usb_if.m -h
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-
growth=100 --param large-function-growth=1000 -fno-common  -mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -
mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-
prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c pwc.c
cc1: warnings being treated as errors
pwc.c: In function 'pwc_mmap':
pwc.c:588: warning: unused variable 'unit'
*** Error code 1

Stop in /usr/ports/multimedia/pwcbsd/work/pwcbsd.
*** Error code 1

Stop in /usr/ports/multimedia/pwcbsd/work/pwcbsd.
*** Error code 1

Stop in /usr/ports/multimedia/pwcbsd.
*** Error code 1

Stop in /usr/ports/multimedia/pwcbsd.
[root@nemesis /usr/ports/multimedia/pwcbsd]#
```


----------



## acheron (Oct 1, 2010)

try to comment line 588 of multimedia/pwcbsd/work/pwcbsd/pwc.c


----------



## lme@ (Oct 1, 2010)

Thanks for the hint. I just committed a new version of the port. It should build now.


----------



## Morpheus (Oct 2, 2010)

Hi,

thank you very much. Now it builds properly. 

You rock!

Greets,
Torsten


----------



## lme@ (Oct 2, 2010)

No problem. 
But I only saw the thread by chance. You should better do a `$ make maintainer` in a port's directory and ask the maintainer directly.


----------

