Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 124544 - dev-haskell/hmake-3.10 installs files in wrong location on ppc64 with 32-bit userland
Summary: dev-haskell/hmake-3.10 installs files in wrong location on ppc64 with 32-bit ...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC64 Linux
: Lowest enhancement (vote)
Assignee: Gentoo TreeCleaner Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-01 11:14 UTC by Chris Parrott (RETIRED)
Modified: 2010-12-18 17:33 UTC (History)
2 users (show)

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 Chris Parrott (RETIRED) gentoo-dev 2006-03-01 11:14:04 UTC
When using a 64-bit PPC64 kernel with the 32-bit userland, hmake-3.10 installs things in /usr/lib/hmake/ppc64-linux.  This is apparently due to the fact that 'uname -m' returns ppc64, although ARCH=ppc in this particular case.  The hmake-3.10 build procedure is probably using the output of 'uname -m' to create this directory tree, when it should be using something like $ARCH instead.

As hmake is not apparently widely used anymore, this issue is somewhat moot.  However, I will go ahead and enter this issue for tracking purposes, so that everyone knows that we are aware of it.  I have given this a very low priority for being fixed, though.
Comment 1 Brent Baude (RETIRED) gentoo-dev 2007-05-31 15:02:35 UTC
I just stumbled on this bug; hadn't seen it before but this is timely nevertheless.  We are seeing a fair amount of this kind of stuff either in configure scripts, Makefiles, or as it seems in this case, in scripts run during build.

We are wrestling with a common solution but it seems each situation presents itself differently.  I looked briefly at the hmake source and it seems the problem comes from:

src/scripts/harch (which uses uname -m to determine "userland" arch.  This is called by numerous scripts to set variables, which is likely the problem for the install path being incorrect.

And it doesnt appear configure will honor ARCH, which would be preferable for a fix.

I think you will have to resort to (in the ebuild) comparing the kernel arch and userland arc and if it differs, patching one of the scripts for hmake to set the arch to ppc.  This should probably be in a conditional for only ppc right now.  There are a ton of ways to do this. 

I'm also going to re-discuss with Spanky and company to see if we shouldn't have something in an eclass that will allow us to quickly assess if we are dealing with an environment where userland and kernel archs differ.
Comment 2 Brent Baude (RETIRED) gentoo-dev 2007-11-27 03:00:43 UTC
Haskell team,  this bug is laying around for us on ppc64 32ul.  the file I note in my previous comment does not accept or honor variables.  it would seem the logical choice would be to patch that script or to patch configure (probably preferable) so that configure would set the arch within that script using one of the many arch variables we have available in eutils
Comment 3 Duncan Coutts (RETIRED) gentoo-dev 2007-11-27 13:11:03 UTC
How is one supposed to detect the userland arch? Can't we just patch hmake's harch script to figure it out properly.

BTW, I note that ghc's configure script gets this wrong too and they decided it was too hard to fix since they're not being provided with enough information.
http://hackage.haskell.org/trac/ghc/ticket/1717

So, what is the correct way to *detect* the arch on ppc64 with 32bit userland?
Comment 4 Brent Baude (RETIRED) gentoo-dev 2007-11-27 15:08:11 UTC
Duncan, if you can, find me on IRC today and we can hash through a plan.

Ok, and to answer your question about ARCH detection.  Here's Brent's opinion.  Unless there are kernel modules built, arch detection should be done by $ARCH through the ebuild, and preferably passed to configure.  Again. My opinion.  What is killing us here is that an assumption is being made between kernel-arch and userland-arch.  Unless there is actual kernel stuff going on, $arch should be sufficient.

I'm thinking that the harch script could be patched out and configure could be easily modified to install properly then.  I don't believe at this point that anuthing related to compilation is an issue.

Let me peek at the configure script again and let's talk on IRC if you get a chance.
Comment 5 Mark Loeser (RETIRED) gentoo-dev 2010-10-29 17:58:07 UTC
hmake doesn't seem to have any dependencies in the tree.  Would it be safe for me to just "fix" this by dropping the keywords?
Comment 6 Lennart Kolmodin (RETIRED) gentoo-dev 2010-10-29 18:19:01 UTC
Nothing depends on hmake, and it has been superseded by cabal. In my opinion it should be removed from the tree.
Comment 7 Mark Loeser (RETIRED) gentoo-dev 2010-11-01 19:28:37 UTC
Already masked
Comment 8 Samuli Suominen gentoo-dev 2010-12-18 17:33:25 UTC
removed from tree as planned