Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 355283 - Portage hardcodes ccache and distcc paths
Summary: Portage hardcodes ccache and distcc paths
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 373933
  Show dependency tree
 
Reported: 2011-02-17 00:52 UTC by Matt Turner
Modified: 2023-04-28 15:57 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 Matt Turner gentoo-dev 2011-02-17 00:52:53 UTC
In pym/portage/package/ebuild/prepare_build_dirs.py, the ccache and distcc paths are hardcoded with 'lib', but for instance on a MIPS n32 system they're installed into /usr/lib32/.
Comment 1 Zac Medico gentoo-dev 2011-02-17 03:01:15 UTC
How is portage supposed to know? Can it read the /usr/lib symlink to find out?
Comment 2 Matt Turner gentoo-dev 2011-02-17 04:15:59 UTC
(In reply to comment #1)
> How is portage supposed to know? Can it read the /usr/lib symlink to find out?

MIPS has a weird set of ABIs, so the lib folder will actually contain o32 binaries, while lib32 will contain n32 binaries. So, there won't be a /lib or /usr/lib symlink.

I'm not familiar with the portage code, but I'd think that portage should read the LIBDIR_${ABI} variable from the profile's make.defaults file. Isn't this how things like $(get_libdir) from the multilib eclass work?

I haven't committed this change to the mips/mips64/n32 profile yet, but I've set it locally so that I can work out the bugs in building stages with the proper LIBDIR set.
Comment 3 Matt Turner gentoo-dev 2011-02-21 07:02:55 UTC
(In reply to comment #2)
> I haven't committed this change to the mips/mips64/n32 profile yet, but I've
> set it locally so that I can work out the bugs in building stages with the
> proper LIBDIR set.

I've now committed this.

Is what I suggested reasonable?
Comment 4 Zac Medico gentoo-dev 2011-02-21 13:28:56 UTC
(In reply to comment #3)
> Is what I suggested reasonable?

I see your changes in profiles/arch/mips64 and guess that will work. However, at least for purposes of documenting the code changes in portage, it would be nice to have some explanation about why mips is different from the multilib profiles that set SYMLINK_LIB="yes" in profiles/features/multilib/make.defaults.
Comment 5 Matt Turner gentoo-dev 2011-02-21 17:19:18 UTC
(In reply to comment #4)
> I see your changes in profiles/arch/mips64 and guess that will work. However,
> at least for purposes of documenting the code changes in portage, it would be
> nice to have some explanation about why mips is different from the multilib
> profiles that set SYMLINK_LIB="yes" in
> profiles/features/multilib/make.defaults.

Hm, I didn't know about this variable. Is this something I should set to "no" in MIPS' make.defaults?
Comment 6 Zac Medico gentoo-dev 2011-02-21 19:30:21 UTC
The baselayout ebuilds all use a test like [[ ${SYMLINK_LIB} == "yes" ]], so if SYMLINK_LIB is unset in your profile then it should behave properly.
Comment 7 Zac Medico gentoo-dev 2011-03-20 19:49:30 UTC
@toolchain: Do you recommend for portage to use the LIBDIR_${ABI} variable to locate /usr/$libdir/$tool/bin/ directories for ccache and distcc?
Comment 8 SpanKY gentoo-dev 2011-03-20 22:48:03 UTC
the issue is that ccache/distcc install into the *default* ABI libdir.  for mips, and eventually for amd64, "lib" is not the default.  so you'll want to read from ${LIBDIR_${DEFAULT_ABI}}, and default to "lib" if it isnt set.
Comment 9 Matt Turner gentoo-dev 2011-06-07 20:44:43 UTC
Is there anything else you need, Zac? Some change to the mips profiles?
Comment 10 Zac Medico gentoo-dev 2011-06-09 15:15:21 UTC
(In reply to comment #8)
> the issue is that ccache/distcc install into the *default* ABI libdir.  for
> mips, and eventually for amd64, "lib" is not the default.  so you'll want to
> read from ${LIBDIR_${DEFAULT_ABI}}, and default to "lib" if it isnt set.

Thanks, this is in git:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=dbc9f3cc4c665af6d5db24bd9fb7544ed711d96f

(In reply to comment #9)
> Is there anything else you need, Zac? Some change to the mips profiles?

The profiles appear to have the required DEFAULT_ABI and LIBDIR_n32 variables set, so it looks good.
Comment 11 Matt Turner gentoo-dev 2011-06-09 15:40:08 UTC
Great! Thank you :)
Comment 12 Zac Medico gentoo-dev 2011-06-10 09:29:09 UTC
This is fixed in 2.1.10.1 and 2.2.0_alpha39.
Comment 13 Matt Turner gentoo-dev 2011-06-25 04:52:17 UTC
Ah, looks like it's still hard coded (for distcc and ccache) in portage/pym/portage/package/ebuild/prepare_build_dirs.py
Comment 15 Zac Medico gentoo-dev 2011-07-01 05:05:27 UTC
This is in 2.2.0_alpha42, but I'll leave this bug open until it's in an unmasked release.
Comment 16 Zac Medico gentoo-dev 2011-07-03 17:30:39 UTC
This is fixed in 2.1.10.4.