Skip to content

clojure formula dependency is wrong #50536

@puredanger

Description

@puredanger

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link? https://gist.github.com/puredanger/bf1597cf60ed911fd70348b9953c18f9
  • if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?

What you were trying to do (and why)

Install Clojure and use my existing Java installation.

What happened (include command output)

brew install clojure

Command output
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from f8a4dd9fc to 5b126ec85.
Updated 3 taps (homebrew/core, homebrew/cask and borkdude/brew).
==> New Formulae
iam-policy-json-to-terraform                      libcbor                                           raxml-ng
==> Updated Formulae
docker ✔                      cypher-shell                  helm@2                        nagios-plugins                sjk
glib ✔                        dartsim                       helmfile                      nco                           skaffold
gmp ✔                         deno                          hg-fast-export                netlify-cli                   skinny
imagemagick ✔                 dependency-check              hugo                          nifi                          smali
libheif ✔                     derby                         igv                           node@12                       sn0int
netpbm ✔                      detekt                        ipython                       nomad                         solr
pandoc ✔                      devspace                      istioctl                      nrpe                          solr@7.7
protobuf ✔                    dialog                        itex2mml                      nushell                       sonarqube
readline ✔                    dita-ot                       jack                          ocrmypdf                      sonarqube-lts
ruby ✔                        ditaa                         jadx                          octant                        sphinx-doc
ruby-build ✔                  dnscontrol                    jasmin                        octave                        sqlcipher
x265 ✔                        dwarfutils                    javacc                        octomap                       sqoop
acpica                        ec2-ami-tools                 jboss-forge                   opa                           srtp
aliyun-cli                    ec2-api-tools                 jdnssec-tools                 open-scene-graph              ssh-copy-id
angle-grinder                 ejabberd                      jena                          openapi-generator             stanford-corenlp
angular-cli                   elb-tools                     jenkins                       openimageio                   stanford-ner
ansible                       emscripten                    jetty                         openjdk@11                    stanford-parser
antibody                      erlang                        jetty-runner                  openssh                       starship
antlr@2                       ethereum                      jflex                         operator-sdk                  storm
apache-flink                  exploitdb                     jhipster                      orientdb                      subversion
apache-spark                  fastbit                       joshua                        ott                           suricata
apollo-cli                    fastqc                        jruby                         pacapt                        swagger2markup-cli
arduino-cli                   fetch-crl                     jsonschema2pojo               packer                        swiftformat
asciidoctorj                  ffmpeg                        jsvc                          paket                         tailor
ask-cli                       ffmpeg@2.8                    juju                          pandoc-citeproc               taskell
atari800                      file-roller                   jupyterlab                    percona-toolkit               tcl-tk
atlassian-cli                 firebase-cli                  kaitai-struct-compiler        pgweb                         tee-clc
aurora-cli                    fluent-bit                    kawa                          php                           teleport
aws-cfn-tools                 flume                         kube-aws                      php@7.2                       terraform
aws-elasticbeanstalk          flyway                        kubectx                       php@7.3                       terraform_landscape
aws-okta                      fmpp                          kumo                          phpstan                       terragrunt
awscli@1                      fonttools                     kyma-cli                      picard-tools                  tika
azure-cli                     fop                           languagetool                  pig                           tokei
bagit                         freeciv                       lazygit                       plantuml                      tomcat
balena-cli                    freeswitch                    lcm                           platformio                    tomcat-native
basex                         frege                         lcov                          pmd                           tomcat@7
beagle                        frege-repl                    ldc                           poco                          tomcat@8
bfg                           frotz                         ldns                          postgresql@10                 topgrade
bind                          galen                         libarchive                    postgresql@11                 tox
bison                         gatsby-cli                    libdap                        postgresql@9.4                traefik@1
bitlbee                       gcviewer                      libpq                         postgresql@9.6                tundra
boot-clj                      gdb                           libpqxx                       prestodb                      txr
broot                         git-annex                     libstfl                       prestosql                     typescript
bundletool                    git-credential-manager        liquidctl                     procs                         ucloud
byteman                       git-gui                       macvim                        procyon-decompiler            umlet
carrot2                       gitbucket                     mallet                        proj                          unifdef
cassandra                     giter8                        manticoresearch               prometheus                    upscaledb
certbot                       gjs                           mariadb-connector-c           pulumi                        vault-cli
cfn-lint                      glooctl                       mat2                          pyenv-virtualenv              vert.x
cfr-decompiler                gmime                         mdcat                         python-markdown               vim
cheat                         gnu-getopt                    mesa                          rav1e                         visp
chronograf                    golang-migrate                mgba                          raylib                        vnu
circleci                      gom                           micronaut                     rds-command-line-tools        vulkan-headers
citus                         goreleaser                    mikutter                      redpen                        walkmod
clhep                         gradle                        mill                          renameutils                   weechat
clojure                       grafana                       minikube                      root                          whois
clojurescript                 groovy                        minio-mc                      sbt                           wildfly-as
closure-compiler              groovysdk                     mit-scheme                    sbuild                        wiremock-standalone
closure-stylesheets           grpc                          mlt                           scala                         wpscan
cloud-watch                   gsettings-desktop-schemas     mmark                         scala@2.12                    wtf
cointop                       gsoap                         mmctl                         scdoc                         xmlsectool
cromwell                      gtk+3                         mockserver                    sdedit                        yaegi
crowdin                       hadoop                        modules                       serverless                    youtube-dl
crystal                       haproxy                       mpd                           siege                         zola
crystal-icr                   hcloud                        mutt                          signal-cli                    zsh
csound                        helm                          mvnvm                         simple-scan
==> Deleted Formulae
gh                                                                          zpython

