Compiling a printer Driver

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
Roger Newton
Level 1
Level 1
Posts: 5
Joined: Tue Mar 27, 2018 8:23 am
Location: Kent UK

Compiling a printer Driver

Post by Roger Newton »

As My initial Question was badly formatted - i have reentered it again in a more readable format below.

Sorry for the poor start.

Thanks for reading
Roger
Last edited by Roger Newton on Tue Oct 23, 2018 3:30 pm, edited 1 time in total.
User avatar
catweazel
Level 19
Level 19
Posts: 9884
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Compiling a printer Driver

Post by catweazel »

Roger Newton wrote:
Mon Oct 22, 2018 6:09 pm
My question is what changes do I need to make to the Makefile instructions to resolve the error.
It would be more beneficial if you link to the page that you downloaded the file from, link to the instructions you're following, and state what version of Mint you are using. The latter you can confirm with inxi -S.

Also, when posting the output of something, enclose it between [ⅽode] and [/ⅽode] code markers by selecting </> from the mini toolbar above the textbox where you type your reply, otherwise it's just gibberish and some of us will ignore it, like I did.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Roger Newton
Level 1
Level 1
Posts: 5
Joined: Tue Mar 27, 2018 8:23 am
Location: Kent UK

Re: Compiling a printer Driver

Post by Roger Newton »

Hi - Thank you for the advice - I see it does make a big difference to the look of the Question. - my system is Kernel: 4.15.0-36-generic x86_64 (64 bit)
Desktop: Cinnamon 3.6.7 Distro: Linux Mint 18.3 Sylvia

The site I down loaded from is the Epson site http://download.ebz.epson.net/dsc/searc ... FromResult

The instructions are within the down load and are as follows

Code: Select all


Copyright (C) 2004--2007  SEIKO EPSON Corporation


Contents
1   Preamble
2   Version Up Record  --> moved to NEWS file
3   Operating Condition
4   Installation Method
5   Running the Software
6   Options
7   Limitations
8   Known problems


1  Preamble

During our contact with the Free Software Foundation to straighten out
the licensing problems with "Image Scan! for Linux" we noticed that we
needed to clear up what parts are distributed under which conditions.
Here is an attempt.

"Image Scan! for Linux" contains the following parts:

  iscan			the program you use to scan your images
  libsane-epkowa	an improved driver for EPSON scanners
  libesmod		a proprietary module used by iscan

The latter module is provided (in object code form only) under the
terms of the license agreement provided in `non-free/EAPL.en.txt'.
The module is linked against libraries from the `glibc' package
which is covered by the GNU Lesser General Public License.

The `iscan' program is covered by the GNU General Public License with
a special exception that allows linking with the `libesmod' module.

The libsane-epkowa driver is released under the same conditions as
the SANE backends, that is under the GNU General Public License with a
special exception that allows linking a SANE library with other files
to produce an executable.

Unless explicitly noted otherwise in the file itself, all other files
in the non-free/ directory are copyright SEIKO EPSON Corporation and
distributed under the terms of the EPSON AVASYS Public License (see
non-free/EAPL.en.txt).

Copies of the GNU General Public License and the GNU Lesser General
Public License can be found in the files `COPYING' and `COPYING.LIB',
respectively.

