Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 634046 - After emerging dev-build/bazel-0.5.2 there should be advice to set JAVA_HOME
Summary: After emerging dev-build/bazel-0.5.2 there should be advice to set JAVA_HOME
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Jason Zaman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 922374
  Show dependency tree
 
Reported: 2017-10-11 20:30 UTC by Rabbe Fogelholm
Modified: 2024-02-24 12:52 UTC (History)
3 users (show)

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


Attachments
Output of `emerge --info' (e.txt,5.27 KB, text/plain)
2017-10-11 20:32 UTC, Rabbe Fogelholm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rabbe Fogelholm 2017-10-11 20:30:32 UTC
Typing `bazel help' produces 

    Couldn't find java at '/usr/libexec/bin/java'.

This can be fixed by setting JAVA_HOME, e.g. like this,

    export JAVA_HOME=`java-config --jdk-home`

I suggest that an "emerge message" is added for this, to make it easier
getting started, especially since there is no manpage and `bazel --help`
does not work either.
Comment 1 Rabbe Fogelholm 2017-10-11 20:32:43 UTC
Created attachment 498402 [details]
Output of `emerge --info'
Comment 2 Zac Medico gentoo-dev 2017-10-30 00:36:07 UTC
Normally JAVA_HOME is set by /etc/profile.d/java-config-2.sh which is installed by sys-apps/baselayout-java. Do you have that file?
Comment 3 Zac Medico gentoo-dev 2017-10-30 03:13:30 UTC
Since bazel already has a java-config dependency from the java-pkg-2 eclass it inherits, you probably just need to do this:

  source /etc/profile

I suppose would would suggest to do that with an elog message on the first install, possibly using the readme.gentoo-r1 eclass.
Comment 4 Alessandro Barbieri 2021-10-25 07:10:28 UTC
I can run bazel as an user but not inside ebuilds
echo $JAVA_HOME inside an ebuild return nothing
You say that the bazel eclass is inheriting java-pkg-2 but that isn't true
Comment 5 Larry the Git Cow gentoo-dev 2024-02-24 12:52:54 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=937bb2fe50b5f938cca85d4a3b2ba55dbf71e617

commit 937bb2fe50b5f938cca85d4a3b2ba55dbf71e617
Author:     Jakov Smolić <jsmolic@gentoo.org>
AuthorDate: 2024-02-24 12:50:14 +0000
Commit:     Jakov Smolić <jsmolic@gentoo.org>
CommitDate: 2024-02-24 12:50:14 +0000

    dev-build/bazel: treeclean
    
    Bug: https://bugs.gentoo.org/878501
    Closes: https://bugs.gentoo.org/906914
    Closes: https://bugs.gentoo.org/917689
    Closes: https://bugs.gentoo.org/918703
    Closes: https://bugs.gentoo.org/634046
    Closes: https://bugs.gentoo.org/652776
    Closes: https://bugs.gentoo.org/687538
    Closes: https://bugs.gentoo.org/747370
    Closes: https://bugs.gentoo.org/766243
    Closes: https://bugs.gentoo.org/790116
    Closes: https://bugs.gentoo.org/820179
    Closes: https://bugs.gentoo.org/820182
    Closes: https://bugs.gentoo.org/832935
    Closes: https://bugs.gentoo.org/837023
    Closes: https://bugs.gentoo.org/846464
    Closes: https://bugs.gentoo.org/858314
    Closes: https://bugs.gentoo.org/867292
    Closes: https://bugs.gentoo.org/872455
    Closes: https://bugs.gentoo.org/884477
    Closes: https://bugs.gentoo.org/895300
    Closes: https://bugs.gentoo.org/909434
    Closes: https://bugs.gentoo.org/917257
    Closes: https://bugs.gentoo.org/919798
    Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>

 dev-build/bazel/Manifest                           |   7 --
 dev-build/bazel/bazel-3.7.2-r1.ebuild              | 117 ---------------------
 dev-build/bazel/bazel-4.2.2.ebuild                 | 100 ------------------
 dev-build/bazel/bazel-5.0.0.ebuild                 |  96 -----------------
 dev-build/bazel/bazel-5.1.1.ebuild                 |  96 -----------------
 dev-build/bazel/bazel-5.3.0.ebuild                 | 102 ------------------
 dev-build/bazel/bazel-6.2.0.ebuild                 | 102 ------------------
 dev-build/bazel/bazel-6.4.0.ebuild                 | 102 ------------------
 .../bazel-3.2.0-include-limits-for-gcc-11.patch    |  25 -----
 .../bazel-3.7.2-musl-temp-failure-retry.patch      |  34 ------
 .../files/bazel-4.2.2-absl_numeric_limits.patch    |  41 --------
 dev-build/bazel/metadata.xml                       |  20 ----
 profiles/package.mask                              |  15 ---
 profiles/updates/1Q-2024                           |   1 -
 14 files changed, 858 deletions(-)