# Issue installing cuse4bsd-kmod from ports



## vitadevie (Nov 6, 2013)

I have a problem installing cuse4bsd-kmod on FreeBSD 9.1-RELEASE. I'm running a GENERIC kernel. My ports and kernel sources are up to date.

When I first tried to install I got this error:

```
===> Fetching all distfiles required by cuse4bsd-kmod-0.1.30 for building
===>  Extracting for cuse4bsd-kmod-0.1.30
=> SHA256 Checksum OK for cuse4bsd-kmod-0.1.30.tar.bz2.
===>  Patching for cuse4bsd-kmod-0.1.30
===>  Configuring for cuse4bsd-kmod-0.1.30
===>  Building for cuse4bsd-kmod-0.1.30
make -f /usr/ports/multimedia/cuse4bsd-kmod/work/cuse4bsd-kmod-0.1.30/Makefile.lib  " PTHREAD_LIBS=-pthread" " DESTDIR=" " KMODNAME=cuse4bsd" " KMODDIR=/boot/modules" " LIBDIR=/usr/local/lib" " INCLUDEDIR=/usr/local/include" " MANDIR=/usr/local/man/man" all
Warning: Object directory not changed from original /usr/ports/multimedia/cuse4bsd-kmod/work/cuse4bsd-kmod-0.1.30
cc  -O2 -pipe -fno-strict-aliasing  -D_GNU_SOURCE -std=gnu99 -fstack-protector  -c cuse4bsd_lib.c -o cuse4bsd_lib.o
building static cuse4bsd library
ranlib libcuse4bsd.a
cc -fpic -DPIC  -O2 -pipe -fno-strict-aliasing  -D_GNU_SOURCE -std=gnu99 -fstack-protector  -c cuse4bsd_lib.c -o cuse4bsd_lib.So
building shared library libcuse4bsd.so.1
gzip -cn cuse4bsd.3 > cuse4bsd.3.gz
make -f /usr/ports/multimedia/cuse4bsd-kmod/work/cuse4bsd-kmod-0.1.30/Makefile.kmod  " PTHREAD_LIBS=-pthread" " DESTDIR=" " KMODNAME=cuse4bsd" " KMODDIR=/boot/modules" " LIBDIR=/usr/local/lib" " INCLUDEDIR=/usr/local/include" " MANDIR=/usr/local/man/man" all
"/sys/conf/kmod.mk", line 76: Could not find bsd.compiler.mk
"/sys/conf/kmod.mk", line 112: Malformed conditional (${COMPILER_TYPE} != "clang")
"/sys/conf/kmod.mk", line 116: if-less endif
"/sys/conf/kern.mk", line 18: Malformed conditional (${COMPILER_TYPE} == "clang")
"/sys/conf/kern.mk", line 33: if-less endif
"/sys/conf/kern.mk", line 103: Malformed conditional (${COMPILER_TYPE} == "clang")
"/sys/conf/kern.mk", line 109: if-less endif
make: fatal errors encountered -- cannot continue
*** [all] Error code 1

Stop in /usr/ports/multimedia/cuse4bsd-kmod/work/cuse4bsd-kmod-0.1.30.
*** [do-build] Error code 1

Stop in /usr/ports/multimedia/cuse4bsd-kmod.
```

I then followed the advice given here: Thread 34291. And did:

```
cd /usr/src/share/mk
make install
install -o root -g wheel  -m 444 bsd.README bsd.arch.inc.mk bsd.compat.mk bsd.compiler.mk bsd.cpu.mk bsd.dep.mk bsd.doc.mk bsd.dtrace.mk bsd.endian.mk bsd.files.mk bsd.crunchgen.mk bsd.incs.mk bsd.info.mk bsd.init.mk bsd.kmod.mk bsd.lib.mk bsd.libnames.mk bsd.links.mk bsd.man.mk bsd.nls.mk bsd.obj.mk bsd.own.mk bsd.port.mk bsd.port.options.mk bsd.port.post.mk bsd.port.pre.mk bsd.port.subdir.mk bsd.prog.mk bsd.snmpmod.mk bsd.subdir.mk bsd.sys.mk bsd.symver.mk sys.mk version_gen.awk /usr/share/mk
```

But now I'm getting a new error which indicates an incorrect argument to install binary:

```
/usr/ports/multimedia/cuse4bsd-kmod # make clean
/usr/ports/multimedia/cuse4bsd-kmod # make
===> Fetching all distfiles required by cuse4bsd-kmod-0.1.30 for building
===>  Extracting for cuse4bsd-kmod-0.1.30
=> SHA256 Checksum OK for cuse4bsd-kmod-0.1.30.tar.bz2.
===>  Patching for cuse4bsd-kmod-0.1.30
===>  Configuring for cuse4bsd-kmod-0.1.30
===>  Building for cuse4bsd-kmod-0.1.30
make -f /usr/ports/multimedia/cuse4bsd-kmod/work/cuse4bsd-kmod-0.1.30/Makefile.lib  " PTHREAD_LIBS=-pthread" " DESTDIR=" " KMODNAME=cuse4bsd" " KMODDIR=/boot/modules" " LIBDIR=/usr/local/lib" " INCLUDEDIR=/usr/local/include" " MANDIR=/usr/local/man/man" all
Warning: Object directory not changed from original /usr/ports/multimedia/cuse4bsd-kmod/work/cuse4bsd-kmod-0.1.30
cc  -O2 -pipe -fno-strict-aliasing  -D_GNU_SOURCE -std=gnu99 -fstack-protector  -c cuse4bsd_lib.c -o cuse4bsd_lib.o
building static cuse4bsd library
ranlib libcuse4bsd.a
cc -fpic -DPIC  -O2 -pipe -fno-strict-aliasing  -D_GNU_SOURCE -std=gnu99 -fstack-protector  -c cuse4bsd_lib.c -o cuse4bsd_lib.So
building shared library libcuse4bsd.so.1
install: illegal option -- l
usage: install [-bCcMpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 file2
       install [-bCcMpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 ... fileN directory
       install -d [-v] [-g group] [-m mode] [-o owner] directory ...
*** [libcuse4bsd.so.1] Error code 64

Stop in /usr/ports/multimedia/cuse4bsd-kmod/work/cuse4bsd-kmod-0.1.30.
*** [all] Error code 1

Stop in /usr/ports/multimedia/cuse4bsd-kmod/work/cuse4bsd-kmod-0.1.30.
*** [do-build] Error code 1

Stop in /usr/ports/multimedia/cuse4bsd-kmod.
```

Any ideas on how to fix this?


----------



## youngunix (Nov 7, 2013)

You should've tried this 





> ...a buildworld / installworld cycle will fix it. A make install
> in src/share/mk *could* also be enough, but i haven't tested it.


 before doing the install in /usr/src/share/mk.

Source: http://lists.freebsd.org/pipermail/freebsd-current/2012-March/032243.html


----------



## vitadevie (Dec 6, 2013)

I was able to solve this issue but not by rebuilding world. Rebuilding world (`make buildworld`) actually was failing too. I was running FreeBSD 9.1-RELEASE-p7 GENERIC. I realized I might need to upgrade the system to 9.2-RELEASE which I did using freebsd-update. Once this was done I was able to install cuse4bsd-kmod from ports successfully (as well as webcamd and Skype which I needed).

Hope this helps.


----------

