Well, I did a re-emerge with that, and it works quite happily, so the problem is obviously to do with the service tools part and it not liking Gentoo.

I'm probably just going to run the printer in raw share, anyway, as all other computers on the network are Windows-based. Let them handle the complicated bits... the Gentoo box is just providing a central place to plug the printer in.

Comment #109 on 2011-11-10 in Gentoo Bugzilla Bug Report No. 130645 has the latest ebuild for the Canon MP560, including patches for CUPS 1.5.x and libpng 1.5.x. This used to build and work for me on my ~amd64 multilib installation. This week, after not printing for a couple of weeks, I wanted to print something and nothing printed. I assumed something had changed during the various world updates I have performed over the last few weeks so I attempted to re-merge the cnijfilter-3.20-r1 package (USE="amd64 -servicetools mp560" as usual) and got the following build failure:

I re-merged app-emulation/emul-linux-x86-bjdeps, app-emulation/emul-linux-x86-baselibs, app-emulation/emul-linux-x86-compat and app-emulation/emul-linux-x86-gtklibs just in case. But still the build for cnijfilter-3.20-r1 fails in the same place.

This problem looks similar to the 32-bit emulation problems in the early posts at the beginning of this thread, and also mentioned as "linking problems" in the Troubleshooting section of the Canon Pixma Series article in the Gentoo Linux Wiki.

Any ideas what I could try to get this package to build? Thanks in advance.

EDIT: In case it helps, here's the ebuild that produces the above error messages:

Code:

# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

Since my previous post I've been trying all sorts of hacks to that cnijfilter-3.20-r1 ebuild and to Canon's source code to get the ebuild to work, all to no avail. It does build on an x86 installation but not on an ~amd64 multilib installation.

This is one area where Windows beats Linux hands down. It's galling having to boot into Windows just to use my printer, especially since it used to work with Gentoo before recent updates.

Actually, the situation with the cnijfilter ebuilds is a mess. Gentoo developer Pacho Ramos' comment is an understatement. Over the years different people have taken Colin Kiegel's (ColinK) original ebuild and hacked it for different printer models. Without anyone controlling it, the number of different versions of the cnijfilter ebuild has increased when probably much of the model-specific code in them (which does not seem to be much, actually) could have been made conditional in a single, bigger ebuild. God help anyone who tries to rationalise/consolidate them. I doubt it will ever happen, it's just too messy.

Anyway, in despair I threw in the towel with the cnijfilter ebuild for ~amd64 and decided instead to hack the gutenprint-5.2.7-r1 ebuild to use Gutenprint's 5.2.8_pre1 source code released on 27 December last year. I'm no expert in ebuilds, but the hacked ebuild in my local overlay is reproduced below in case it helps anyone until a proper ebuild eventually gets into the Portage main tree. I couldn't get two of the three patches used in the 5.2.7-r1 ebuild to work with 5.2.8_pre1 (gutenprint-5.2.7-genppd.patch and gutenprint-5.2.7-stdio.patch) so I've commented them out. The package builds, and I was able to print a CUPS Test Page and a LibreOffice Writer document, but I have not tried anything else yet. Whichever paper tray I select in the CUPS Manager, the printer only wants to print using paper from the rear tray. Argghh. Anyway, here's the hacked gutenprint ebuild in case it helps someone avoid the two days of effort I've wasted trying to get the cnijfilter-3.20-r1 ebuild working.

EDIT (Fri Apr 27 17:10:02 BST 2012): I have now printed on my MP560 a multi-page double-sided document from Word 2007 under WINE and can confirm that the Gutenprint 5.2.8_pre1 driver produces a good result. However, the printing is much slower than the Canon driver installed using the cnijfilter-3.20-r1 ebuild (and, as I mentioned previously, the Gutenprint driver for some reason cannot make the printer use the paper Cassette instead of the rear tray). Still, at least I can print again._________________Clevo W230SS: amd64, OpenRC, Optimus.
Compal NBLB2: ~amd64, OpenRC, FGLRX, dual booting with Windows 7 Professional 64-bit.
KDE on both laptops.Fitzcarraldo's blog

