Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 434354 - =app-misc/lirc-0.9.0-r2: fails to build on ppc
Summary: =app-misc/lirc-0.9.0-r2: fails to build on ppc
Status: RESOLVED DUPLICATE of bug 432390
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Normal normal (vote)
Assignee: Television related Applications in Gentoo's Portage
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-08 17:42 UTC by Anthony Basile
Modified: 2012-09-28 15:35 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Basile gentoo-dev 2012-09-08 17:42:49 UTC
Here is the failure:

make -C /usr/src/linux/ SUBDIRS=/var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0/drivers/lirc_dev modules \
	KBUILD_VERBOSE=1
make[2]: Entering directory `/usr/src/linux-3.2.1-gentoo-r2'
Makefile:567: /usr/src/linux-3.2.1-gentoo-r2/arch/ppc/Makefile: No such file or directory
make[2]: *** No rule to make target `/usr/src/linux-3.2.1-gentoo-r2/arch/ppc/Makefile'.  Stop.
make[2]: Leaving directory `/usr/src/linux-3.2.1-gentoo-r2'
make[1]: *** [lirc_dev.o] Error 2
make[1]: Leaving directory `/var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0/drivers/lirc_dev'
make: *** [all-recursive] Error 1
 * ERROR: app-misc/lirc-0.9.0-r2 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=app-misc/lirc-0.9.0-r2'`,
 * the complete build log and the output of `emerge -pqv '=app-misc/lirc-0.9.0-r2'`.
 * The complete build log is located at '/var/tmp/portage/app-misc/lirc-0.9.0-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-misc/lirc-0.9.0-r2/temp/environment'.
 * Working directory: '/var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0/drivers'
 * S: '/var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0'

The failure occurs because the build system is looking down the wrong path.  The correct path is:

   /usr/src/linux-3.2.1-gentoo-r2/arch/powerpc/Makefile

If you create a sym link, it fixes *this* problem although there may be other problems --- I'm not suggesting it as a solution just part of the diagnosis of the problem.

However, no package should really be looking in /usr/src/linux.  It should use the publicly exported headers in /usr/include/linux only.  The running kernel and the kernel source tree at lirc's build time need not be the same and given the rapid changes to kernel internals, breakages is likely

Reproducible: Always
Comment 1 Ian Stakenvicius (RETIRED) gentoo-dev 2012-09-09 02:49:17 UTC
Regarding the issues with the headers and building against the kernel sources -- the reason lirc does this is because it builds a LOT of kernel modules.

That said, I will look into this to figure out why it's using the wrong path, as I believe the path would be controlled by the linux-mod eclass rather than the lirc build system but I need to confirm this.
Comment 2 Ian Stakenvicius (RETIRED) gentoo-dev 2012-09-14 15:08:38 UTC
I was right, this is all handled in linux-mod.eclass , along with toolchain-funcs.eclass.

According to that eclass, it is already as of 2.6.16 and above returning 'powerpc' instead of 'ppc' or 'ppc64'.   I also checked by hand and it seems tc-arch-kernel's kernel-version check does handle 3.x versions properly.

On my system, ARCH="amd64" is properly replaced with 'x86' in said path, so as far as I can tell the path is being properly mangled.

It might be worth noting that tc-arch-kernel uses CTARGET (or CHOST if unset) plus the kernel version to determine the appropriate ARCH , so it's possible that if your CTARGET:-CHOST doesn't match 'powerpc*' this would probably be why it's failing..

Without the full build.log and emerge --info output i won't be able to do any further analysis.
Comment 3 Ian Stakenvicius (RETIRED) gentoo-dev 2012-09-14 16:53:14 UTC
Found the bug.  It's not a lirc ebuild issue.

*** This bug has been marked as a duplicate of bug 432390 ***