Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 360385 - dev-libs/lzo-2.04 ignores CFLAGS/CCASFLAGS when compiling assembly (breaks portage-multilib)
Summary: dev-libs/lzo-2.04 ignores CFLAGS/CCASFLAGS when compiling assembly (breaks po...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on: 365407
Blocks: portage-multilib
  Show dependency tree
 
Reported: 2011-03-25 05:37 UTC by Nathan Phillip Brink (binki) (RETIRED)
Modified: 2011-08-04 03:56 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,65.69 KB, text/plain)
2011-03-25 05:41 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details
emerge --info (emerge--info.txt,7.53 KB, text/plain)
2011-03-25 05:42 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details
lzo-2.04-asm-makefile.patch (lzo-2.04-asm-makefile.patch,1.29 KB, patch)
2011-03-25 05:44 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details | Diff
lzo-2.04.ebuild-asm-makefile.patch (lzo-2.04.ebuild-asm-makefile.patch,930 bytes, patch)
2011-03-25 05:48 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-03-25 05:37:52 UTC
dev-libs/lzo-2.04 includes assembly sourcecode files which are built using custom build rules instead of the standard automake build rules. These build rules do not provide any ASFLAGS/CCASFLAGS-like variable to which compilation flags (i.e., -m32) can be passed to the compiler driver.

Thus, when trying to compile a 32-bit(x86) version of dev-libs/lzo-2.04 (on a system where gcc-config is patched to ignore the deprecated CFLAGS_${ABI}), the assembly files are compiled as if for the amd64 platform instead of x86 and linking fails.

See to-be-attached build.log as well as the to-be-attached patches ;-).
Comment 1 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-03-25 05:41:35 UTC
Created attachment 267163 [details]
build.log
Comment 2 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-03-25 05:42:00 UTC
Created attachment 267165 [details]
emerge --info
Comment 3 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-03-25 05:44:07 UTC
Created attachment 267167 [details, diff]
lzo-2.04-asm-makefile.patch

This fixes the issue by killing the explicit make rules for building .S files and preferring automake's build rules. It also invokes AM_PROG_AS, which will set up CCAS and CCASFLAGS, where CCAS=$(CC) and CCASFLAGS=$(CFLAGS) which gets the behavior of the compiler driver being called with $(CFLAGS) which is required for multilib-portage to work.
Comment 4 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-03-25 05:48:21 UTC
Created attachment 267169 [details, diff]
lzo-2.04.ebuild-asm-makefile.patch

The changes necessary to lzo-2.04.ebuild to get the patch working properly.

A simple eautoreconf does not work with lzo. I have no idea where lzo gets the mfx_* autoconf macros from, but it certainly does not ship them in m4/ like it should. To fix this, the sed expression grabs all of these macros from aclocal.m4 and stores them into acinclude.m4 (otherwise eautoreconf causes an error; also, eautoreconf is required because the prior patch touches configure.ac and src/Makefile.am).
Comment 5 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-03-25 06:18:38 UTC
Patch emailed to upstream, awaiting reply.
Comment 6 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-06-27 01:52:33 UTC
Another way to fix this is to fix bug 365407, where upstream fixes this bug in a similar way to the way attachment 267167 [details, diff] fixes it.
Comment 7 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-08-04 03:56:23 UTC
Fixed in dev-libs/lzo-2.05 (bug 365407).