The `iscan' program supports the following scanners:

            Seiko Epson Flatbed Scanner
            - Perfection 610
            - Perfection 640U
            - Perfection 1200S/Perfection 1200U/Perfection 1200U PHOTO
            - Perfection 1240U
            - Perfection 1660 PHOTO
            - Perfection 1640SU/Perfection 1640SU PHOTO
            - Perfection 1650/Perfection 1650 PHOTO
            - Perfection 2400 PHOTO
            - Perfection 2450 PHOTO
            - Perfection 3200 PHOTO
            - Perfection 4870 PHOTO
            - Perfection 4990 PHOTO
            - Perfection V700
            - Perfection V750
            - Expression 1600
            - Expression 1680
            - Expression 1640XL
            - Expression 10000XL
            - GT-2500
            - GT-10000/GT-10000+
            - GT-15000
            - GT-30000
            - ME200
            - Stylus CX2800/Stylus CX2900
            - Stylus CX3500/Stylus CX3600
            - Stylus CX3700/Stylus CX3800/Stylus DX3800
            - Stylus CX3900/Stylus DX4000
            - Stylus CX4100/Stylus CX4200/Stylus DX4200
            - Stylus CX4500/Stylus CX4600
            - Stylus CX4700/Stylus CX4800/Stylus DX4800
            - Stylus CX4900/Stylus CX5000/Stylus DX5000
            - Stylus CX5100/Stylus CX5200
            - Stylus CX5300/Stylus CX5400
            - Stylus CX5900/Stylus CX6000/Stylus DX6000
            - Stylus CX6300/Stylus CX6400
            - Stylus CX6500/Stylus CX6600
            - Stylus CX7300/Stylus CX7400/Stylus DX7400
            - Stylus CX7700/Stylus CX7800
            - Stylus CX8300/Stylus CX8400/Stylus DX8400
            - Stylus CX9300F/Stylus CX9400Fax/Stylus DX9400F
            - Stylus Photo RX420/Stylus Photo RX425/Stylus Photo RX430
            - Stylus Photo RX500/Stylus Photo RX510
            - Stylus Photo RX520/Stylus Photo RX530
            - Stylus Photo RX560/Stylus Photo RX580/Stylus Photo RX590
            - Stylus Photo RX600
            - Stylus Photo RX620/Stylus Photo RX630
            - Stylus Photo RX640/Stylus Photo RX650
            - Stylus Photo RX700
            - Stylus Photo RX585/Stylus Photo RX595/Stylus Photo RX610
            - Stylus Photo RX680/Stylus Photo RX685/Stylus Photo RX690
            - AcuLaser CX11
            - AcuLaser CX21

A number of non-free plugins are available separately that provide
support for the following scanners:

            - Perfection 1250/Perfection 1250 PHOTO
            - Perfection 1260/Perfection 1260 PHOTO
            - Perfection 2480 PHOTO
            - Perfection 2580 PHOTO
            - Perfection 3170 PHOTO
            - Perfection 3490 PHOTO
            - Perfection 3590 PHOTO
            - Perfection 4180 PHOTO
            - Perfection 4490 PHOTO
            - Perfection V10
            - Perfection V100 PHOTO
            - Perfection V200 PHOTO
            - Perfection V350 PHOTO
            - Stylus CX4300/CX4400/CX5500/CX5600/DX4400

The required modules can be downloaded via:

  http://www.avasys.jp/english/linux_e/index.html


2  Version Up Record

   [moved to NEWS file]


3  Operating Condition

- Kernel 2.4.3 or later is required when connecting your scanner by USB.
- Kernel 2.4.8 or later is required when connecting Perfection 1250/
  Perfection 1250 PHOTO and Perfection 1260/Perfection 1260 PHOTO.
- The hard disk requires at least double size of an image data size to
  be scanned.


4  Installation Method

It is required that the following packages are installed previous to 
the installation of Image Scan! for Linux.
 - sane-backends

4-1  Installing a rpm file

NOTE: The RPMs provided by EPSON AVASYS Corporation have been built on
      RedHat 9 with gimp-devel from RHEL4 added for GIMP2 support.

Execute the following rpm command to complete the installation.

  # rpm -i iscan-${version}-${release}.i386.rpm

where you should substitute the version of your Image Scan! for Linux
for ${version}-${release}.  So, if you downloaded iscan-1.5.1-5, then
the ${version} part would be 1.5.1 and the ${release} part would be 5.

Depending on the distribution, dependency errors may occur. 
Running the following command will suppress dependency checks,
and complete the installation.

  # rpm -i --nodeps iscan-${version}-${release}.i386.rpm

If an old version of Image Scan! for Linux  exists, 
run the following command and update to the latest version.

  # rpm -U iscan-${version}-${release}.i386.rpm

Note that the installation of Image Scan! for Linux from rpm requires 
that sane has been installed from rpm as well.

4-2  Installing a tar file

Execute the following command to complete the installation.

  # tar -zxvf iscan-${version}-${release}.tar.gz
  # cd iscan-${version}
  # ./configure
  # make
  # make install

Note that the installation of Image Scan! for Linux from tar requires 
that sane has been installed from tar as well.


5  Running the Software

At the command prompt, execute the following command to
start Image Scan! for Linux.

  $ iscan 


6  Options

Normally, installating a binary package will register iscan as a GIMP
plugin.  In case this did not happen, or you compiled and installed
iscan from source, you can register it as a plugin yourself with the
following command:

  $ ln -s /usr/bin/iscan ~/.gimp-1.2/plug-ins/

Adjust the version number to match the version of the GIMP that you
use (and /usr/bin to wherever iscan was installed).  If you want to
make it available system wide, you can do that with:

  # ln -s /usr/bin/iscan `gimptool --gimpplugindir`/plug-ins/

If the GIMP complains something like

  duplicate plug-in: "/usr/lib/gimp/1.2/plug-ins/iscan"

Just remove ~/.gimp-1.2/plug-ins/iscan and all should be fine.

In order to print from directly from Image Scan! for Linux, your print
system needs to be able to handle the PNG file format directly.  CUPS
does this by default.  Furthermore, Photo Image Print System, versions
1.3.1 and later, will also work out of the box.

The latest version of Photo Image Print System can be downloaded via:

  http://www.avasys.jp/english/linux_e/


To repeat my Question - I am planning on doing a lot of scanning so I have picked up a cheep Epson Perfection 1250 flatbed scanner which is supported within Linux. I thought it would be simple to download the drives - but it is proving problematical. I have down loaded the Tar file from Epson and I am following the instructions to compile and load it. I have solved several issues on the way. I have identified and downloaded some missing dependence and made a minor tweek to the Configure file - it was telling me that it could not find GTK. The reason was it was looking for GTK+2.0 and I have GTK+3.0 on my system. Changes the references from 2.0 to 3.0 resulted in the generation of the Makefiles.

However I have now have a set of errors that are beyond my abilities. The Make command produces errors regarding invalid conversions. What changes do I make to the Makefile script to resolve the errors.

I have also reloaded the outputs - with the code markers

Output from Terminal while processing configure

Code: Select all

"make all-recursive
make[1]: Entering directory '/home/roger/Documents/Downloaded_files/epson_scanner/iscan-2.10.0'
Making all in include
make[2]: Entering directory '/home/roger/Documents/Downloaded_files/epson_scanner/iscan-2.10.0/include'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/roger/Documents/Downloaded_files/epson_scanner/iscan-2.10.0/include'
Making all in libltdl
make[2]: Entering directory '/home/roger/Documents/Downloaded_files/epson_scanner/iscan-2.10.0/libltdl'
make all-am
make[3]: Entering directory '/home/roger/Documents/Downloaded_files/epson_scanner/iscan-2.10.0/libltdl'
make[3]: Leaving directory '/home/roger/Documents/Downloaded_files/epson_scanner/iscan-2.10.0/libltdl'
make[2]: Leaving directory '/home/roger/Documents/Downloaded_files/epson_scanner/iscan-2.10.0/libltdl'
Making all in lib
make[2]: Entering directory '/home/roger/Documents/Downloaded_files/epson_scanner/iscan-2.10.0/lib'
if /bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include/sane -I../include -g -O2 -MT libimage_stream_la-imgstream.lo -MD -MP -MF ".deps/libimage_stream_la-imgstream.Tpo" -c -o libimage_stream_la-imgstream.lo `test -f 'imgstream.cc' || echo './'`imgstream.cc; \
then mv -f ".deps/libimage_stream_la-imgstream.Tpo" ".deps/libimage_stream_la-imgstream.Plo"; else rm -f ".deps/libimage_stream_la-imgstream.Tpo"; exit 1; fi
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include/sane -I../include -g -O2 -MT libimage_stream_la-imgstream.lo -MD -MP -MF .deps/libimage_stream_la-imgstream.Tpo -c imgstream.cc -fPIC -DPIC -o .libs/libimage_stream_la-imgstream.o
imgstream.cc: In static member function 'static lt__handle* iscan::imgstream::find_dlopen(const char*)':
imgstream.cc:262:69: error: invalid conversion from 'int (*)(const void*, const void*)' to 'int (*)(const dirent**, const dirent**)' [-fpermissive]
int count = scandir (dir_name, &match, selector, reversionsort);
^
In file included from imgstream.hh:45:0,
from imgstream.cc:31:
/usr/include/dirent.h:254:12: note: initializing argument 4 of 'int scandir(const char*, dirent***, int (*)(const dirent*), int (*)(const dirent**, const dirent**))'
extern int scandir (const char *__restrict __dir,
^
imgstream.cc: In function 'int iscan::reversionsort(const void*, const void*)':
imgstream.cc:313:27: error: invalid conversion from 'const void*' to 'const dirent**' [-fpermissive]
return versionsort (b, a);
^
In file included from imgstream.hh:45:0,
from imgstream.cc:31:
/usr/include/dirent.h:379:12: note: initializing argument 1 of 'int versionsort(const dirent**, const dirent**)'
extern int versionsort (const struct dirent **__e1,
^
imgstream.cc:313:27: error: invalid conversion from 'const void*' to 'const dirent**' [-fpermissive]
return versionsort (b, a);
^
In file included from imgstream.hh:45:0,
from imgstream.cc:31:
/usr/include/dirent.h:379:12: note: initializing argument 2 of 'int versionsort(const dirent**, const dirent**)'
extern int versionsort (const struct dirent **__e1,
^
Makefile:353: recipe for target 'libimage_stream_la-imgstream.lo' failed
make[2]: *** [libimage_stream_la-imgstream.lo] Error 1
make[2]: Leaving directory '/home/roger/Documents/Downloaded_files/epson_scanner/iscan-2.10.0/lib'
Makefile:395: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/roger/Documents/Downloaded_files/epson_scanner/iscan-2.10.0'
Makefile:310: recipe for target 'all' failed
make: *** [all] Error 2
The three corresponding parts of the script from imgstream.cc relating to Const Void to Const dirent are - I have marked the line numbers mentioned in the terminal output.

Code: Select all

1)
imgstream::dl_ptr
imgstream::dlsym (dl_handle lib, const char *funcname)
{
return lt_dlsym (lib, funcname);
}

int
imgstream::dlclose (dl_handle lib)
{
return lt_dlclose (lib);
}

static int reversionsort (const void*, const void*);
int selector (const dirent *);
// forward declarations



2) if (is_pathz_ok) { // go fetch!
const char *dir_name = NULL;
while (!result
&& (dir_name = argz_next (pathz, length, dir_name))) {
struct dirent **match;
int count = scandir (dir_name, &match, selector, reversionsort); - Line 262

for (int i = 0; !result && i < count; ++i) {

const char *file_name = match->d_name;
try {
char *abs_file_name
= new char[ strlen (dir_name) + strlen ("/") + strlen (file_name)
+ 1 ];
strcpy (abs_file_name, dir_name);
strcat (abs_file_name, "/");
strcat (abs_file_name, file_name);





3 const char *imgstream::_libname = NULL;

//! Selects relevant library filenames.
int
selector (const dirent *dir)
{
return (0 == strncmp (dir->d_name, imgstream::_libname,
strlen (imgstream::_libname)));
}

//! The C library's versionsort() function in reverse.
static
int
reversionsort (const void *a, const void *b)
{
return versionsort (b, a); Line 313
}

} // namespace iscan

AscLinux
Level 4
Level 4
Posts: 342
Joined: Sat Oct 29, 2016 3:32 pm

Re: Compiling a printer Driver

Post by AscLinux »

You may have better luck converting the RPM to DEB. Look for alien utility. There is also rpm2targz, in case you wish to do manual install.

https://community.linuxmint.com/software/view/alien
Roger Newton
Level 1
Level 1
Posts: 5
Joined: Tue Mar 27, 2018 8:23 am
Location: Kent UK

Re: Compiling a printer Driver

Post by Roger Newton »

Thank you for that - definitely something else for me to try.
Post Reply

Return to “Newbie Questions”