Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 634046 - After emerging dev-util/bazel-0.5.2 there should be advice to set JAVA_HOME
Summary: After emerging dev-util/bazel-0.5.2 there should be advice to set JAVA_HOME
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Zac Medico
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-11 20:30 UTC by Rabbe Fogelholm
Modified: 2019-10-21 06:00 UTC (History)
2 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.