public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] crossdev: installing _host_ build dependencies not automatic?
@ 2017-05-03 10:05 Paweł Hajdan, Jr.
  2017-05-03 15:56 ` Alexis Ballier
  0 siblings, 1 reply; 5+ messages in thread
From: Paweł Hajdan, Jr. @ 2017-05-03 10:05 UTC (permalink / raw
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 489 bytes --]

I encountered <https://bugs.gentoo.org/show_bug.cgi?id=617276> while
working on some cross-compiling project.

Admittedly, it may not be that easy to handle host package dependencies
fully automatically.

I'm wondering - is it documented what portage guarantees, and what I'm
expected to just manually handle to provide host build dependencies?

Any other advice about properly using crossdev would also be
appreciated. I'd be happy to test and help improve things.

Paweł


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 827 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] crossdev: installing _host_ build dependencies not automatic?
  2017-05-03 10:05 [gentoo-dev] crossdev: installing _host_ build dependencies not automatic? Paweł Hajdan, Jr.
@ 2017-05-03 15:56 ` Alexis Ballier
  2017-05-03 21:47   ` James Le Cuirot
  2017-05-13 19:41   ` Paweł Hajdan, Jr.
  0 siblings, 2 replies; 5+ messages in thread
From: Alexis Ballier @ 2017-05-03 15:56 UTC (permalink / raw
  To: gentoo-dev

On Wed, 3 May 2017 12:05:48 +0200
"Paweł Hajdan, Jr." <phajdan.jr@gentoo.org> wrote:

> I encountered <https://bugs.gentoo.org/show_bug.cgi?id=617276> while
> working on some cross-compiling project.
> 
> Admittedly, it may not be that easy to handle host package
> dependencies fully automatically.
> 
> I'm wondering - is it documented what portage guarantees, and what I'm
> expected to just manually handle to provide host build dependencies?
> 
> Any other advice about properly using crossdev would also be
> appreciated. I'd be happy to test and help improve things.


From man emerge:


       --root-deps[=rdeps]
              If  no argument is given then build-time dependencies of
       packages for ROOT are installed to ROOT instead of /.  If the
       rdeps argument is given then discard all build-time dependencies
       of packages for ROOT.  This option is only meaningful when used
       together with ROOT and it should not be enabled under normal
       circumstances!

              Does not affect EAPIs that support HDEPEND.  Experimental
              EAPI 5-hdepend provides HDEPEND as a new means to adjust
              installation into "/" and ROOT.  If ebuilds using EAPIs
              which do not support HDEPEND are built  in  the same
              emerge run as those using EAPIs which do support HDEPEND,
              this option affects only the former.


crossdev wrappers set --root-deps=rdeps (read cross-emerge, this can be
overriden), but be careful: If you only care about getting all the deps
and maybe more then removing --root-deps might help you. However, when
cross compiling you will likely run into broken deps since / and ROOT
will not use the same keyword visibility.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] crossdev: installing _host_ build dependencies not automatic?
  2017-05-03 15:56 ` Alexis Ballier
@ 2017-05-03 21:47   ` James Le Cuirot
  2017-05-04  8:21     ` Alexis Ballier
  2017-05-13 19:41   ` Paweł Hajdan, Jr.
  1 sibling, 1 reply; 5+ messages in thread
From: James Le Cuirot @ 2017-05-03 21:47 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2947 bytes --]

On Wed, 3 May 2017 17:56:43 +0200
Alexis Ballier <aballier@gentoo.org> wrote:

> On Wed, 3 May 2017 12:05:48 +0200
> "Paweł Hajdan, Jr." <phajdan.jr@gentoo.org> wrote:
> 
> > I encountered <https://bugs.gentoo.org/show_bug.cgi?id=617276> while
> > working on some cross-compiling project.
> > 
> > Admittedly, it may not be that easy to handle host package
> > dependencies fully automatically.
> > 
> > I'm wondering - is it documented what portage guarantees, and what I'm
> > expected to just manually handle to provide host build dependencies?
> > 
> > Any other advice about properly using crossdev would also be
> > appreciated. I'd be happy to test and help improve things.  
> 
> 
> From man emerge:
> 
> 
>        --root-deps[=rdeps]
>               If  no argument is given then build-time dependencies of
>        packages for ROOT are installed to ROOT instead of /.  If the
>        rdeps argument is given then discard all build-time dependencies
>        of packages for ROOT.  This option is only meaningful when used
>        together with ROOT and it should not be enabled under normal
>        circumstances!
> 
>               Does not affect EAPIs that support HDEPEND.  Experimental
>               EAPI 5-hdepend provides HDEPEND as a new means to adjust
>               installation into "/" and ROOT.  If ebuilds using EAPIs
>               which do not support HDEPEND are built  in  the same
>               emerge run as those using EAPIs which do support HDEPEND,
>               this option affects only the former.
> 
> 
> crossdev wrappers set --root-deps=rdeps (read cross-emerge, this can be
> overriden), but be careful: If you only care about getting all the deps
> and maybe more then removing --root-deps might help you. However, when
> cross compiling you will likely run into broken deps since / and ROOT
> will not use the same keyword visibility.

I was going to point to crossdev's use of --root-deps=rdeps too. I did
wonder why on earth this was even added. I overrode it for quite a
while and didn't have any issue. History showed that it was added by
solar without much of an explanation. He's no longer around to ask. It
wasn't until I tried to build a brand new ppc64le system recently that
I finally found a reason for it, though I'm not sure it was the
original reason. The multilib ABI USE flags start conflicting horribly
in cross situations and this option seems to be the only way around it
at present.

