Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 415209 - cross-emerge into alternative root does not install build time dependencies in alternative root
Summary: cross-emerge into alternative root does not install build time dependencies i...
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 412909 (view as bug list)
Depends on: 317337
Blocks: 137867
  Show dependency tree
 
Reported: 2012-05-09 09:23 UTC by Vladimir Smirnov (RETIRED)
Modified: 2015-05-09 18:07 UTC (History)
3 users (show)

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


Attachments
emerge --info for "emerge-armv6z-hardfloat-linux-gnueabi" (cross-arm-emerge.info,5.02 KB, text/plain)
2012-05-09 09:23 UTC, Vladimir Smirnov (RETIRED)
Details
build log (build.log,211.65 KB, text/plain)
2012-05-09 18:01 UTC, Vladimir Smirnov (RETIRED)
Details
emerge --debug -p pam (debug.log,29.77 KB, text/plain)
2012-05-09 19:16 UTC, Vladimir Smirnov (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Smirnov (RETIRED) gentoo-dev 2012-05-09 09:23:46 UTC
Created attachment 311217 [details]
emerge --info for "emerge-armv6z-hardfloat-linux-gnueabi"

I'm trying to crosscompile armv6z basic rootfs.

USE="-*" emerge-armv6z-hardfloat-linux-gnueabi pam failes with: "pam_conv_l.c:(.text+0xb20): undefined reference to `yywrap'".

It's fixed if flex is builded before pam.

pam's version: 1.1.5 and 1.1.3.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-05-09 14:51:43 UTC
pam-1.1.3.ebuild : EAPI=3
pam-1.1.3.ebuild : INHERIT libtool multilib toolchain-funcs eutils user pam flag-o-matic db-use versionator
pam-1.1.3.ebuild : DEPEND="
[...]
pam-1.1.3.ebuild :              sys-devel/flex
[...]
pam-1.1.3.ebuild : "
pam-1.1.5.ebuild : EAPI=4
pam-1.1.5.ebuild : INHERIT libtool multilib toolchain-funcs eutils user pam flag-o-matic db-use versionator
pam-1.1.5.ebuild : DEPEND="
[...]
pam-1.1.5.ebuild :              sys-devel/flex
[...]
pam-1.1.5.ebuild : "

No, it's there all right. Maybe it's virtual/yacc that's needed? - Please attach the entire failing build log to this bug report.
Comment 2 Vladimir Smirnov (RETIRED) gentoo-dev 2012-05-09 18:01:34 UTC
Created attachment 311267 [details]
build log

Again, it's important that it's cross-building for another arch.
Comment 3 Vladimir Smirnov (RETIRED) gentoo-dev 2012-05-09 18:04:47 UTC
(In reply to comment #2)
> Created attachment 311267 [details]
> build log
> 
> Again, it's important that it's cross-building for another arch.

Fix is simple - flex should be RDEPEND, not DEPEND.
Comment 4 Vladimir Smirnov (RETIRED) gentoo-dev 2012-05-09 18:28:01 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Created attachment 311267 [details]
> > build log
> > 
> > Again, it's important that it's cross-building for another arch.
> 
> Fix is simple - flex should be RDEPEND, not DEPEND.

It is bug in portage 2.2.0 (bug was at least in alpha90, can reproduce in alpha1-02 and 9999 too). Portage 2.1 works as expected.
Comment 5 Zac Medico gentoo-dev 2012-05-09 18:47:57 UTC
Portage 2.2 and 2.1 have the same code. The only difference is that Portage 2.2 has some experimental features enabled, such as package sets and preserve-libs. There's no difference in handling of DEPEND and RDEPEND.
Comment 6 Vladimir Smirnov (RETIRED) gentoo-dev 2012-05-09 18:49:31 UTC
(In reply to comment #5)
> Portage 2.2 and 2.1 have the same code. The only difference is that Portage
> 2.2 has some experimental features enabled, such as package sets and
> preserve-libs. There's no difference in handling of DEPEND and RDEPEND.

Downgrade to portage 2.1.10.57 solved this issue. Upgrade to portage-9999 or 2.2alpha* introduced again.
Comment 7 Zac Medico gentoo-dev 2012-05-09 18:55:10 UTC
(In reply to comment #6)
> Downgrade to portage 2.1.10.57 solved this issue. Upgrade to portage-9999 or
> 2.2alpha* introduced again.

What's the difference? Are the packages merged in a different order, or what?
Comment 8 Vladimir Smirnov (RETIRED) gentoo-dev 2012-05-09 18:56:09 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Downgrade to portage 2.1.10.57 solved this issue. Upgrade to portage-9999 or
> > 2.2alpha* introduced again.
> 
> What's the difference? Are the packages merged in a different order, or what?

With 2.2 pam doesn't merged at all.
Comment 9 Vladimir Smirnov (RETIRED) gentoo-dev 2012-05-09 18:59:51 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > Downgrade to portage 2.1.10.57 solved this issue. Upgrade to portage-9999 or
> > > 2.2alpha* introduced again.
> > 
> > What's the difference? Are the packages merged in a different order, or what?
> 
> With 2.2 pam doesn't merged at all.

Minimal test-case:
mkdir -p /tmp/portage-test
USE="-*" ROOT="/tmp/portage-test" emerge -pv pam

flex should be there, but it isn't

If you move flex to RDEPEND and do that again, flex will be in deps.
Comment 10 Zac Medico gentoo-dev 2012-05-09 19:05:54 UTC
(In reply to comment #9)
> Minimal test-case:
> mkdir -p /tmp/portage-test
> USE="-*" ROOT="/tmp/portage-test" emerge -pv pam
> 
> flex should be there, but it isn't
> 
> If you move flex to RDEPEND and do that again, flex will be in deps.

This is the expected behavior, regardless of the portage version.
Comment 11 Vladimir Smirnov (RETIRED) gentoo-dev 2012-05-09 19:06:43 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > Minimal test-case:
> > mkdir -p /tmp/portage-test
> > USE="-*" ROOT="/tmp/portage-test" emerge -pv pam
> > 
> > flex should be there, but it isn't
> > 
> > If you move flex to RDEPEND and do that again, flex will be in deps.
> 
> This is the expected behavior, regardless of the portage version.

DEPEND - dependencies that are needed for software to compile, RDEPEND - to run, or I'm not right?
Comment 12 Zac Medico gentoo-dev 2012-05-09 19:09:38 UTC
(In reply to comment #11)
> DEPEND - dependencies that are needed for software to compile, RDEPEND - to
> run, or I'm not right?

Yes, but the --root-deps or --root-deps=rdeps options change dependency resolution behavior. Are you using either of those?
Comment 13 Vladimir Smirnov (RETIRED) gentoo-dev 2012-05-09 19:16:59 UTC
Created attachment 311281 [details]
emerge --debug -p pam

I've attached debug.log for last case.
Comment 14 Vladimir Smirnov (RETIRED) gentoo-dev 2012-05-09 19:24:15 UTC
It's still a bug in ebuild: flex is needed on runtime too, so it should be both in RDEPENDs and DEPENDs.
Comment 15 Zac Medico gentoo-dev 2012-05-09 19:26:34 UTC
(In reply to comment #14)
> It's still a bug in ebuild: flex is needed on runtime too, so it should be
> both in RDEPENDs and DEPENDs.

The flex library is static though, right? That might mean that it's only needed at build time.

Anyway, this issue seems similar in some ways to bug 412909.
Comment 16 SpanKY gentoo-dev 2013-12-31 18:51:58 UTC
*** Bug 412909 has been marked as a duplicate of this bug. ***
Comment 17 James Le Cuirot gentoo-dev 2015-05-09 18:07:29 UTC
This is what HDEPEND was for but it was rejected. Proposing a better alternative is on my rather long todo list.