You are not logged in.
From the build warning, I'd postulate that this is not 64bit clean; there were similar bad coding practices in the the epson-inkjet-printer-escpr code, now patched in the AUR.
Last edited by stronnag (2017-12-03 20:21:41)
Offline
Thank you for helping me out – really appreciated! I highly value this printer as it is a faithful tool.
Previously i only looked briefly at the PKGBUILD.
I've looked at it now and feel it's setup wrong.
[…]
edit
I still dislike the PKGBUILD, but the build system used is so old (automake 1.11 ) that those weird things appear to be necessary.
I'm tempted to suggest to setup a RHEL4 VM for printing (that's how old the build system feels) , but there hopefully will be a better solution.
I can't judge the quality of a PKGBUILD, far too deep waters…
The idea of keeping an entire VM at hand just for printing on a fairly standard printer (even one with Linux support by its manufacturer!) does really seem a little over the top. If at all possible, I would like to avoid going down this particular road.
If it still fails after reworking the PKGBUILD possibly try with --no-pie -fno-stack-protector as well as the old makepkg options.
I appended these options to the CFLAGS and CXXFLAGS variables in the makepkg.conf (the one from pacman-5.0.2-1). Was that correct?
The package builds at least, but the filter still crashes.
Last edited by Condor (2017-12-03 20:51:32)
Offline
Condor perhaps try epson-inkjet-printer-escpr it is listed as compatible with your printer.
Offline
While the 201106w driver hasn't been updated since 2012, the escpr driver appears to be maintained.
I agree with loqs, try that one first.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Condor perhaps try epson-inkjet-printer-escpr it is listed as compatible with your printer.
Thanks for the suggestion. No good :-(
When printing through this driver, the printer itself seems to crash and reset. All lights on it start blinking, and it will not respond to key presses. After turning it off and on again, volatile settings such as the date and time are reset. The printer then goes into a long loop of moving about the print head (presumably several nozzle checks/cleanings).
I would still like to test if the suggested changes (-no-pie -fno-stack-protector) to the build options work. Did I apply them correctly?
I appended these options to the CFLAGS and CXXFLAGS variables in the makepkg.conf (the one from pacman-5.0.2-1). Was that correct?
Offline
Yes that was correct. Please try this patch instead
diff --git a/src/pagemanager/pagemanager.c b/src/pagemanager/pagemanager.c
index 029e6d3..3c1f450 100644
--- a/src/pagemanager/pagemanager.c
+++ b/src/pagemanager/pagemanager.c
@@ -22,7 +22,7 @@
#include "epcgdef.h"
#include "debuglog.h"
#include "memory.h"
-#include "raster.h"
+#include "raster-helper.h"
#include "pagemanager.h"
extern int JobCanceled;
@@ -45,7 +45,7 @@ fetchRaster(EpsPageManager *pageManager)
int error = 0;
int did_fetch = 0;
int read_bytes = 0;
- int nraster;
+ size_t nraster;
while (error == 0 && did_fetch == 0 && JobCanceled == 0) {
eps_raster_fetch(privateData->raster_h, NULL, 0, 0, &status);
@@ -212,7 +212,7 @@ int pageManagerGetPageRegion(EpsPageManager *pageManager, EpsPageRegion *pageReg
return EPS_OK;
}
-int pageManagerGetRaster(EpsPageManager *pageManager, char *buf, int bufSize)
+size_t pageManagerGetRaster(EpsPageManager *pageManager, char *buf, int bufSize)
{
PageManagerPrivateData *privateData = NULL;
int error = EPS_OK;
diff --git a/src/pagemanager/pagemanager.h b/src/pagemanager/pagemanager.h
index 87fbbd5..c9743fb 100644
--- a/src/pagemanager/pagemanager.h
+++ b/src/pagemanager/pagemanager.h
@@ -31,7 +31,7 @@ extern "C"
#define EPS_ERROR -1
#define EPS_OK 0
-typedef int (*EpsRasterSource)(char *buf, int bufSize);
+typedef size_t (*EpsRasterSource)(char *buf, int bufSize);
typedef struct {
EpsRasterSource rasterSource;
@@ -47,7 +47,7 @@ typedef struct {
EpsPageManager* pageManagerCreate(EpsPageRegion pageRegion, EpsFilterPrintOption filterPrintOption, EpsRasterSource rasterSource);
void pageManagerDestroy(EpsPageManager *pageManager);
int pageManagerGetPageRegion(EpsPageManager *pageManager, EpsPageRegion *pageRegion);
-int pageManagerGetRaster(EpsPageManager *pageManager, char *buf, int bufSize);
+size_t pageManagerGetRaster(EpsPageManager *pageManager, char *buf, int bufSize);
int pageManagerIsNextPage(EpsPageManager *pageManager);
#ifdef __cplusplus
diff --git a/src/raster/raster.c b/src/raster/raster.c
index 7e4946b..dd5aef6 100644
--- a/src/raster/raster.c
+++ b/src/raster/raster.c
@@ -218,7 +218,7 @@ eps_raster_init (RASTER * handle, EpsRasterOpt * data, EpsRasterPipeline * pipel
/* if raster_p equals NULL means that it is need to flush a page. */
int
-eps_raster_print (RASTER handle, char * raster_p, int raster_bytes, int pixel_num, int * outraster)
+eps_raster_print (RASTER handle, char * raster_p, int raster_bytes, int pixel_num, size_t * outraster)
{
EpsRaster * raster = (EpsRaster *) handle;
EpsRasterPipeline * pipeline = NULL;
diff --git a/src/raster/raster.h b/src/raster/raster.h
index 9be0977..cc5054d 100644
--- a/src/raster/raster.h
+++ b/src/raster/raster.h
@@ -143,7 +143,7 @@ typedef enum {
} EpsRasterFetchStatus;
int eps_raster_init (RASTER *, EpsRasterOpt *, EpsRasterPipeline *);
-int eps_raster_print (RASTER, char *, int, int, int *);
+int eps_raster_print (RASTER, char *, int, int, size_t *);
int eps_raster_fetch (RASTER, char *, int, int, EpsRasterFetchStatus *);
int eps_raster_free (RASTER);
diff --git a/src/raster_to_epson.c b/src/raster_to_epson.c
index 6e621c8..a0811d6 100644
--- a/src/raster_to_epson.c
+++ b/src/raster_to_epson.c
@@ -33,7 +33,7 @@
#include <cups/ppd.h>
#include <cups/raster.h>
-#include "raster.h"
+#include "raster-helper.h"
#include "memory.h"
#include "raster_to_epson.h"
#include "pagemanager.h"
@@ -75,7 +75,7 @@ static int page_no = 0;
static int pageHeight = 0;
#endif
-int rasterSource(char *buf, int bufSize)
+size_t rasterSource(char *buf, int bufSize)
{
int readBytes = 0;
if (JobCanceled == 0) {
and PKGBUILD applying it
# Contributor: Andre Klitzing <andre () incubo () de>
pkgname=epson-inkjet-printer-201106w
_pkgname_filter=epson-inkjet-printer-filter
_suffix=1lsb3.2.src.rpm
pkgver=1.0.1
pkgrel=8
pkgdesc="Epson printer driver (ME Office 940FW / Stylus NX635, SX535WD / Stylus Office BX535WD, BX630FW, BX635FWD / WorkForce 545, 645)"
arch=('i686' 'x86_64')
url="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
license=('LGPL' 'custom:Epson Licence Agreement')
depends=('cups' 'ghostscript')
options=('debug' '!strip' '!buildflags')
#makedepends=('libtool' 'make' 'automake' 'autoconf')
source=(http://download.ebz.epson.net/dsc/op/stable/SRPMS/${pkgname}-${pkgver}-${_suffix}
epson-inkjet-printer-201106w.patch)
prepare() {
cd "$srcdir"
tar xzf $pkgname-$pkgver.tar.gz
FILTER_FILE=`ls $_pkgname_filter*.tar.gz`
tar xzf $FILTER_FILE
cd "${FILTER_FILE%.tar.gz}"
patch -p1 -i "$srcdir"/epson-inkjet-printer-201106w.patch
aclocal
libtoolize
chmod +x configure
# if you have runtime problems: add "--enable-debug" and look into /tmp/epson-inkjet-printer-filter.txt
./configure LDFLAGS="$LDFLAGS -Wl,--no-as-needed" --prefix=/opt/$pkgname --enable-debug
}
build() {
FILTER_FILE=`ls $_pkgname_filter*.tar.gz`
cd "${FILTER_FILE%.tar.gz}"
make
}
package() {
cd "$srcdir/$pkgname-$pkgver"
install -d "$pkgdir/opt/$pkgname/"
if [ "$CARCH" = "x86_64" ]; then
cp -a --no-preserve=mode lib64 "$pkgdir/opt/$pkgname/"
else
cp -a --no-preserve=mode lib "$pkgdir/opt/$pkgname/"
fi
cp -a --no-preserve=mode resource "$pkgdir/opt/$pkgname/"
if [ -e "watermark" ]; then
cp -a --no-preserve=mode watermark "$pkgdir/opt/$pkgname/"
fi
install -d "$pkgdir/usr/share/cups/model/$pkgname"
install -m 644 ppds/* "$pkgdir/usr/share/cups/model/$pkgname"
cd "$srcdir"
FILTER_FILE=`ls $_pkgname_filter*.tar.gz`
cd "${FILTER_FILE%.tar.gz}"
install -d "$pkgdir/opt/$pkgname/cups/lib/filter/"
install -m 755 src/epson_inkjet_printer_filter "$pkgdir/opt/$pkgname/cups/lib/filter/epson_inkjet_printer_filter"
}
sha256sums=('2f2af2f05b53195ffd1090ad4a3c3f43306b8b35e0747deea26bc600730f2ffa'
'85b0493972dcb92befd2bbf8d0ce705fc6280d54d83e985e9f7d0301bb01af50')
The patch fixes all the type conversion warnings and implicit declaration warnings.
Offline
loqs … awesome! That patch cures the crashing filter. Thank you!
Tests are still ongoing, I haven't tried more advanced settings like multiple pages per sheet thoroughly yet. But so far, all looks very promising.
I will look into it that the maintainer of the AUR package adds the patch and updates the PKGBUILD.
Offline
Further tests have shown no problems. All print options work!
Only one error remains: Each time when printing, a CUPS error message is displayed as popup on the desktop.
Printer Error
Printer 'EpsonStylus': 'cups-waiting-for-job-completed'.
As I sit right next to the printer, I can live with that and just look at the printer to see the progress.
Thanks again all for your help!
Offline