==> Installing dependencies for clojure: openjdk and readline
==> Installing clojure dependency: openjdk
==> Downloading https://homebrew.bintray.com/bottles/openjdk-13.0.2+8_2.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/65/65adca036393f528e3830cab8b0aafec94be870de087d94cfe098fd593517307?__gda__=exp=1582297799~hmac=b5e6c5
######################################################################## 100.0%
==> Pouring openjdk-13.0.2+8_2.catalina.bottle.tar.gz
==> Caveats
For the system Java wrappers to find this JDK, symlink it with
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk

openjdk is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have openjdk first in your PATH run:
echo 'export PATH="/usr/local/opt/openjdk/bin:$PATH"' >> ~/.bash_profile

For compilers to find openjdk you may need to set:
export CPPFLAGS="-I/usr/local/opt/openjdk/include"

==> Summary
🍺 /usr/local/Cellar/openjdk/13.0.2+8_2: 631 files, 314.6MB
==> Installing clojure dependency: readline
==> Downloading https://homebrew.bintray.com/bottles/readline-8.0.4.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/6a/6ae1c8e7c783f32bd22c6085caa4d838fed7fb386da7e40ca47b87ec9b1237d6?__gda__=exp=1582297855~hmac=db812a
######################################################################## 100.0%
==> Pouring readline-8.0.4.catalina.bottle.tar.gz
==> Caveats
readline is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.

For compilers to find readline you may need to set:
export LDFLAGS="-L/usr/local/opt/readline/lib"
export CPPFLAGS="-I/usr/local/opt/readline/include"

For pkg-config to find readline you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig"

==> Summary
🍺 /usr/local/Cellar/readline/8.0.4: 48 files, 1.5MB
==> Installing clojure
==> Downloading https://download.clojure.org/install/clojure-tools-1.10.1.510.tar.gz
######################################################################## 100.0%
==> ./install.sh /usr/local/Cellar/clojure/1.10.1.510_1
🍺 /usr/local/Cellar/clojure/1.10.1.510_1: 11 files, 18.6MB, built in 4 seconds
==> Caveats
==> openjdk
For the system Java wrappers to find this JDK, symlink it with
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk

openjdk is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have openjdk first in your PATH run:
echo 'export PATH="/usr/local/opt/openjdk/bin:$PATH"' >> ~/.bash_profile

For compilers to find openjdk you may need to set:
export CPPFLAGS="-I/usr/local/opt/openjdk/include"

==> readline
readline is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.

For compilers to find readline you may need to set:
export LDFLAGS="-L/usr/local/opt/readline/lib"
export CPPFLAGS="-I/usr/local/opt/readline/include"

For pkg-config to find readline you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig"

What you expected to happen

Clojure formula should be installed but I already have a valid Java set up and I did not want openjdk installed. The clojure formula was recently changed incorrectly from Java >= 1.8 to adoptopenjdk.

I am on the Clojure core team and wrote the clojure brew formula and installer.

Clojure does not require adoptopenjdk. Some users use it with the Oracle JDK or other vendor JDKs. The requirement from a language perspective is any valid Java, >= 1.8, so the previous dependency was correct. Many Clojure users prefer to have control over their JDK version and most users are still using Java 8 as the module system introduced in Java 9 may require changes before migration.

Without the opportunity to do that migration, auto-installing adoptopenjdk at the latest version can cause their application to throw warnings or fail (due to modules that have been broken out of the JDK and are no longer automatically provided). Here is an example issue of how this can manifest to users: clojure-emacs/orchard#20 (this particular issue was not caused by this brew change, but is exactly the experience users with a forced Java update may encounter).

This commit should be reverted.

Step-by-step reproduction instructions (by running brew install commands)

brew install clojure

Metadata

Metadata

Assignees

No one assigned

    Labels

    outdatedPR was locked due to age

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions