Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 638504

Summary: media-gfx/argyllcms-2.0.0 fails to build on 32bit host with 64bit kernel
Product: Gentoo Linux Reporter: Marc Burkhardt <marc>
Component: Current packagesAssignee: Bernard Cafarelli <voyageur>
Status: RESOLVED TEST-REQUEST    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Marc Burkhardt 2017-11-22 19:40:43 UTC
media-gfx/argyllcms-2.0.0 fails to build a 32bit userland library (the package) when running under an 64bit kernel.

[ebuild     U  ] media-gfx/argyllcms-2.0.0::gentoo [1.9.2::gentoo] USE="-doc" 0 KiB

Total: 1 package (1 upgrade), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] 

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) media-gfx/argyllcms-2.0.0::gentoo
 * Argyll_V2.0.0_src.zip SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                                                                                                                                                           [ ok ]
>>> Unpacking source...
>>> Unpacking Argyll_V2.0.0_src.zip to /var/tmp/portage/media-gfx/argyllcms-2.0.0/work
>>> Source unpacked in /var/tmp/portage/media-gfx/argyllcms-2.0.0/work
>>> Preparing source in /var/tmp/portage/media-gfx/argyllcms-2.0.0/work/Argyll_V2.0.0 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/media-gfx/argyllcms-2.0.0/work/Argyll_V2.0.0 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/media-gfx/argyllcms-2.0.0/work/Argyll_V2.0.0 ...
--------> We're on a 64 bit host 
Argyll Jamrules has been read 
DESTDIR = '.', PREFIX = '', REFSUBDIR = 'ref' 
Using system TIFF library 
Using system JPEG library 
Using system PNG library 
Using system Z library 
Using system SSL library 
xxd seems to be available 
HOME =  /var/tmp/portage/media-gfx/argyllcms-2.0.0/homedir 
PWD =  /var/tmp/portage/media-gfx/argyllcms-2.0.0/work/Argyll_V2.0.0 

        i686-pc-linux-gnu-gcc -c -o numlib/numsup.o -m32 -Ofast -DUNIX -D_THREAD_SAFE -m64 -DARGYLLCMS -Inumlib -Ih -I/usr/local/include numlib/numsup.c


        i686-pc-linux-gnu-gcc -c -o numlib/dnsq.o -m32 -Ofast -DUNIX -D_THREAD_SAFE -m64 -DARGYLLCMS -Inumlib -Ih -I/usr/local/include numlib/dnsq.c


        i686-pc-linux-gnu-gcc -c -o numlib/powell.o -m32 -Ofast -DUNIX -D_THREAD_SAFE -m64 -DARGYLLCMS -Inumlib -Ih -I/usr/local/include numlib/powell.c


the ebuild appends "-m64" to compiler flags whereas a "-m32" is already given...
Comment 1 Bernard Cafarelli gentoo-dev 2017-11-23 23:07:49 UTC
Thanks for the report, let's see...

It's strange that you got 1.9.2 in, as the Jam files did not change for this step (Jambase file, line 979):
    # Make things work on 64 bit Linux
    # Because HOSTTYPE is not normally exported, check the uname() result
    if ! $(HOSTTYPE) {
        HOSTTYPE = $(JAMUNAME[1]) ;
    }

    if $(HOSTTYPE) = x86_64
     || $(HOSTTYPE) = x86_64-linux
     || $(HOSTTYPE) = amd64 {
        ECHO "We're on a 64 bit host" ;
        HOST64     = true ;
        CFLAGS     += -m64 ;
        C++FLAGS   += -m64 ;
    }

Or did you have a 32bit kernel before? As it's apparently using uname output

Anyway from looking at the code (jam is not yummy I can tell you), setting HOSTTYPE on the jam line in the ebuild should do the trick:
HOSTTYPE=${CHOST/-*} jam ...
Comment 2 Bernard Cafarelli gentoo-dev 2018-09-18 21:17:41 UTC
Marking test request until confirmation fix from comment 1 helps