Comments (6)
You can work around this for now by setting the JAVA_CMD
environment variable
from babashka.
I guess the symlink is resolved here https://github.com/borkdude/deps.clj/blob/3e5dcdfe7b32e0d358a6f48cd46120596e83f02f/src/borkdude/deps.clj#L281
from babashka.
I guess many other Clojure tools would fail on this, e.g. tools.build would:
from babashka.
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.
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.
Closing this since I'm not sure what is a fitting solution here and there is a workaround
from babashka.
Related Issues (20)
- Caching issue with relative local/root by same name, used in bb.edn in different directories HOT 1
- Resolve bb.edn when script is invoked via symlink HOT 1
- No dispatch macro for: ? HOT 9
- metadata added by read-string (as compared to clj implementation). HOT 9
- Embedding META-INF/bb.edn with :deps results in: Cannot run program "java"
- Adding javax.net.ssl.SSLSocket and javax.net.ssl.SSLSocketFactory? HOT 33
- Static-linked binary file for armv7(32-bit) platform. HOT 1
- hash-ordered-coll not found in clojure.core HOT 1
- Try to support latest changes in at-at
- Wrapping built-in timbre/log! throws an error HOT 3
- exec-task description
- bb --version could run without a JVM HOT 3
- Can't use a lambda in a babashka's task HOT 2
- Babashka's `use-fixtures` doesn't add `:clojure.test/*-fixtures` metadata to namespace
- Dynamic var *test-out* not properly bound when clojure.test is called from within the nrepl
- bb should error when bb.edn does not contain exactly one valid form HOT 4
- Feature request: Expose flatland.ordered.set/ordered-set HOT 1
- command line separation with -- broken in several context HOT 10
- Make transcriptor work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babashka.