Dies ist eine alte Version des Dokuments!
Scan- und Druckstation
Nachdem mein letzter All-In-One-Drucker, trotz einhalten aller Herstellerangaben, exakt am Ende der Garantie komisch wurde habe Ich mich entschieden wieder auf getrennte Geräte zu setzen. So steht mir aktuell ein HP FarbLaser sowie ein Canon Scan Lide 90 Flachbettscanner tapfer zur Seite. Da der letzte immer wieder Probleme mit aktuelleren Systemen macht möchte Ich beide Geräte nun über einen ungenutzten Rapsberry Pi anbinden und so auf Knopfdruck Scannen zu können und über normale Freigaben die Dateien abrufen zu können. Genauso soll dann der Drucker via Relais eingeschaltet werden können und über den Druckserver dem Netzwerk die Aufträge gezielt abnehmen. Meine Hoffnung ist das dann bei Gerätewechsel die Einrichtung nur einmal geändert werden muss.
Teil 1: Der Scanner
Habt Ihr schon mal ein Packe auf einem RPI1/Zero gebaut? KATASTROPHE! Dazu später mehr.
Install:
Links: https://wiki.ubuntuusers.de/SANE/Kompilieren/ http://woshub.com/too-many-open-files-error-linux/ https://stackoverflow.com/questions/22603163/automake-error-ltmain-sh-not-found
sudo apt-get install build-essential gettext git libusb-dev linux-headers-generic libtool autoconf automake autopoint
cd ~/src git clone https://gitlab.com/sane-project/backends.git
Problem: beim ausführen von „./autoconfiure.sh“ kommt immer Cant reopen file ltmain.sh
patch: **** Can't reopen file ./ltmain.sh./autogen.sh: Zeile 28: 858 Speicherzugriffsfehler patch "$srcdir/ltmain.sh" "$patchdir/ltmain.sh.patch" patching file ./po/Rules-quot Hunk #1 FAILED at 22. patch: **** Can't reopen file ./po/Rules-quot : No such file or directory
https://www.raspberrypi.org/forums/viewtopic.php?t=297142 Oben in die Liste mit aufgenommen und siehe da: Es geht weiter <3
pi@raspberrypi:~/sane/backends $ ./autogen.sh Copying file to ./m4/ax_create_stdint_h.m4 patching file ./m4/ax_create_stdint_h.m4 to #serial 20 patching file ./m4/ax_create_stdint_h.m4 to #serial 21 autoreconf: Entering directory `.' autoreconf: running: autopoint --force Copying file ABOUT-NLS Copying file config.rpath Copying file m4/codeset.m4 Copying file m4/extern-inline.m4 Copying file m4/fcntl-o.m4 Copying file m4/gettext.m4 Copying file m4/glibc2.m4 Copying file m4/glibc21.m4 Copying file m4/iconv.m4 Copying file m4/intdiv0.m4 Copying file m4/intl.m4 Copying file m4/intldir.m4 Copying file m4/intlmacosx.m4 Copying file m4/intmax.m4 Copying file m4/inttypes-pri.m4 Copying file m4/inttypes_h.m4 Copying file m4/lcmessage.m4 Copying file m4/lib-ld.m4 Copying file m4/lib-link.m4 Copying file m4/lib-prefix.m4 Copying file m4/lock.m4 Copying file m4/longlong.m4 Copying file m4/nls.m4 Copying file m4/po.m4 Copying file m4/printf-posix.m4 Copying file m4/progtest.m4 Copying file m4/size_max.m4 Copying file m4/stdint_h.m4 Copying file m4/threadlib.m4 Copying file m4/uintmax_t.m4 Copying file m4/visibility.m4 Copying file m4/wchar_t.m4 Copying file m4/wint_t.m4 Copying file m4/xsize.m4 Copying file po/Makefile.in.in Copying file po/Makevars.template Copying file po/Rules-quot Copying file po/boldquot.sed Copying file po/en@boldquot.header Copying file po/en@quot.header Copying file po/insert-header.sin Copying file po/quot.sed Copying file po/remove-potcdate.sin autoreconf: running: aclocal --force --warnings=all -I m4 autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in '.'. libtoolize: copying file './ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: copying file 'm4/libtool.m4' libtoolize: copying file 'm4/ltoptions.m4' libtoolize: copying file 'm4/ltsugar.m4' libtoolize: copying file 'm4/ltversion.m4' libtoolize: copying file 'm4/lt~obsolete.m4' autoreconf: running: /usr/bin/autoconf --force --warnings=all autoreconf: running: /usr/bin/autoheader --force --warnings=all autoreconf: running: automake --add-missing --copy --force-missing --warnings=all configure.ac:56: installing './ar-lib' configure.ac:37: installing './compile' configure.ac:57: installing './config.guess' configure.ac:57: installing './config.sub' configure.ac:13: installing './install-sh' configure.ac:13: installing './missing' Makefile.am: installing './INSTALL' backend/Makefile.am:33: warning: '%'-style pattern rules are a GNU make extension backend/Makefile.am:37: warning: '%'-style pattern rules are a GNU make extension backend/Makefile.am: installing './depcomp' parallel-tests: installing './test-driver' autoreconf: Leaving directory `.' patching file ./ltmain.sh patching file ./po/Rules-quot backend/Makefile.am:33: warning: '%'-style pattern rules are a GNU make extension backend/Makefile.am:37: warning: '%'-style pattern rules are a GNU make extension
./configure BACKENDS="canon genesys net"
pi@raspberrypi:~/sane/backends $ ./configure BACKENDS="canon genesys net" checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether make supports nested variables... (cached) yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking whether make supports the include directive... yes (GNU style) checking dependency style of gcc... gcc3 checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking for a Python interpreter with version >= 2.7... python checking for python... /usr/bin/python checking for python version... 2.7 checking for python platform... linux2 checking for python script directory... ${prefix}/lib/python2.7/dist-packages checking for python extension module directory... ${exec_prefix}/lib/python2.7/dist-packages checking for gcc option to accept ISO C99... none needed checking for gcc option for ISO C99 w/o extensions... checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking whether gcc needs -traditional... no checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking for ar... ar checking the archiver (ar) interface... ar checking build system type... armv6l-unknown-linux-gnueabihf checking host system type... armv6l-unknown-linux-gnueabihf checking how to print strings... printf checking for a sed that does not truncate output... /bin/sed checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking how to convert armv6l-unknown-linux-gnueabihf file names to armv6l-unknown-linux-gnueabihf format... func_convert_file_noop checking how to convert armv6l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for mt... mt checking if mt is a manifest tool... no checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking how to run the C++ preprocessor... g++ -E checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... yes checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether NLS is requested... yes checking for msgfmt... no checking for gmsgfmt... : checking for xgettext... no checking for msgmerge... no checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for shared library run path origin... done checking for CFPreferencesCopyAppValue... no checking for CFLocaleCopyCurrent... no checking for GNU gettext in libc... yes checking whether to use NLS... yes checking where the gettext function comes from... libc checking for sane-config... no checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking whether g++ supports C++11 features by default... yes checking for library containing strerror... none required checking whether byte ordering is bigendian... no checking for le32toh in machine/endian.h... no checking for ntohl in arpa/inet.h... yes checking for swap32 in machine/endian.h... no checking for bswap_32 in byteswap.h... yes checking for stdint types... stdint.h (shortcircuit) make use of stdint.h in include/_stdint.h (assuming C99 compatible system) checking for dlfcn.h... (cached) yes checking for dlopen in -ldl... yes checking for dlopen... yes checking dl.h usability... no checking dl.h presence... no checking for dl.h... no checking for sqrt in -lm... yes checking for jpeg_start_decompress in -ljpeg... no checking for TIFFFdOpen in -ltiff... no checking for png_init_io in -lpng... yes checking png.h usability... yes checking png.h presence... yes checking for png.h... yes checking ieee1284.h usability... no checking ieee1284.h presence... no checking for ieee1284.h... no checking pthread.h usability... yes checking pthread.h presence... yes checking for pthread.h... yes checking for pthread_create in -lpthread... yes checking for pthread_create... yes checking for pthread_kill... yes checking for pthread_join... yes checking for pthread_detach... yes checking for pthread_cancel... yes checking for pthread_testcancel... yes checking whether pthread_t is integer... yes checking whether to enable pthread support... yes checking whether to use pthread instead of fork... yes configure: WARNING: Group uucp does not exist on this system. configure: WARNING: Locking feature will be disabled. checking whether to enable device locking... no checking for pkg-config... pkg-config checking for LIBV4L... no checking for AVAHI... no checking for sane_init in -lsane... yes checking for net-snmp-config... no checking for snmp_timeout in -lnetsnmp... no checking for proper SNMP version... no configure: WARNING: net-snmp library disabled, autodetecting network scanners will not be supported. checking for ANSI C header files... (cached) yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking for unistd.h... (cached) yes checking libc.h usability... no checking libc.h presence... no checking for libc.h... no checking sys/dsreq.h usability... no checking sys/dsreq.h presence... no checking for sys/dsreq.h... no checking sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/shm.h usability... yes checking sys/shm.h presence... yes checking for sys/shm.h... yes checking sys/ipc.h usability... yes checking sys/ipc.h presence... yes checking for sys/ipc.h... yes checking sys/scanio.h usability... no checking sys/scanio.h presence... no checking for sys/scanio.h... no checking os2.h usability... no checking os2.h presence... no checking for os2.h... no checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking sys/io.h usability... yes checking sys/io.h presence... yes checking for sys/io.h... yes checking sys/hw.h usability... no checking sys/hw.h presence... no checking for sys/hw.h... no checking for sys/types.h... (cached) yes checking linux/ppdev.h usability... yes checking linux/ppdev.h presence... yes checking for linux/ppdev.h... yes checking dev/ppbus/ppi.h usability... no checking dev/ppbus/ppi.h presence... no checking for dev/ppbus/ppi.h... no checking machine/cpufunc.h usability... no checking machine/cpufunc.h presence... no checking for machine/cpufunc.h... no checking sys/sem.h usability... yes checking sys/sem.h presence... yes checking for sys/sem.h... yes checking sys/poll.h usability... yes checking sys/poll.h presence... yes checking for sys/poll.h... yes checking windows.h usability... no checking windows.h presence... no checking for windows.h... no checking be/kernel/OS.h usability... no checking be/kernel/OS.h presence... no checking for be/kernel/OS.h... no checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking sys/ioctl.h usability... yes checking sys/ioctl.h presence... yes checking for sys/ioctl.h... yes checking asm/types.h usability... yes checking asm/types.h presence... yes checking for asm/types.h... yes checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking tiffio.h usability... no checking tiffio.h presence... no checking for tiffio.h... no checking ifaddrs.h usability... yes checking ifaddrs.h presence... yes checking for ifaddrs.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking getopt.h usability... yes checking getopt.h presence... yes checking for getopt.h... yes checking for asm/io.h... no checking winsock2.h usability... no checking winsock2.h presence... no checking for winsock2.h... no checking resmgr.h usability... no checking resmgr.h presence... no checking for resmgr.h... no checking for size_t... yes checking for pid_t... yes checking for ssize_t... yes checking for u_char... yes checking for u_short... yes checking for u_int... yes checking for u_long... yes checking for long long support... yes checking for socklen_t in <sys/socket.h>... yes checking for union semun in <sys/sem.h>... no checking for struct flock in fcntl.h... yes checking for Linux ioctl defines... yes checking whether byte ordering is bigendian... (cached) no checking for an ANSI C-conforming const... yes checking for inline... inline checking for working alloca.h... yes checking for alloca... yes checking for getenv... yes checking for inet_ntop... yes checking for inet_pton... yes checking for sigprocmask... yes checking for sleep... yes checking for snprintf... yes checking for strcasestr... yes checking for strdup... yes checking for strndup... yes checking for strsep... yes checking for syslog... yes checking for usleep... yes checking for vsyslog... yes checking for gethostbyaddr... yes checking for gethostbyaddr... (cached) yes checking for socket... yes checking for inet_aton... yes checking for inet_addr... yes checking for inet_aton... (cached) yes checking for inet_ntoa... yes checking for stdlib.h... (cached) yes checking for unistd.h... (cached) yes checking for sys/param.h... yes checking for getpagesize... yes checking for working mmap... yes checking for atexit... yes checking for ioperm... yes checking for i386_set_ioperm... no checking for mkdir... yes checking for strftime... yes checking for strstr... yes checking for strtod... yes checking for cfmakeraw... yes checking for tcsendbreak... yes checking for strcasecmp... yes checking for strncasecmp... yes checking for _portaccess... no checking for getaddrinfo... yes checking for getnameinfo... yes checking for poll... yes checking for setitimer... yes checking for iopl... yes checking for getuid... yes checking for getpass... yes checking for inb,outb (provided by sys/io.h)... yes checking for getopt_long... yes checking for SYSTEMD... no checking for SYSTEMD... no checking for USB... no checking for USB... yes checking for libcurl... no checking for POPPLER_GLIB... no checking for XML... no checking IOKit/scsi/SCSITaskLib.h usability... no checking IOKit/scsi/SCSITaskLib.h presence... no checking for IOKit/scsi/SCSITaskLib.h... no checking IOKit/cdb/IOSCSILib.h usability... no checking IOKit/cdb/IOSCSILib.h presence... no checking for IOKit/cdb/IOSCSILib.h... no checking IOKit/scsi/SCSICommandOperationCodes.h usability... no checking IOKit/scsi/SCSICommandOperationCodes.h presence... no checking for IOKit/scsi/SCSICommandOperationCodes.h... no checking IOKit/scsi-commands/SCSICommandOperationCodes.h usability... no checking IOKit/scsi-commands/SCSICommandOperationCodes.h presence... no checking for IOKit/scsi-commands/SCSICommandOperationCodes.h... no checking scsi.h usability... no checking scsi.h presence... no checking for scsi.h... no checking sys/scsi.h usability... no checking sys/scsi.h presence... no checking for sys/scsi.h... no checking sys/scsicmd.h usability... no checking sys/scsicmd.h presence... no checking for sys/scsicmd.h... no checking sys/scsiio.h usability... no checking sys/scsiio.h presence... no checking for sys/scsiio.h... no checking bsd/dev/scsireg.h usability... no checking bsd/dev/scsireg.h presence... no checking for bsd/dev/scsireg.h... no checking scsi/sg.h usability... yes checking scsi/sg.h presence... yes checking for scsi/sg.h... yes checking camlib.h usability... no checking camlib.h presence... no checking for camlib.h... no checking gscdds.h usability... no checking gscdds.h presence... no checking for gscdds.h... no checking sys/scsi/scsi.h usability... no checking sys/scsi/scsi.h presence... no checking for sys/scsi/scsi.h... no checking sys/scsi/sgdefs.h usability... no checking sys/scsi/sgdefs.h presence... no checking for sys/scsi/sgdefs.h... no checking sys/scsi/targets/scgio.h usability... no checking sys/scsi/targets/scgio.h presence... no checking for sys/scsi/targets/scgio.h... no checking apollo/scsi.h usability... no checking apollo/scsi.h presence... no checking for apollo/scsi.h... no checking sys/sdi_comm.h usability... no checking sys/sdi_comm.h presence... no checking for sys/sdi_comm.h... no checking sys/passthrudef.h usability... no checking sys/passthrudef.h presence... no checking for sys/passthrudef.h... no checking for io/cam/cam.h... no checking for ntddscsi.h... no checking for ddk/ntddscsi.h... no checking for scsireq_enter in -lscsi... no checking for cam_open_device in -lcam... no checking for scsireq_enter... no checking for sg_header.target_status in <scsi/sg.h>... yes scsi buffersize: 131072 checking whether to enable IPv6... yes checking whether struct sockaddr_storage has an ss_family member... yes configure: Manually selected backends: canon genesys net *** pnm backend not manually selected - disabling checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating lib/Makefile config.status: creating sanei/Makefile config.status: creating frontend/Makefile config.status: creating japi/Makefile config.status: creating backend/Makefile config.status: creating include/Makefile config.status: creating doc/Makefile config.status: creating po/Makefile.in config.status: creating testsuite/Makefile config.status: creating testsuite/backend/Makefile config.status: creating testsuite/backend/genesys/Makefile config.status: creating testsuite/sanei/Makefile config.status: creating testsuite/tools/Makefile config.status: creating tools/Makefile config.status: creating doc/doxygen-sanei.conf config.status: creating doc/doxygen-genesys.conf config.status: creating tools/sane-config config.status: creating tools/sane-backends.pc config.status: creating include/sane/config.h config.status: executing depfiles commands config.status: executing libtool commands config.status: executing po-directories commands config.status: creating po/POTFILES config.status: creating po/Makefile config.status: executing include/_stdint.h commands config.status: creating include/_stdint.h : _SANE_BACKENDS_INCLUDE__STDINT_H -> Variables used for compilation/linking: AM_CPPFLAGS=" -D_REENTRANT -DPATH_SANE_CONFIG_DIR=$(configdir) -DPATH_SANE_DATA_DIR=$(datadir) -DPATH_SANE_LOCK_DIR=$(locksanedir) -DV_MAJOR=1 -DV_MINOR=0" AM_CFLAGS=" -Wall -Wextra -pedantic" AM_CXXFLAGS=" -Wall -Wextra -pedantic" AM_LDFLAGS="" LIBS="" -> Installation directories: Configuration: /usr/local/etc Libraries: /usr/local/lib Binaries: /usr/local/bin and /usr/local/sbin Manpages: /usr/local/share/man Documentation: /usr/local/share/doc/sane-backends Lockfiles: Feature is disabled! -> Network parameters: Build saned: yes IPv6 support: yes Avahi support: no cURL support: no POPPLER_GLIB support: no SNMP support: no -> The following backends will be built: canon genesys net -> The following preload backends will be built: *** Warning: An old version of SANE was detected but the sane-config program *** couldn't be found. If you encounter any problems with SANE remove the old *** SANE files and reinstall this version. **************************************************************** * Please be sure to read file PROBLEMS in this directory * * BEFORE running any of the SANE applications. Some devices * * may be damaged by improper operation, so please do heed this * * advice. * ****************************************************************