Gentoo Archives: gentoo-dev

From: Alexey Shvetsov <alexxy@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] MULTI_ABI support addition to main tree portage
Date: Wed, 01 Dec 2010 19:12:31
Message-Id: AANLkTi=e1TZs3g2ujemCz1gwfY0nDNn+VALWqMyAmgbm@mail.gmail.com
In Reply to: [gentoo-dev] MULTI_ABI support addition to main tree portage by Thomas Sachau
1 Well =)
2
3 This will be killer feature in gentoo =P
4 Also what about more complex arhes than ia32? like mips of ppc?
5
6 PS also with this feature seems amd64 and x86 can be merged in one
7 arch (like it was done in kernel) since its only abis of ia32
8
9 2010/12/1 Thomas Sachau <tommy@g.o>:
10 > Hi,
11 >
12 > i have already written about this some months ago and updated the code in relation to the comments
13 > especially from vapier.
14 >
15 > Basicly, it does now first set abi-specific vars (like CC, CFLAGS and others (setup_abi_env function
16 > in bin/auto-multilib.sh contains the full list), then does build the package as usual. If additional
17 > ABIs are requested, it checks after src_install, if there are possible ABI-specific files (libs,
18 > headers or, if requested for every ABI, also binaries). If those are found, the image dir is moved
19 > away and a new run is started, where again at start abic-specific vars are set and then the complete
20 > src* phases are run. Once all requested ABIs are done, the image dirs are merged into the final
21 > image dir. The following pkg_* phases are each running for every ABI.
22 > Currently, only different libs and headers are installed by default, binaries will be the ones from
23 > the default ABI, unless you tell portage to install binaries for all requested ABIs, in which case a
24 > wrapper will select the ABI-specific binary depending on the environment.
25 > The current implementation uses a USE-dep like way internally to satisfy the needed dependencies, so
26 > that e.g. 32bit libs on a 64bit platform get their required dependencies built with 32bit libs
27 > installed. For the rare case, where the crosscompile does fail and there is only a need for the
28 > binary and no linking against the libs, i have also a var, which disables this auto-dependency
29 > calculation for specified packages.
30 >
31 > For the user interface, portage shows a USE_EXPANDed var, which contains the avaidable ABIs, as an
32 > example for "emerge -pv media-libs/jpeg":
33 >
34 > [ebuild   R   ] media-libs/jpeg-8b  USE="-static-libs" MULTILIB_ABI="amd64 x86"
35 >
36 > Those ABIs can be handled like USE flags, in this case, they are "multilib_abi_amd64" and
37 > "multilib_abi_x86", so you can use those USE flags to enable/disable specific possible ABIs either
38 > globally or per package.
39 >
40 > The basic implementation can be used without changing main tree ebuilds or eclasses, but e.g. for
41 > the replacement of emul-* libs, this will require EAPI-support for ABI-specific USE-deps for
42 > binary-only packages or packages like wine.
43 >
44 > I would first like to see, if there are any bigger concerns especially with the implementation and
45 > how it is supposed to work.
46 >
47 > If there are no such concerns or if they have been resolved, i would like to request some help for
48 > the documentation and PMS-patch related work.
49 >
50 > For install instructions, please have a look at [1], the code can be found in the multilib branch of
51 > portage git repo at [2].
52 >
53 > While i did not yet get to the implementation of it, i would also like to propose something similiar
54 > for languages (like python, ruby or others), so that the basic parts are inside the PM and we can
55 > drop the different ways of implementation and allow users a much more fine-grained control on a per
56 > package base (in relation to the current way python eclass based very complex implementation works).
57 >
58 > [1]: http://github.com/sjnewbury/multilib-overlay/tree/portage-multilib/doc
59 > [2]: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=shortlog;h=refs/heads/multilib
60 >
61 > --
62 > Thomas Sachau
63 >
64 > Gentoo Linux Developer
65 >
66 >
67
68
69
70 --
71 Best Regards,
72 Alexey 'Alexxy' Shvetsov
73 Petersburg Nuclear Physics Institute, Russia
74 Department of Molecular and Radiation Biophysics
75 Gentoo Team Ru
76 Gentoo Linux Dev
77 mailto:alexxyum@×××××.com
78 mailto:alexxy@g.o
79 mailto:alexxy@×××××××××××××.ru

Replies

Subject Author
Re: [gentoo-dev] MULTI_ABI support addition to main tree portage Thomas Sachau <tommy@g.o>
[gentoo-dev] Re: MULTI_ABI support addition to main tree portage "Diego Elio Pettenò" <flameeyes@×××××.com>