ear9mrn
Posts: 2
Joined: Mon Jul 29, 2019 2:04 pm

Compiling Canon printer driver?

Mon Jul 29, 2019 2:17 pm

I am trying to compile the canon printer drivers for use with my raspberry pi and CUPS and getting stuck. Any help would be appreciated

I downloaded the drivers from the canon website

https://www.canon-europe.com/support/co ... =en&os=all

[Linux] UFRII LT Printer Driver Ver.1.50

They have 32bit and 64bit deb and redhat packages already created but the deb packages are only for i386 and amd64 but no arm.

There is a source directory within the package so I am attempting to compile from source but it keeps failing.

Code: Select all

linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90 $ make gen  
With the following results...

Code: Select all

Now type `make' to compile.
make[1]: Entering directory '/home/pete/linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90/cngplp'
make  all-recursive
make[2]: Entering directory '/home/pete/linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90/cngplp'
Making all in po
make[3]: Entering directory '/home/pete/linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90/cngplp/po'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/pete/linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90/cngplp/po'
Making all in src
make[3]: Entering directory '/home/pete/linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90/cngplp/src'
/bin/bash ../libtool  --tag=CC   --mode=link gcc -O2 -Wall -g -O2 -rpath /usr/local/lib  -o cngplp main.o mainwnd.o printerinfo.o load.o options.o -lglade-2.0  -lcups
libtool: link: gcc -O2 -Wall -g -O2 -o cngplp main.o mainwnd.o printerinfo.o load.o options.o  -lglade-2.0 -lcups -Wl,-rpath -Wl,/usr/local/lib
/usr/bin/ld: main.o: undefined reference to symbol 'gtk_init'
//usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:445: recipe for target 'cngplp' failed
make[3]: *** [cngplp] Error 1
make[3]: Leaving directory '/home/pete/linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90/cngplp/src'
Makefile:421: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/pete/linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90/cngplp'
Makefile:353: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/pete/linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90/cngplp'
Makefile:24: recipe for target 'gen' failed
make: *** [gen] Error 1

Clearly there is something amiss with either gtk or x11... Could this be a missing library or dev package?

Any guidance or suggestion would be good.

Thanks,

Pete.

fruitoftheloom
Posts: 20769
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Compiling Canon printer driver?

Mon Jul 29, 2019 7:15 pm

ear9mrn wrote:
Mon Jul 29, 2019 2:17 pm
I am trying to compile the canon printer drivers for use with my raspberry pi and CUPS and getting stuck. Any help would be appreciated

I downloaded the drivers from the canon website

https://www.canon-europe.com/support/co ... =en&os=all

[Linux] UFRII LT Printer Driver Ver.1.50

They have 32bit and 64bit deb and redhat packages already created but the deb packages are only for i386 and amd64 but no arm.

There is a source directory within the package so I am attempting to compile from source but it keeps failing.

Code: Select all

linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90 $ make gen  
With the following results...

Code: Select all

Now type `make' to compile.
make[1]: Entering directory '/home/pete/linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90/cngplp'
make  all-recursive
make[2]: Entering directory '/home/pete/linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90/cngplp'
Making all in po
make[3]: Entering directory '/home/pete/linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90/cngplp/po'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/pete/linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90/cngplp/po'
Making all in src
make[3]: Entering directory '/home/pete/linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90/cngplp/src'
/bin/bash ../libtool  --tag=CC   --mode=link gcc -O2 -Wall -g -O2 -rpath /usr/local/lib  -o cngplp main.o mainwnd.o printerinfo.o load.o options.o -lglade-2.0  -lcups
libtool: link: gcc -O2 -Wall -g -O2 -o cngplp main.o mainwnd.o printerinfo.o load.o options.o  -lglade-2.0 -lcups -Wl,-rpath -Wl,/usr/local/lib
/usr/bin/ld: main.o: undefined reference to symbol 'gtk_init'
//usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:445: recipe for target 'cngplp' failed
make[3]: *** [cngplp] Error 1
make[3]: Leaving directory '/home/pete/linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90/cngplp/src'
Makefile:421: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/pete/linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90/cngplp'
Makefile:353: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/pete/linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90/cngplp'
Makefile:24: recipe for target 'gen' failed
make: *** [gen] Error 1

Clearly there is something amiss with either gtk or x11... Could this be a missing library or dev package?

Any guidance or suggestion would be good.

Thanks,

Pete.

Gutenprint support many printers:

http://gimp-print.sourceforge.net/
Retired disgracefully.....

ear9mrn
Posts: 2
Joined: Mon Jul 29, 2019 2:04 pm

Re: Compiling Canon printer driver?

Tue Jul 30, 2019 12:29 pm

many thanks, but sadly my printer is not supported

Mine is LBP6230dw
Canon GP 335
Canon LBP-4sx
Canon LBP-430
Canon LBP-1000
Canon LBP-1260
Canon LBP-1760
Canon LBP-3360
Canon LBP-5360
Canon LBP-5390
Canon imageRunner 330s
Canon imageRunner C2550

swampdog
Posts: 239
Joined: Fri Dec 04, 2015 11:22 am

Re: Compiling Canon printer driver?

Tue Jul 30, 2019 4:43 pm

Grgh! Libtool! Had no end of problems with that over the years!

I'm not going to fix the build but you can link it manually.. Run your "make gen" then once it fails..

Code: Select all

$ pwd
/wrk/linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90/cngplp/src

gcc -o cngplp main.o mainwnd.o printerinfo.o load.o options.o -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype  -lglade-2.0 -lgmodule-2.0 -lcups -Wl,-rpath -Wl,/usr/local/lib
..basically GLADE_PACKAGE_LIBS out of the generated Makefile (plus gmodule-2.0).

Yes. You were correct. Undefined symbols due to incorrect link.

Return to “C/C++”