rastertotpcl
rastertotpcl copied to clipboard
ubuntu 12.04 installation
I tried to install rastertotpcl to xubuntu 12.04, but I got errors when I run make:
make[1]: Entering directory /home/m2pagmar/TEC/rastertotpcl-master/src' cc -lcupsimage rastertotpcl.c -o rastertotpcl /tmp/ccvL5Vos.o: In function
Setup':
rastertotpcl.c:(.text+0x5f): undefined reference to ppdFindMarkedChoice' rastertotpcl.c:(.text+0x11a): undefined reference to
ppdFindMarkedChoice'
......
......
Here is the log from my terminal.
Thanks in advance for your help.
Marco
m2pagmar@mpag-hp:~$ sudo apt-get install libcupsimage2-dev
[sudo] password for m2pagmar:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libstlport4.6ldbl linux-headers-3.2.0-29-generic linux-headers-3.2.0-29
libreoffice-emailmerge mythes-en-au openoffice.org-hyphenation hyphen-en-us
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
comerr-dev krb5-multidev libcups2-dev libgcrypt11 libgcrypt11-dev
libgnutls-dev libgnutls-openssl27 libgnutlsxx27 libgpg-error-dev libgssrpc4
libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev libkadm5clnt-mit8
libkadm5srv-mit8 libkdb5-6 libkrb5-dev libp11-kit-dev libtasn1-3-dev
libtiff4-dev libtiffxx0c2
Suggested packages:
krb5-doc rng-tools libgcrypt11-doc gnutls-doc gnutls-bin krb5-user
The following NEW packages will be installed:
comerr-dev krb5-multidev libcups2-dev libcupsimage2-dev libgcrypt11-dev
libgnutls-dev libgnutls-openssl27 libgnutlsxx27 libgpg-error-dev libgssrpc4
libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev libkadm5clnt-mit8
libkadm5srv-mit8 libkdb5-6 libkrb5-dev libp11-kit-dev libtasn1-3-dev
libtiff4-dev libtiffxx0c2
The following packages will be upgraded:
libgcrypt11
1 upgraded, 21 newly installed, 0 to remove and 113 not upgraded.
Need to get 3,014 kB of archives.
After this operation, 9,482 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://it.archive.ubuntu.com/ubuntu/ precise-updates/main libgcrypt11 i386 1.5.0-3ubuntu0.2 [281 kB]
Get:2 http://it.archive.ubuntu.com/ubuntu/ precise-updates/main libgssrpc4 i386 1.10+dfsg~beta1-2ubuntu0.3 [57.7 kB]
Get:3 http://it.archive.ubuntu.com/ubuntu/ precise-updates/main libkadm5clnt-mit8 i386 1.10+dfsg~beta1-2ubuntu0.3 [38.4 kB]
Get:4 http://it.archive.ubuntu.com/ubuntu/ precise-updates/main libkdb5-6 i386 1.10+dfsg~beta1-2ubuntu0.3 [37.7 kB]
Get:5 http://it.archive.ubuntu.com/ubuntu/ precise-updates/main libkadm5srv-mit8 i386 1.10+dfsg~beta1-2ubuntu0.3 [54.5 kB]
Get:6 http://it.archive.ubuntu.com/ubuntu/ precise-updates/main libgnutls-openssl27 i386 2.12.14-5ubuntu3.4 [21.6 kB]
Get:7 http://it.archive.ubuntu.com/ubuntu/ precise-updates/main libtiffxx0c2 i386 3.9.5-2ubuntu1.5 [6,768 B]
Get:8 http://it.archive.ubuntu.com/ubuntu/ precise-updates/main libgnutlsxx27 i386 2.12.14-5ubuntu3.4 [23.4 kB]
Get:9 http://it.archive.ubuntu.com/ubuntu/ precise/main comerr-dev i386 2.1-1.42-1ubuntu2 [42.4 kB]
Get:10 http://it.archive.ubuntu.com/ubuntu/ precise-updates/main krb5-multidev i386 1.10+dfsg~beta1-2ubuntu0.3 [125 kB]
Get:11 http://it.archive.ubuntu.com/ubuntu/ precise/main libgpg-error-dev i386 1.10-2ubuntu1 [23.1 kB]
Get:12 http://it.archive.ubuntu.com/ubuntu/ precise-updates/main libgcrypt11-dev i386 1.5.0-3ubuntu0.2 [361 kB]
Get:13 http://it.archive.ubuntu.com/ubuntu/ precise-updates/main libtasn1-3-dev i386 2.10-1ubuntu1.1 [355 kB]
Get:14 http://it.archive.ubuntu.com/ubuntu/ precise/main libp11-kit-dev i386 0.12-2ubuntu1 [45.6 kB]
Get:15 http://it.archive.ubuntu.com/ubuntu/ precise-updates/main libgnutls-dev i386 2.12.14-5ubuntu3.4 [530 kB]
Get:16 http://it.archive.ubuntu.com/ubuntu/ precise-updates/main libkrb5-dev i386 1.10+dfsg~beta1-2ubuntu0.3 [11.0 kB]
Get:17 http://it.archive.ubuntu.com/ubuntu/ precise-updates/main libcups2-dev i386 1.5.3-0ubuntu8 [239 kB]
Get:18 http://it.archive.ubuntu.com/ubuntu/ precise-updates/main libjpeg-turbo8-dev i386 1.1.90+svn733-0ubuntu4.1 [414 kB]
Get:19 http://it.archive.ubuntu.com/ubuntu/ precise/main libjpeg8-dev i386 8c-2ubuntu7 [1,544 B]
Get:20 http://it.archive.ubuntu.com/ubuntu/ precise/main libjpeg-dev all 8c-2ubuntu7 [1,536 B]
Get:21 http://it.archive.ubuntu.com/ubuntu/ precise-updates/main libtiff4-dev i386 3.9.5-2ubuntu1.5 [277 kB]
Get:22 http://it.archive.ubuntu.com/ubuntu/ precise-updates/main libcupsimage2-dev i386 1.5.3-0ubuntu8 [65.9 kB]
Fetched 3,014 kB in 4s (636 kB/s)
(Reading database ... 438977 files and directories currently installed.)
Preparing to replace libgcrypt11 1.5.0-3ubuntu0.1 (using .../libgcrypt11_1.5.0-3ubuntu0.2_i386.deb) ...
Unpacking replacement libgcrypt11 ...
Selecting previously unselected package libgssrpc4.
Unpacking libgssrpc4 (from .../libgssrpc4_1.10+dfsg~beta1-2ubuntu0.3_i386.deb) ...
Selecting previously unselected package libkadm5clnt-mit8.
Unpacking libkadm5clnt-mit8 (from .../libkadm5clnt-mit8_1.10+dfsg~beta1-2ubuntu0.3_i386.deb) ...
Selecting previously unselected package libkdb5-6.
Unpacking libkdb5-6 (from .../libkdb5-6_1.10+dfsg~beta1-2ubuntu0.3_i386.deb) ...
Selecting previously unselected package libkadm5srv-mit8.
Unpacking libkadm5srv-mit8 (from .../libkadm5srv-mit8_1.10+dfsg~beta1-2ubuntu0.3_i386.deb) ...
Selecting previously unselected package libgnutls-openssl27.
Unpacking libgnutls-openssl27 (from .../libgnutls-openssl27_2.12.14-5ubuntu3.4_i386.deb) ...
Selecting previously unselected package libtiffxx0c2.
Unpacking libtiffxx0c2 (from .../libtiffxx0c2_3.9.5-2ubuntu1.5_i386.deb) ...
Selecting previously unselected package libgnutlsxx27.
Unpacking libgnutlsxx27 (from .../libgnutlsxx27_2.12.14-5ubuntu3.4_i386.deb) ...
Selecting previously unselected package comerr-dev.
Unpacking comerr-dev (from .../comerr-dev_2.1-1.42-1ubuntu2_i386.deb) ...
Selecting previously unselected package krb5-multidev.
Unpacking krb5-multidev (from .../krb5-multidev_1.10+dfsg~beta1-2ubuntu0.3_i386.deb) ...
Selecting previously unselected package libgpg-error-dev.
Unpacking libgpg-error-dev (from .../libgpg-error-dev_1.10-2ubuntu1_i386.deb) ...
Selecting previously unselected package libgcrypt11-dev.
Unpacking libgcrypt11-dev (from .../libgcrypt11-dev_1.5.0-3ubuntu0.2_i386.deb) ...
Selecting previously unselected package libtasn1-3-dev.
Unpacking libtasn1-3-dev (from .../libtasn1-3-dev_2.10-1ubuntu1.1_i386.deb) ...
Selecting previously unselected package libp11-kit-dev.
Unpacking libp11-kit-dev (from .../libp11-kit-dev_0.12-2ubuntu1_i386.deb) ...
Selecting previously unselected package libgnutls-dev.
Unpacking libgnutls-dev (from .../libgnutls-dev_2.12.14-5ubuntu3.4_i386.deb) ...
Selecting previously unselected package libkrb5-dev.
Unpacking libkrb5-dev (from .../libkrb5-dev_1.10+dfsg~beta1-2ubuntu0.3_i386.deb) ...
Selecting previously unselected package libcups2-dev.
Unpacking libcups2-dev (from .../libcups2-dev_1.5.3-0ubuntu8_i386.deb) ...
Selecting previously unselected package libjpeg-turbo8-dev.
Unpacking libjpeg-turbo8-dev (from .../libjpeg-turbo8-dev_1.1.90+svn733-0ubuntu4.1_i386.deb) ...
Selecting previously unselected package libjpeg8-dev.
Unpacking libjpeg8-dev (from .../libjpeg8-dev_8c-2ubuntu7_i386.deb) ...
Selecting previously unselected package libjpeg-dev.
Unpacking libjpeg-dev (from .../libjpeg-dev_8c-2ubuntu7_all.deb) ...
Selecting previously unselected package libtiff4-dev.
Unpacking libtiff4-dev (from .../libtiff4-dev_3.9.5-2ubuntu1.5_i386.deb) ...
Selecting previously unselected package libcupsimage2-dev.
Unpacking libcupsimage2-dev (from .../libcupsimage2-dev_1.5.3-0ubuntu8_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for doc-base ...
Processing 2 added doc-base files...
Registering documents with scrollkeeper...
Processing triggers for install-info ...
Setting up libgcrypt11 (1.5.0-3ubuntu0.2) ...
Setting up libgssrpc4 (1.10+dfsg~beta1-2ubuntu0.3) ...
Setting up libkadm5clnt-mit8 (1.10+dfsg~beta1-2ubuntu0.3) ...
Setting up libkdb5-6 (1.10+dfsg~beta1-2ubuntu0.3) ...
Setting up libkadm5srv-mit8 (1.10+dfsg~beta1-2ubuntu0.3) ...
Setting up libgnutls-openssl27 (2.12.14-5ubuntu3.4) ...
Setting up libtiffxx0c2 (3.9.5-2ubuntu1.5) ...
Setting up libgnutlsxx27 (2.12.14-5ubuntu3.4) ...
Setting up comerr-dev (2.1-1.42-1ubuntu2) ...
Setting up krb5-multidev (1.10+dfsg~beta1-2ubuntu0.3) ...
Setting up libgpg-error-dev (1.10-2ubuntu1) ...
Setting up libgcrypt11-dev (1.5.0-3ubuntu0.2) ...
Setting up libtasn1-3-dev (2.10-1ubuntu1.1) ...
Setting up libp11-kit-dev (0.12-2ubuntu1) ...
Setting up libgnutls-dev (2.12.14-5ubuntu3.4) ...
Setting up libkrb5-dev (1.10+dfsg~beta1-2ubuntu0.3) ...
Setting up libcups2-dev (1.5.3-0ubuntu8) ...
Setting up libjpeg-turbo8-dev (1.1.90+svn733-0ubuntu4.1) ...
Setting up libjpeg8-dev (8c-2ubuntu7) ...
Setting up libjpeg-dev (8c-2ubuntu7) ...
Setting up libtiff4-dev (3.9.5-2ubuntu1.5) ...
Setting up libcupsimage2-dev (1.5.3-0ubuntu8) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
m2pagmar@mpag-hp:~$ cd /home/m2pagmar/TEC/rastertotpcl-master
m2pagmar@mpag-hp:~/TEC/rastertotpcl-master$ ls LICENSE Makefile po README.md src
m2pagmar@mpag-hp:~/TEC/rastertotpcl-master$ make
for d in src; do (cd $d; make all); done
make[1]: Entering directory /home/m2pagmar/TEC/rastertotpcl-master/src' cc -lcupsimage rastertotpcl.c -o rastertotpcl /tmp/ccvL5Vos.o: In function
Setup':
rastertotpcl.c:(.text+0x5f): undefined reference to ppdFindMarkedChoice' rastertotpcl.c:(.text+0x11a): undefined reference to
ppdFindMarkedChoice'
rastertotpcl.c:(.text+0x145): undefined reference to ppdFindMarkedChoice' rastertotpcl.c:(.text+0x215): undefined reference to
ppdFindMarkedChoice'
rastertotpcl.c:(.text+0x240): undefined reference to ppdFindMarkedChoice' /tmp/ccvL5Vos.o:rastertotpcl.c:(.text+0x310): more undefined references to
ppdFindMarkedChoice' follow
/tmp/ccvL5Vos.o: In function EndPage': rastertotpcl.c:(.text+0xf8d): undefined reference to
ppdIsMarked'
rastertotpcl.c:(.text+0xfb8): undefined reference to ppdIsMarked' rastertotpcl.c:(.text+0xfe0): undefined reference to
ppdIsMarked'
rastertotpcl.c:(.text+0x1008): undefined reference to ppdIsMarked' rastertotpcl.c:(.text+0x1030): undefined reference to
ppdIsMarked'
rastertotpcl.c:(.text+0x1075): undefined reference to ppdFindMarkedChoice' rastertotpcl.c:(.text+0x1188): undefined reference to
ppdFindMarkedChoice'
rastertotpcl.c:(.text+0x1309): undefined reference to ppdFindMarkedChoice' /tmp/ccvL5Vos.o: In function
TOPIXCompress':
rastertotpcl.c:(.text+0x14ce): undefined reference to ceil' /tmp/ccvL5Vos.o: In function
main':
rastertotpcl.c:(.text+0x1978): undefined reference to cupsRasterOpen' rastertotpcl.c:(.text+0x199d): undefined reference to
cupsParseOptions'
rastertotpcl.c:(.text+0x19b5): undefined reference to ppdOpenFile' rastertotpcl.c:(.text+0x19cc): undefined reference to
ppdMarkDefaults'
rastertotpcl.c:(.text+0x19e8): undefined reference to cupsMarkOptions' rastertotpcl.c:(.text+0x1af9): undefined reference to
cupsRasterReadPixels'
rastertotpcl.c:(.text+0x1b6e): undefined reference to cupsRasterReadHeader2' rastertotpcl.c:(.text+0x1b85): undefined reference to
cupsRasterClose'
rastertotpcl.c:(.text+0x1ba4): undefined reference to ppdClose' rastertotpcl.c:(.text+0x1bb8): undefined reference to
cupsFreeOptions'
collect2: ld returned 1 exit status
make[1]: *** [rastertotpcl] Error 1
make[1]: Leaving directory /home/m2pagmar/TEC/rastertotpcl-master/src' make: [all] Error 2 (ignored) m2pagmar@mpag-hp:~/TEC/rastertotpcl-master$ sudo make install for d in src; do (cd $d; make install); done make[1]: Entering directory
/home/m2pagmar/TEC/rastertotpcl-master/src'
if test ! -d /usr/share/ppd/rastertotpcl; then mkdir /usr/share/ppd/rastertotpcl; fi
cp ppd/* /usr/share/ppd/rastertotpcl
cp: cannot stat ppd/*': No such file or directory make[1]: *** [install] Error 1 make[1]: Leaving directory
/home/m2pagmar/TEC/rastertotpcl-master/src'
make: [install] Error 2 (ignored)
m2pagmar@mpag-hp:~/TEC/rastertotpcl-master$
This worked for me:
cd src
gcc -o rastertotpcl rastertotpcl.c cups-config --image --libs
so you can change the Makefile in the src directory as this:
EXEC=rastertotpcl
CFLAGS=cups-config --image --libs
PPDPATH=/usr/share/ppd
EXECPATH=/usr/lib/cups/filter
all: rastertotpcl ppd
.PHONY: ppd clean install uninstall
$(EXEC): rastertotpcl.c gcc -o $(EXEC) rastertotpcl.c $(CFLAGS)
ppd: ppdc tectpcl2.drv
install: if test ! -d $(PPDPATH)/$(EXEC); then mkdir $(PPDPATH)/$(EXEC); fi cp ppd/* $(PPDPATH)/$(EXEC) cp $(EXEC) $(EXECPATH)/
uninstall: rm -rf $(PPDPATH)/$(EXEC) rm -f $(EXECPATH)/$(EXEC)
clean: rm -f rastertotpcl rm -rf ppd
This also worked for me.
hi,
I tried to install rastertotpcl to kubuntu 14.04.3. I tried the solution change de makefile in src directory, but I got errors when I run make:
xavi@xavi-KDE:~/Desembolupament/P/rastertotpcl-master$ make
for d in src; do (cd $d; make all); done
make[1]: Entering directory /home/xavi/Desembolupament/P/rastertotpcl-master/src' Makefile:12: *** missing separator. Stop. make[1]: Leaving directory
/home/xavi/Desembolupament/P/rastertotpcl-master/src'
make: [all] Error 2 (ignored)
xavi@xavi-KDE:~/Desembolupament/P/rastertotpcl-master$
makefile:12 gcc -o $(EXEC) rastertotpcl.c $(CFLAGS)
Thanks in advance for your help
The file above is not formatted properly Make sure to indent the command lines with tabs. See http://www.gnu.org/software/make/manual/make.html#Rule-Syntax
Well, I can install the printer driver, thanks openbrian, but not print. I got error "PID 3213 (/usr/lib/cups/filter/rastertotpcl) stopped with status 108 (Exec format error)" in error_log file. Can help me please? Thanks.
You can try my makefile here: https://github.com/felicitus/rastertotpcl/blob/master/src/Makefile
I tried to install rastertotpcl to ubuntu 14.04.4. I tried the solution change de makefile in src directory, but I got errors when I run make:
for d in src; do (cd $d; make all); done make[1]: se ingresa al directorio «/home/luis/Descargas/rastertotpcl-master/src» gcc -Wall -Wextra --std=c99 -O2 -lm rastertotpcl.c -o rastertotpcl -lcupsimage -lcups rastertotpcl.c: In function ‘StartPage’: rastertotpcl.c:292:3: warning: too many arguments for format [-Wformat-extra-args] printf("{D%04d,%04d,%04d|}\n",labelpitch, width, length, (width + labelgap)); ^ rastertotpcl.c: In function ‘EndPage’: rastertotpcl.c:430:16: warning: variable ‘Temp’ set but not used [-Wunused-but-set-variable] char Temp; / Temporary string / ^ rastertotpcl.c:429:15: warning: variable ‘Quant’ set but not used [-Wunused-but-set-variable] int Quant; / Quantity to print / ^ rastertotpcl.c: In function ‘TOPIXCompress’: rastertotpcl.c:680:3: warning: missing braces around initializer [-Wmissing-braces] unsigned char line[8][9][9] = {0}; / Current line / ^ rastertotpcl.c:680:3: warning: (near initialization for ‘line[0]’) [-Wmissing-braces] rastertotpcl.c: In function ‘TOPIXCompressOutputBuffer’: rastertotpcl.c:764:53: warning: unused parameter ‘ppd’ [-Wunused-parameter] void TOPIXCompressOutputBuffer(ppd_file_t *ppd, / PPD file / ^ rastertotpcl.c: In function ‘main’: rastertotpcl.c:895:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (y = 0; y < header.cupsHeight && !Canceled; y++) ^ /usr/bin/ld: /tmp/cc5iCeFJ.o: referencia sin definir al símbolo 'ceil@@GLIBC_2.0' /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/libm.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[1]: ** [rastertotpcl] Error 1 make[1]: se sale del directorio «/home/luis/Descargas/rastertotpcl-master/src»
Can help me please? Thanks
You can try my makefile here: https://github.com/felicitus/rastertotpcl/blob/master/src/Makefile
@Drachenkaetzchen Didn't work on Raspbian 10 sadly.