From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?H=C3=B6fling?= Subject: bug#33153: guix environment icedtea Date: Thu, 25 Oct 2018 21:07:26 +0200 Message-ID: <20181025210726.09f92ac7@alma-ubu> References: <20181025172501.GA25851@antelope> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/M+VWZ1rkTb3yCU4jUY7b7Y4"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFkzF-0001pu-Kk for bug-guix@gnu.org; Thu, 25 Oct 2018 15:08:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFkzC-0001lZ-C2 for bug-guix@gnu.org; Thu, 25 Oct 2018 15:08:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:38564) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gFkzC-0001lP-3C for bug-guix@gnu.org; Thu, 25 Oct 2018 15:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gFkzB-0004wU-Tk for bug-guix@gnu.org; Thu, 25 Oct 2018 15:08:01 -0400 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <20181025172501.GA25851@antelope> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Nam Nguyen Cc: 33153-done@debbugs.gnu.org --Sig_/M+VWZ1rkTb3yCU4jUY7b7Y4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, 25 Oct 2018 10:25:01 -0700 Nam Nguyen wrote: > I want to use guix environment with icedtea@3.7:jdk. > --8<---------------cut here---------------start------------->8--- > user@antelope ~$ guix environment icedtea@3.7:jdk > user@antelope ~ [env]$ java -version > java version "1.7.0_171" > OpenJDK Runtime Environment (IcedTea 2.6.13) (linux-gnu build > 1.7.0_171-b02) OpenJDK 64-Bit Server VM (build 24.171-b02, mixed mode) > --8<---------------cut here---------------end--------------->8--- >=20 > When I installed to my user profile, I was able to get the desired > icedtea version. > --8<---------------cut here---------------start------------->8--- > user@antelope ~$ guix package -i icedtea@3.7:jdk > user@antelope ~$ java -version > openjdk version "1.8.0_161" > OpenJDK Runtime Environment (IcedTea 3.7.0) (guix build 1.8.0_161-b12) > OpenJDK 64-Bit Server VM (build 25.161-b12, mixed mode) > --8<---------------cut here---------------end--------------->8--- >=20 > Is guix environment installing an incorrect version of icedtea? Hi Nam, read the docs :-) guix environment PACKAGE is setting up an environment FOR developing PACKAGE, i.e. all its dependencies/compilers are added to the environment. If you want to have a package directly IN the environment, use the --ad-hoc switch: guix environment --ad-hoc PACKAGE You can even combine both, for example to add more tools: guix environment --pure guix --ad-hoc git That would create a pure environment where the git command is available and all tools to develop guix. The guix command is not in here! In your case, IcedTea 2 is used to develop IcedTea 3, that's the reason why you found that in your environment. Finally, you can add a "-- command" to the environment to execute a command, so this should tell you the right version and afterwards automatically exit the environment(-C =3D=3D --container, to be absolutely sure): $ guix environment -C --ad-hoc icedtea@3.7:jdk -- javac -version javac 1.8.0_161 I'm closing that bug, Bj=C3=B6rn --Sig_/M+VWZ1rkTb3yCU4jUY7b7Y4 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlvSFG8ACgkQvyhstlk+X/3LegCgsFP4Pe8VAj4Qam+ZwdYEKGro ByMAn2aaADS+cVO2a4Eph80p6DLcZ0sO =wrS6 -----END PGP SIGNATURE----- --Sig_/M+VWZ1rkTb3yCU4jUY7b7Y4--