Since my previous post I've been trying all sorts of hacks to that cnijfilter-3.20-r1 ebuild and to Canon's source code to get the ebuild to work, all to no avail. It does build on an x86 installation but not on an ~amd64 multilib installation.

Hi.
I run it, but i use cnijfilter-3.20-r3 and connect to the MP560 over wifi.
This has worked brilliant since 2010.
Regards // Jallee

I run it, but i use cnijfilter-3.20-r3 and connect to the MP560 over wifi.
This has worked brilliant since 2010.
Regards // Jallee

Thanks for replying. Yes, I was using cnijfilter-3.20-r3 on a ~x86 installation and on a ~amd64 multilib installtion last year (What to do if CUPS does not recognise MP560 as a printer) but, if I recall correctly, that ebuild didn't use patches for CUPS 1.5.x and libpng 1.5.x. The newer ebuild cnijfilter-3.20-r1 (lower release number: go figure!) in Comment #109 in Gentoo Bugzilla Bug Report No. 130645 includes patches for CUPS 1.5.x and libpng 1.5.x and supposedly works for ~amd64 multilib. Except it doesn't for me (see the "skipping incompatible" error messages in my penultimate post). I do still have a copy of the cnijfilter-3.20-r3 ebuild that used to work for me a year ago, but that doesn't build any more either on my ~amd64 installation. Could you please either post a link to the ebuild you're using or post the ebuild itself? Are you using CUPS 1.5.x and libpng 1.5.x in ~amd64 multilib? Or have you stuck to CUPS 1.4.8?_________________Clevo W230SS: amd64, OpenRC, Optimus.
Compal NBLB2: ~amd64, OpenRC, FGLRX, dual booting with Windows 7 Professional 64-bit.
KDE on both laptops.Fitzcarraldo's blog

Thanks for replying. Yes, I was using cnijfilter-3.20-r3 on a ~x86 installation and on a ~amd64 multilib installtion last year (What to do if CUPS does not recognise MP560 as a printer) but, if I recall correctly, that ebuild didn't use patches for CUPS 1.5.x and libpng 1.5.x. The newer ebuild cnijfilter-3.20-r1 (lower release number: go figure!) in Comment #109 in Gentoo Bugzilla Bug Report No. 130645 includes patches for CUPS 1.5.x and libpng 1.5.x and supposedly works for ~amd64 multilib. Except it doesn't for me (see the "skipping incompatible" error messages in my penultimate post). I do still have a copy of the cnijfilter-3.20-r3 ebuild that used to work for me a year ago, but that doesn't build any more either on my ~amd64 installation. Could you please either post a link to the ebuild you're using or post the ebuild itself? Are you using CUPS 1.5.x and libpng 1.5.x in ~amd64 multilib? Or have you stuck to CUPS 1.4.8?

Well i using net-print/cups-1.5.2-r20 and media-libs/libpng-1.5.10. Newer needed to pach anything to get it to work.
Regards // Jallee

^Sounds promising. Would you please post the cnijfilter-3.20-r3.ebuild that you are using, so that I can compare it with the cnijfilter-3.20-r3.ebuild that l was using? Just because they have the same file name does not guarantee they are identical._________________Clevo W230SS: amd64, OpenRC, Optimus.
Compal NBLB2: ~amd64, OpenRC, FGLRX, dual booting with Windows 7 Professional 64-bit.
KDE on both laptops.Fitzcarraldo's blog

^Sounds promising. Would you please post the cnijfilter-3.20-r3.ebuild that you are using, so that I can compare it with the cnijfilter-3.20-r3.ebuild that l was using? Just because they have the same file name does not guarantee they are identical.

