Giter Club home page Giter Club logo

Comments (6)

borkdude avatar borkdude commented on June 4, 2024 1

You can work around this for now by setting the JAVA_CMD environment variable

from babashka.

borkdude avatar borkdude commented on June 4, 2024

I guess the symlink is resolved here https://github.com/borkdude/deps.clj/blob/3e5dcdfe7b32e0d358a6f48cd46120596e83f02f/src/borkdude/deps.clj#L281

from babashka.

borkdude avatar borkdude commented on June 4, 2024

I guess many other Clojure tools would fail on this, e.g. tools.build would:

https://github.com/clojure/tools.build/blob/534e07e1d504ab419e3b65c21aac8169fe7170ae/src/main/clojure/clojure/tools/build/tasks/process.clj#L125

from babashka.

borkdude avatar borkdude commented on June 4, 2024

Here is a counter-repro produced by @ingydotnet

$ docker run -it --rm gentoo/stage3 bash
786fba5e0727 / # curl -sSLO https://download.oracle.com/graalvm/21/latest/graalvm-jdk-21_linux-x64_bin.tar.gz
786fba5e0727 / # curl -sSLO https://github.com/babashka/babashka/releases/download/v1.3.188/babashka-1.3.188-linux-amd64.tar.gz
786fba5e0727 / # tar xf graalvm-jdk-21_linux-x64_bin.tar.gz
786fba5e0727 / # tar xf babashka-1.3.188-linux-amd64.tar.gz
786fba5e0727 / # export JAVA_HOME=/graalvm-jdk-21.0.2+13.1 PATH=/:/graalvm-jdk-21.0.2+13.1/bin:$PATH
786fba5e0727 / # bb -Sdeps '{:deps {dev.weavejester/medley {:mvn/version "1.7.0"}}}' -e "(require '[medley.core])"
Clojure tools not yet in expected location: /root/.deps.clj/1.11.1.1435/ClojureTools/clojure-tools-1.11.1.1435.jar
Downloading https://github.com/clojure/brew-install/releases/download/1.11.1.1435/clojure-tools.zip to /root/.deps.clj/1.11.1.1435/ClojureTools/clojure-tools.zip
Unzipping /root/.deps.clj/1.11.1.1435/ClojureTools/clojure-tools.zip ...
Successfully installed clojure tools!
Downloading: org/clojure/clojure/1.11.1/clojure-1.11.1.pom from central
Downloading: org/clojure/core.specs.alpha/0.2.62/core.specs.alpha-0.2.62.pom from central
Downloading: org/clojure/spec.alpha/0.3.218/spec.alpha-0.3.218.pom from central
Downloading: org/clojure/pom.contrib/1.1.0/pom.contrib-1.1.0.pom from central
Downloading: dev/weavejester/medley/1.7.0/medley-1.7.0.pom from clojars
Downloading: org/clojure/core.specs.alpha/0.2.62/core.specs.alpha-0.2.62.jar from central
Downloading: org/clojure/spec.alpha/0.3.218/spec.alpha-0.3.218.jar from central
Downloading: org/clojure/clojure/1.11.1/clojure-1.11.1.jar from central
Downloading: dev/weavejester/medley/1.7.0/medley-1.7.0.jar from clojars

Is it possible to produce a similar repro for your above problem?

from babashka.

edannenberg avatar edannenberg commented on June 4, 2024

Thanks for the swift reply! Setting JAVA_CMD worked like a charm.

Setting JAVA_HOME with a manual install like that avoids the issue, the stage3 base image won't even have the java wrapper. Installing a standard Gentoo Java package with emerge -v openjdk-bin should do the trick. If you want to skip all the compiling I also maintain a Gentoo based Clojure image:

$ docker run -it --rm kubler/clojure
$ bash < <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install)
$ bb -Sdeps '{:deps {dev.weavejester/medley {:mvn/version "1.7.0"}}}' -e "(require '[medley.core])"
Clojure tools not yet in expected location: /root/.deps.clj/1.11.1.1435/ClojureTools/clojure-tools-1.11.1.1435.jar
Downloading https://github.com/clojure/brew-install/releases/download/1.11.1.1435/clojure-tools.zip to /root/.deps.clj/1.11.1.1435/ClojureTools/clojure-tools.zip
Unzipping /root/.deps.clj/1.11.1.1435/ClojureTools/clojure-tools.zip ...
Successfully installed clojure tools!
* run-java-tool was invoked directly
* run-java-tool should only be used via symlinks to it
Exception in thread "main" clojure.lang.ExceptionInfo:  babashka.process.Process@8e9e7e77
	at babashka.process$check.invokeStatic(process.cljc:111)
	at babashka.process$shell.invokeStatic(process.cljc:651)
	at babashka.impl.deps$add_deps$fn__27336.invoke(deps.clj:100)

from babashka.

borkdude avatar borkdude commented on June 4, 2024

Closing this since I'm not sure what is a fitting solution here and there is a workaround

from babashka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.