Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 466058 - =app-portage/eix-0.25.5 requires a C++ compiler to build, does not express bdep
Summary: =app-portage/eix-0.25.5 requires a C++ compiler to build, does not express bdep
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Martin Väth
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-16 04:51 UTC by Michael Mol
Modified: 2013-04-18 16:58 UTC (History)
3 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 Michael Mol 2013-04-16 04:51:28 UTC
When building =app-portage/eix-0.25.5 without a C++ compiler installed, the build fails at the configure step with:

checking whether the C++ compiler works... no
configure: error: in `/var/tmp/portage/app-portage/eix-0.25.5/work/eix-0.25.5':
configure: error: C++ compiler  cannot create executables

The package should express a bdep on gcc[cxx], to ensure the presence of a C++ compiler at build time.
Comment 1 Martin Väth 2013-04-17 14:55:14 UTC
In the case of eix, we would need this only if clang is not used
!clang? ( sys-devel/gcc[cxx] )

However, the dependency sys-devel/gcc[cxx] is not correct, either:

For instance, when I wanted to install new gcc:4.8[-fortran] for testing and a package in world bdepends on sys-devel/gcc[fortran], portage is not able to proceed (if --with-bdeps is active). This is just false, since installing a new gcc does not mean that the system's gcc looses fortran capability.

So the correct dependency should be something like
!clang? ( || ( sys-devel/gcc:4.8[cxx] sys-devel/gcc:4.7[cxx] ...) )
covering all gcc slots and needing to be updated whenever a new gcc slot appears.
This is somehow stupid and actually not correct either, since it does not guarantee that the system's gcc was compiled with USE=cxx.

I cannot see how one could express a correct dependency with current possibilities. Perhaps a general solution for such type of dependencies should be found in a new EAPI and we should wait until a correct solution is found?
Comment 2 Ian Stakenvicius (RETIRED) gentoo-dev 2013-04-17 16:21:20 UTC
As Martin said; there is no easy route for this.

The closest we can do is provide a message via pkg_pretend that will tell users that eix is likely to fail at configure time, so they know before doing a big emerge that their current environment won't support compilation and failure at configure time is expected.

I'm not sure this would be worth it; realistically, this bug is akin to an improperly setup environment (gcc-config not run to select a compiler, etc), and we don't try to provide pre-emerge warnings on those situations.  Thoughts?
Comment 3 Michael Mol 2013-04-17 16:32:44 UTC
My understanding of --with-bdeps is that Portage is supposed to ensure that the dependency is satisfied at build time. This does not suggest to me that Portage *should* fail out in the circumstance Martin describes; I would desire Portage to take steps to build the package at the time the bdep requirement is needed, but not be concerned before or after.

Really, I expect Martin's described scenario to be resolved by a resolution to bug 175808.
Comment 4 Ian Stakenvicius (RETIRED) gentoo-dev 2013-04-17 20:13:29 UTC
(In reply to comment #3)
> My understanding of --with-bdeps is that Portage is supposed to ensure that
> the dependency is satisfied at build time.

That is true for libraries, but toolchain dependencies (especially gcc) are not possible to resolve in this manner and --with-bdeps does not handle these cases.  Portage's dependency resolution can only go so far as to tell you that there is an atom installed which satisfies (R)DEPENDs; it does not and cannot check if the tools you have installed are operational or are selected for use.

There is a similar issue when, for instance, trying to determine a fortran compiler (there are many available in the tree but no way to guarantee that, even if one is emerged, you have something that can make you a binary).

To reiterate by example:  say we add gcc[cxx] as a dependency.  Portage would then (re)install gcc-4.6.3 with USE=+cxx.  However, a user may have gcc-4.5.4 selected via gcc-config and since it WASNT installed with USE=+cxx , eix will still fail at configure time.
Comment 5 Zac Medico gentoo-dev 2013-04-18 04:39:31 UTC
Also, --with-bdeps is intended to be entirely optional, so if you need it in order to avoid a build failure then something is wrong. The point of --with-bdeps is to pull in updates of build-time dependencies for packages that are already built/installed, which is useful for ensuring that all installed packages are at the latest available version.
Comment 6 SpanKY gentoo-dev 2013-04-18 16:58:13 UTC
see bug 466056