[sane-devel] Building backends on FreeBSD?

Torfinn Ingolfsen tingox at gmail.com
Thu Apr 30 16:37:29 BST 2020


Ok, I remembered to look at the FreeBSD port, and check how things are
done there. Now I'm using this configure line:
tingo at kg-core1$ MAKE=gmake CPPFLAGS=-I/usr/local/include
LDFLAGS=-L/usr/local/lib ./configure --disable-locking
--enable-pthread --without-api-spec --without-systemd BACKENDS="epson2
plustek"

unfortunately, gmake still wants to build other backends (yes, I have
done 'gmake clean' first):
cc -DHAVE_CONFIG_H -I. -I../include/sane  -D_REENTRANT
-DPATH_SANE_CONFIG_DIR=/usr/local/etc/sane.d
-DPATH_SANE_DATA_DIR=/usr/local/share
-DPATH_SANE_LOCK_DIR=/usr/local/var/lock/sane       -DV_MAJOR=1
-DV_MINOR=0 -I. -I. -I../include -I../include  -I/usr/local/include
-Wall -Wextra -pedantic -g -O2 -MT ../backend/umax_pp_low.o -MD -MP
-MF $depbase.Tpo -c -o ../backend/umax_pp_low.o
../backend/umax_pp_low.c &&\
mv -f $depbase.Tpo $depbase.Po
../backend/umax_pp_low.c:1174:4: error: use of undeclared identifier 'found'
          found = 0;
          ^
../backend/umax_pp_low.c:1175:4: error: use of undeclared identifier 'fd'
          fd = open (name, O_RDONLY);
          ^
../backend/umax_pp_low.c:1176:8: error: use of undeclared identifier 'fd'
          if (fd < 0)
              ^
../backend/umax_pp_low.c:1194:34: error: use of undeclared identifier 'fd'
              sanei_umax_pp_setparport (fd);
                                        ^
4 errors generated.
gmake[2]: *** [Makefile:656: ../backend/umax_pp_low.o] Error 1
gmake[2]: Leaving directory '/zs/tingo/work/sane/backends/tools'
gmake[1]: *** [Makefile:480: all] Error 2
gmake[1]: Leaving directory '/zs/tingo/work/sane/backends/tools'
gmake: *** [Makefile:590: all-recursive] Error 1
not sure how to fix this, as the (FreeBSD port) patch for this backend
already is in the source file, as far as I can see.

On Thu, Apr 30, 2020 at 4:36 PM Torfinn Ingolfsen <tingox at gmail.com> wrote:
>
> So I'm trying to build master on FreeBSD. FreeBSD version is 11.3-stable:
> tingo at kg-core1$ uname -a
> FreeBSD kg-core1.kg4.no 11.3-STABLE FreeBSD 11.3-STABLE #2 r352605:
> Sun Sep 22 22:53:27 CEST 2019
> root at kg-core1.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64
>
> I've checked out backends from git:
> tingo at kg-core1$ git log --oneline | head -1
> 9aad35503 Merge branch 'update-epkowa-documentation' into 'master'
>
> I've done
> $ bash ./autogen.sh
> $ MAKE=gmake CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure
>
> but gmake fails:
> tingo at kg-core1$ gmake
> Making all in include
> gmake[1]: Entering directory '/zs/tingo/work/sane/backends/include'
> gmake[1]: Nothing to be done for 'all'.
> gmake[1]: Leaving directory '/zs/tingo/work/sane/backends/include'
> Making all in lib
> gmake[1]: Entering directory '/zs/tingo/work/sane/backends/lib'
> gmake[1]: Nothing to be done for 'all'.
> gmake[1]: Leaving directory '/zs/tingo/work/sane/backends/lib'
> Making all in sanei
> gmake[1]: Entering directory '/zs/tingo/work/sane/backends/sanei'
> gmake[1]: Nothing to be done for 'all'.
> gmake[1]: Leaving directory '/zs/tingo/work/sane/backends/sanei'
> Making all in backend
> gmake[1]: Entering directory '/zs/tingo/work/sane/backends/backend'
> gmake  all-am
> gmake[2]: Entering directory '/zs/tingo/work/sane/backends/backend'
> /bin/sh ../libtool --silent  --tag=CC   --mode=compile cc
> -DHAVE_CONFIG_H -I. -I../include/sane
> -DPATH_SANE_CONFIG_DIR=/usr/local/etc/sane.d
> -DPATH_SANE_DATA_DIR=/usr/local/share
> -DPATH_SANE_LOCK_DIR=/usr/local/var/lock/sane       -DV_MAJOR=1
> -DV_MINOR=0 -I. -I. -I../include -I../include
> -DLIBDIR="\"/usr/local/lib/sane\"" -DBACKEND_NAME=epsonds
> -I/usr/local/include -Wall -Wextra -pedantic -g -O2 -MT
> libepsonds_la-epsonds.lo -MD -MP -MF .deps/libepsonds_la-epsonds.Tpo
> -c -o libepsonds_la-epsonds.lo `test -f 'epsonds.c' || echo
> './'`epsonds.c
> epsonds.c:240:4: warning: implicit declaration of function
> 'setsockopt' is invalid in C99 [-Wimplicit-function-declaration]
>                         setsockopt(s->fd, SOL_SOCKET, SO_RCVTIMEO,
> (char *)&tv,  sizeof(tv));
>                         ^
> epsonds.c:240:22: error: use of undeclared identifier 'SOL_SOCKET'
>                         setsockopt(s->fd, SOL_SOCKET, SO_RCVTIMEO,
> (char *)&tv,  sizeof(tv));
>                                           ^
> epsonds.c:240:34: error: use of undeclared identifier 'SO_RCVTIMEO'
>                         setsockopt(s->fd, SOL_SOCKET, SO_RCVTIMEO,
> (char *)&tv,  sizeof(tv));
>                                                       ^
> 1 warning and 2 errors generated.
> gmake[2]: *** [Makefile:4718: libepsonds_la-epsonds.lo] Error 1
> gmake[2]: Leaving directory '/zs/tingo/work/sane/backends/backend'
> gmake[1]: *** [Makefile:3326: all] Error 2
> gmake[1]: Leaving directory '/zs/tingo/work/sane/backends/backend'
> gmake: *** [Makefile:590: all-recursive] Error 1
>
> What more can I do?
> --
> Regards,
> Torfinn Ingolfsen



-- 
mvh
Torfinn



More information about the sane-devel mailing list