I doubt keyword visibility is an issue. Portage uses a different
configuration between / and ROOT when cross-compiling. I don't think it
tries to force the same package versions beyond what is specified in
the ebuild. For pure build-time dependencies, the package will only be
installed to / anyway (i.e. you don't need cmake in ROOT) so there is
nothing to enforce here.

-- 
James Le Cuirot (chewi)
Gentoo Linux Developer

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 981 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] crossdev: installing _host_ build dependencies not automatic?
  2017-05-03 21:47   ` James Le Cuirot
@ 2017-05-04  8:21     ` Alexis Ballier
  0 siblings, 0 replies; 5+ messages in thread
From: Alexis Ballier @ 2017-05-04  8:21 UTC (permalink / raw
  To: gentoo-dev

On Wed, 3 May 2017 22:47:18 +0100
James Le Cuirot <chewi@gentoo.org> wrote:

> On Wed, 3 May 2017 17:56:43 +0200
> Alexis Ballier <aballier@gentoo.org> wrote:
> 
> > On Wed, 3 May 2017 12:05:48 +0200
> > "Paweł Hajdan, Jr." <phajdan.jr@gentoo.org> wrote:
> >   
> > > I encountered <https://bugs.gentoo.org/show_bug.cgi?id=617276>
> > > while working on some cross-compiling project.
> > > 
> > > Admittedly, it may not be that easy to handle host package
> > > dependencies fully automatically.
> > > 
> > > I'm wondering - is it documented what portage guarantees, and
> > > what I'm expected to just manually handle to provide host build
> > > dependencies?
> > > 
> > > Any other advice about properly using crossdev would also be
> > > appreciated. I'd be happy to test and help improve things.    
> > 
> > 
> > From man emerge:
> > 
> > 
> >        --root-deps[=rdeps]
> >               If  no argument is given then build-time dependencies
> > of packages for ROOT are installed to ROOT instead of /.  If the
> >        rdeps argument is given then discard all build-time
> > dependencies of packages for ROOT.  This option is only meaningful
> > when used together with ROOT and it should not be enabled under
> > normal circumstances!
> > 
> >               Does not affect EAPIs that support HDEPEND.
> > Experimental EAPI 5-hdepend provides HDEPEND as a new means to
> > adjust installation into "/" and ROOT.  If ebuilds using EAPIs
> >               which do not support HDEPEND are built  in  the same
> >               emerge run as those using EAPIs which do support
> > HDEPEND, this option affects only the former.
> > 
> > 
> > crossdev wrappers set --root-deps=rdeps (read cross-emerge, this
> > can be overriden), but be careful: If you only care about getting
> > all the deps and maybe more then removing --root-deps might help
> > you. However, when cross compiling you will likely run into broken
> > deps since / and ROOT will not use the same keyword visibility.  
> 
> I was going to point to crossdev's use of --root-deps=rdeps too. I did
> wonder why on earth this was even added. I overrode it for quite a
> while and didn't have any issue. History showed that it was added by
> solar without much of an explanation. He's no longer around to ask. It
> wasn't until I tried to build a brand new ppc64le system recently that
> I finally found a reason for it, though I'm not sure it was the
> original reason. The multilib ABI USE flags start conflicting horribly
> in cross situations and this option seems to be the only way around it
> at present.

there's that and e.g. you might want to enable USE=mmal for cross
compiling to a raspberry pi; raspberrypi-userland will be in DEPEND but
you wont be able to merge it into /

> I doubt keyword visibility is an issue. Portage uses a different
> configuration between / and ROOT when cross-compiling. I don't think
> it tries to force the same package versions beyond what is specified
> in the ebuild. For pure build-time dependencies, the package will
> only be installed to / anyway (i.e. you don't need cmake in ROOT) so
> there is nothing to enforce here.


The issue is that we can't distinguish between target build time
dependencies (libraries, headers, etc.) and host build time
dependencies (cmake, autotools, etc.). While --root-deps=rdeps avoids
most of the problems at the cost of missing host deps, it still fails
horribly for target build time only deps (e.g. pure headers libraries).


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] crossdev: installing _host_ build dependencies not automatic?
  2017-05-03 15:56 ` Alexis Ballier
  2017-05-03 21:47   ` James Le Cuirot
@ 2017-05-13 19:41   ` Paweł Hajdan, Jr.
  1 sibling, 0 replies; 5+ messages in thread
From: Paweł Hajdan, Jr. @ 2017-05-13 19:41 UTC (permalink / raw
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 1026 bytes --]

On 03/05/2017 17:56, Alexis Ballier wrote:
> From man emerge:
> 
>        --root-deps[=rdeps]
>               If  no argument is given then build-time dependencies of
>        packages for ROOT are installed to ROOT instead of /.  If the
>        rdeps argument is given then discard all build-time dependencies
>        of packages for ROOT.  This option is only meaningful when used
>        together with ROOT and it should not be enabled under normal
>        circumstances!

Ah, I didn't know about that. Thanks!

>               Does not affect EAPIs that support HDEPEND.  Experimental
>               EAPI 5-hdepend provides HDEPEND as a new means to adjust
>               installation into "/" and ROOT.  If ebuilds using EAPIs
>               which do not support HDEPEND are built  in  the same
>               emerge run as those using EAPIs which do support HDEPEND,
>               this option affects only the former.

Curious - what's the status of HDEPEND for the main tree?

Paweł


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 827 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-05-13 19:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-03 10:05 [gentoo-dev] crossdev: installing _host_ build dependencies not automatic? Paweł Hajdan, Jr.
2017-05-03 15:56 ` Alexis Ballier
2017-05-03 21:47   ` James Le Cuirot
2017-05-04  8:21     ` Alexis Ballier
2017-05-13 19:41   ` Paweł Hajdan, Jr.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox