Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 632444 - net-print/cnijfilter-3.40-r2::bar failed to install on i686
Summary: net-print/cnijfilter-3.40-r2::bar failed to install on i686
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Overlays (show other bugs)
Hardware: x86 Linux
: Normal enhancement (vote)
Assignee: tokiclover
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-29 22:05 UTC by Ted Marston
Modified: 2020-12-29 10:34 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info '=net-print/cnijfilter-3.40-r2::bar' (emerge-info,6.21 KB, text/plain)
2017-10-02 11:54 UTC, Ted Marston
Details
ebuild environment for '=net-print:cnijfilter-3.40-r2::bar' (emerge-environment,119.02 KB, text/plain)
2017-10-02 11:56 UTC, Ted Marston
Details
emerge -v =net-print/cnijfilter-3.40-r2::bar log (emerge-log,243.05 KB, application/octet-stream)
2017-10-02 11:58 UTC, Ted Marston
Details
emerge --info for x86_64 host on profile 17 (emerge.info,7.22 KB, text/plain)
2018-01-20 16:09 UTC, Ted Marston
Details
environment for failed build on x86_64 host on profile 17 (emerge.environment,120.39 KB, text/plain)
2018-01-20 16:12 UTC, Ted Marston
Details
emerge -pqv cnijfilter for x86_64 host on profile 17 (emerge.pretend,185 bytes, text/plain)
2018-01-20 16:16 UTC, Ted Marston
Details
Modified ecnij.eclass (ecnij.eclass,9.67 KB, text/plain)
2020-08-07 00:16 UTC, Ted Marston
Details
Modified net-print/cnijfilter/cnijfilter-3.40-r2 ebuild for Canon mg5100 printers (cnijfilter-3.40-r2.ebuild,1.32 KB, text/plain)
2020-08-07 00:37 UTC, Ted Marston
Details
Tar file containing 14 patches used by the modified cnijfilter-3.40-r2 ebuild (cnijfilter-3.40-r2-patches.tar,50.00 KB, patch)
2020-08-07 01:17 UTC, Ted Marston
Details | Diff
Modified cnijfilter-3.70-6-headers.patch for cnijfilter-3.40 (probably 3.10..3.90) (cnijfilter-3.70-6-headers.patch,466 bytes, patch)
2020-12-29 10:34 UTC, Evert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ted Marston 2017-09-29 22:05:30 UTC
I still use a Canon Pixma mg5150 on both CHOST="i686-pc-linux-gnu"
and CHOST="x86_64-pc-linux-gnu" machines.

net-print/cnijfilter-3.40-r2::bar currently builds on both the i686 and the  x86_64 machine, but it fails to install on the i686 machine. 

The installation error on the i686 machine is:
> !!! dolib: 373/libs_bin/*.so* does not exist
>  * ERROR: net-print/cnijfilter-3.40-r2::bar failed (install phase):
>  *   dolib failed

On the i686 the libraries were actually in 373/libs_bin32/ and libs_bin64/ at the end of the build.
Comment 1 mfld.fr 2017-10-01 13:11:31 UTC
In the Bar overlay, the ecnij.eclass selects the sourced libs with the $abi_lib variable in ecnij_src_install() (line 273):
  dolib.so ${prid}/libs_bin${abi_lib}/*.so*

That variable is set before with (line 255):
  local abi_libdir=/usr/$(get_libdir) p pr prid
  local abi_lib=${abi_libdir#*lib}

So it looks like the get_libdir() function is not returning "lib32" here.

Could you print add the result of emerge --info to your bug report, to have a look on your Portage environment ?

@tokiclover: by the way, I don't understand what the "p pr prid" are doing here ?
Comment 2 tokiclover 2017-10-02 08:32:37 UTC
(In reply to gentoo from comment #1)
> In the Bar overlay, the ecnij.eclass selects the sourced libs with the
> $abi_lib variable in ecnij_src_install() (line 273):
>   dolib.so ${prid}/libs_bin${abi_lib}/*.so*
> 
> That variable is set before with (line 255):
>   local abi_libdir=/usr/$(get_libdir) p pr prid
>   local abi_lib=${abi_libdir#*lib}
> 

Good to have all that info handed down so I do not have to go dig out that gold. Thanks.


> @tokiclover: by the way, I don't understand what the "p pr prid" are doing
> here ?

That's just a "local" variable declaration list, so the first is defined and the other are just declared.

> So it looks like the get_libdir() function is not returning "lib32" here.
> 
> Could you print add the result of emerge --info to your bug report, to have
> a look on your Portage environment ?
> 

And attach the environment file as well.
Comment 3 Ted Marston 2017-10-02 11:54:24 UTC
Created attachment 497408 [details]
emerge --info '=net-print/cnijfilter-3.40-r2::bar'
Comment 4 Ted Marston 2017-10-02 11:56:38 UTC
Created attachment 497410 [details]
ebuild environment for '=net-print:cnijfilter-3.40-r2::bar'
Comment 5 Ted Marston 2017-10-02 11:58:26 UTC
Created attachment 497412 [details]
emerge -v =net-print/cnijfilter-3.40-r2::bar log
Comment 6 Ted Marston 2017-10-02 14:54:41 UTC
That emerge log was a text file when I uploaded, but my firefox browser complains that it cannot display its contents because its an application/octet-stream. However when I download it again, `file` claims it is
UTF-8 Unicode text, with very long lines, with escape sequences.
I think bugs.gentoo.org is lying about its content!
Comment 7 mfld.fr 2017-10-03 06:18:51 UTC
Thanks for the additional information. In your case of a native x86_32 system, it looks to me that returning "lib" is a normal behaviour of the get_libdir() function, as multilib goes back to LIBDIR default on such system (= no need to build both 32 and 64 bits variants).

So one should not rely on the target LIBDIR, but on the keywords to select between 32 or 64 bits prebuilt binaries. I propose to patch the ecnij.class (line 256) and set abi_lib like this:

local abi_lib=$(usex amd64 64 32)

As the package is keyworded only for x86 and amd64.
Comment 8 tokiclover 2017-10-03 13:18:11 UTC
(In reply to gentoo from comment #7)
> Thanks for the additional information. In your case of a native x86_32
> system, it looks to me that returning "lib" is a normal behaviour of the
> get_libdir() function, as multilib goes back to LIBDIR default on such
> system (= no need to build both 32 and 64 bits variants).
> 
> So one should not rely on the target LIBDIR, but on the keywords to select
> between 32 or 64 bits prebuilt binaries. I propose to patch the ecnij.class
> (line 256) and set abi_lib like this:
> 
> local abi_lib=$(usex amd64 64 32)
> 
> As the package is keyworded only for x86 and amd64.

Let's use that then. There is the ABI that could be used as well. Thanks.
Comment 9 Ted Marston 2017-10-04 14:47:45 UTC
Thanks guys, works fine for me. :)
Comment 10 mfld.fr 2017-10-04 16:22:42 UTC
Good news :-) !
Comment 11 Ted Marston 2018-01-20 16:06:01 UTC
After a recent eix-sync, update of world and emerge -c,
 and changing my profile to default/linux/amd64/17.0,
 on both my i686 and x86_64 hosts,
 net-print/cnijfilter-3.40-r2::bar for an mg5100 printer
 now fails to build on the x86_64 host,
 although it still builds on the i686 host.

Maybe the problem lies in ecnij.eclass because 64-bit,
 instead of 32-bit, libraries (supplied by cannon)
 are now being copied into image/usr/lib32
 which triggers a multilib-strict check failure.

The ebuild seemed to work on both hosts prior to the
 change from profile 13 to profile 17, although printing
 has only been tested on the i686 machine recently.

The emerge --info, emerge environment, and emerge -pqv output
 will be uploaded for the failed x86_64 host.
Comment 12 Ted Marston 2018-01-20 16:09:12 UTC
Created attachment 515374 [details]
emerge --info for x86_64 host on profile 17
Comment 13 Ted Marston 2018-01-20 16:12:35 UTC
Created attachment 515382 [details]
environment for failed build on x86_64 host on profile 17
Comment 14 Ted Marston 2018-01-20 16:16:11 UTC
Created attachment 515384 [details]
emerge -pqv cnijfilter for x86_64 host on profile 17
Comment 15 Ted Marston 2020-08-07 00:16:07 UTC
Created attachment 653436 [details]
Modified ecnij.eclass

This ecnij.eclass is modified from a version originally taken from the now defunct Bar overlay. It installs cnijfilter and other tools for the Canon mg5100 series printers in an amd64 cpu.
Comment 16 Ted Marston 2020-08-07 00:37:27 UTC
Created attachment 653438 [details]
Modified net-print/cnijfilter/cnijfilter-3.40-r2 ebuild for Canon mg5100 printers

This ebuild was modified from a version originally copied from the now defunct Bar overlay. It emerges cnijfilter and other tools needed for the Canon mg5100 printer on an amd64 cpu. The changes have only been tested on an mg5100 printer, although they may well work for other printers that the Bar overlay version of the ebuild catered for.
Comment 17 Ted Marston 2020-08-07 01:17:45 UTC
Created attachment 653444 [details, diff]
Tar file containing 14 patches used by the modified cnijfilter-3.40-r2 ebuild

These patches were collected from various sources including the now defunct Bar overlay. Four of them are my own. They enable cnijfilter-3.40-r2.ebuild to correctly build Canon's sources for their mg5100 printer using gcc:9.3.0 and glibc-2.30-r8 for cups-2.3.3-r1 on an amd64 cpu.
Comment 18 Evert 2020-12-29 10:34:36 UTC
Created attachment 680158 [details, diff]
Modified cnijfilter-3.70-6-headers.patch for cnijfilter-3.40 (probably 3.10..3.90)

Replace sys/sysctl.h by linux/sysctl.h
Fixes compilation error: cnijnpr.c:36:10: fatal error: sys/sysctl.h: No such file or directory