Looks to me like the cnijfilter-3.20-r3.ebuild you installed back in October 2010 does not cater for CUPS 1.5.x (see the patch file use_ppd_header_file.patch that is applied in the newer cnijfilter-3.20-r1 ebuild of November 2011 in Comment #109 in Gentoo Bugzilla Bug Report No. 130645). Have you by any chance tried re-installing within the last couple of days that cnijfilter-3.20-r3 from 2010, to see if it still builds? I would be surprised if it built. (By the way, the attachment in Comment #109 is a tarball containing the ebuild plus the patch files, something that the person posting Comment #110 clearly didn't realise.)_________________Clevo W230SS: amd64, OpenRC, Optimus.
Compal NBLB2: ~amd64, OpenRC, FGLRX, dual booting with Windows 7 Professional 64-bit.
KDE on both laptops.Fitzcarraldo's blog

Looks to me like the cnijfilter-3.20-r3.ebuild you installed back in October 2010 does not cater for CUPS 1.5.x (see the patch file use_ppd_header_file.patch that is applied in the newer cnijfilter-3.20-r1 ebuild of November 2011 in Comment #109 in Gentoo Bugzilla Bug Report No. 130645). Have you by any chance tried re-installing within the last couple of days that cnijfilter-3.20-r3 from 2010, to see if it still builds? I would be surprised if it built. (By the way, the attachment in Comment #109 is a tarball containing the ebuild plus the patch files, something that the person posting Comment #110 clearly didn't realise.)

But the question remains, how come cnijfilter-3.20-r1 builds on your machine but not on mine. I wonder if it's because of the version of GCC or glibc? My machine has gcc-4.5.3-r2 and glibc-2.15-r1 installed. What versions are installed on your machine?_________________Clevo W230SS: amd64, OpenRC, Optimus.
Compal NBLB2: ~amd64, OpenRC, FGLRX, dual booting with Windows 7 Professional 64-bit.
KDE on both laptops.Fitzcarraldo's blog

But the question remains, how come cnijfilter-3.20-r1 builds on your machine but not on mine. I wonder if it's because of the version of GCC or glibc? My machine has gcc-4.5.3-r2 and glibc-2.15-r1 installed. What versions are installed on your machine?

Anyway, I'll bet that's it. When I get the time I'm going to unmask gcc-4.6.x and upgrade to gcc- 4.6.2 and then have another go at installing cnijfilter-3.20-r1. I have been waiting for an excuse to upgrade GCC for a while, actually, as 4.5.3-r2 is not making full use of my Core i7 CPU._________________Clevo W230SS: amd64, OpenRC, Optimus.
Compal NBLB2: ~amd64, OpenRC, FGLRX, dual booting with Windows 7 Professional 64-bit.
KDE on both laptops.Fitzcarraldo's blog

Anyway, I'll bet that's it. When I get the time I'm going to unmask gcc-4.6.x and upgrade to gcc- 4.6.2 and then have another go at installing cnijfilter-3.20-r1. I have been waiting for an excuse to upgrade GCC for a while, actually, as 4.5.3-r2 is not making full use of my Core i7 CPU.

Ok.
What are the error message when you emerge net-print/cnijfilter-rom-3.20-r1?

Jallee, the error messages are the same as I posted in my post of April 24 2012 in this thread. That's because cnijfilter-3.20-r1.ebuild listed in that post is essentially the same as cnijfilter-rom-3.20-r1.ebuild. The only differences between cnijfilter-rom-3.20-r1.ebuild and cnijfilter-3.20-r1.ebuild in my post of April 24 2012 are:

The only reason for me making the above changes is to enable me to have both cnijfilter-2.70-r3 (MP510) and cnijfilter-3.20-r1 (MP560) installed simultaneously on my machine. I had both packages installed (well, cnijfilter-2.70-r3 and cnijfilter-3.20-r1's predecessor cnijfilter-3.20-r3) before recent world updates on my machine stopped them working. The ebuild for my Canon MP510 was in Slot 2 and the ebuild for my Canon MP560 was in Slot 3. This worked perfectly. The reason I had to change the two patching lines shown above is because the cnijfilter-2.70-r3 ebuild also has its own patch files in the cnijfilter/files/ directory, and the original two lines in cnijfilter-rom-3.20-r1 would try to apply those too. Robert Metzler, the guy who uploaded cnijfilter-rom-3.20-r1.ebuild and patch files associated with it, assumed that the cnijfilter/files/ directory would only contain patches to be used by cnijfilter-rom-3.20-r1._________________Clevo W230SS: amd64, OpenRC, Optimus.
Compal NBLB2: ~amd64, OpenRC, FGLRX, dual booting with Windows 7 Professional 64-bit.
KDE on both laptops.Fitzcarraldo's blog

try to re-emerge app-emulation/emul-linux-x86-bjdeps_________________生于忧患，死于安乐
"People's characters are strengthened through struggle against difficulties; they are weakened by comfort."
- Old Chinese adage
Fly Together Forever

That was the first thing I tried, but it didn't make a difference. The error message when merging cnijfilter-3.20-r1 is still the same. Mind you, could you please post your emul-linux-x86-bjdeps ebuild? Perhaps it's different to the one I'm using, which I show below:

Thank you very much for posting, Small_Penguin. You know, I had thought about hacking emul-linux-x86-bjdeps to use 'multilib_toolchain_setup x86' instead of 'export ABI=x86' but I never quite raised the enthusiasm to try it, as the hacked gutenprint 5.2.8_pre1 ebuild in my post of 27 April got my sorely-needed MP560 printer working again. So I'm glad you went to the trouble of trying it, and that you succeeded.

Actually, the amd64 USE flag is not needed (see the code of the function multilib_toolchain_setup in multilib.eclass), as emul-linux-x86-bjdeps is only for amd64 anyway. So I edited my emul-linux-x86-bjdeps-0.1-r3.ebuild to create emul-linux-x86-bjdeps-0.1-r4.ebuild containing:

Code:

pkg_setup() {
multilib_toolchain_setup x86
}

instead of:

Code:

pkg_setup() {
export ABI=x86
}

And now, at last, the cnijfilter-3.20-r1.ebuild (including the patches in my post of 7 May) builds. I'll have to add the updated ebuilds and patches in the Gentoo Bugzilla Bug Report No. 130645 (although I see you've added Comment #137 there). Thank you very much, Small_Penguin and liucougar, for your helpful posts.

I just have one niggling question in the back of my mind: Why do Small_Penguin and I need to replace 'export ABI=x86' with 'multilib_toolchain_setup x86' whereas some other ~amd64 multilib users such as Jallee don't have to? Different versions of sys-apps/portage, perhaps?_________________Clevo W230SS: amd64, OpenRC, Optimus.
Compal NBLB2: ~amd64, OpenRC, FGLRX, dual booting with Windows 7 Professional 64-bit.
KDE on both laptops.Fitzcarraldo's blog

I do remember a thing when I started to use Gentoo Linux, I could not print with a canon ip90. Period. I tried to use an ebuild from bgo adapted (cnijifilter:2.70) and at that time, I did not know much about writing ebuilds. It was unbearable to not be able to print a single sheet. When I managed to get something, it was only a test page badly printed.

So, I've just cleaned up and re-cleaned up the ebuild to get something like 1.5 KB for each 3.x0 ebuild without the scanner code or 3.0 KB with it. And a little eclass (~8.0 KB). Everyhting is on bgo and my overlay.

Almost everything can be builded with +gtk +servicetools on amd64 but 2.60 and 2.70. More details and info are on bgo and the commits on github._________________home/:mkinitramfs-ll/:supervision(-scripts)/:e-gtk-theme/:(bar-)overlay/