Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brew install infer error #467

Closed
Will5 opened this issue Sep 25, 2016 · 13 comments
Closed

brew install infer error #467

Will5 opened this issue Sep 25, 2016 · 13 comments
Milestone

Comments

@Will5
Copy link

Will5 commented Sep 25, 2016

I recently updated facebook infer on my work laptop, and am trying to update infer on my personal laptop. It installed without an issue on my work laptop, but I am getting an error (see below) on my personal laptop. Both have opam 1.2.2 and ocaml 4.03.0 installed. If I execute opam init --comp=VERSION, I see that everything is already up-to-date. Any ideas why brew install infer could be failing?

[User]-MacBook-Pro:~ [User]$ brew install infer
==> Using the sandbox
==> Downloading https://github.com/facebook/infer/releases/download/v0.9.2/infer
Already downloaded: /Users/[User]/Library/Caches/Homebrew/infer-0.9.2.tar.xz
==> ./build-infer.sh all --yes
Last 15 lines from /Users/[User]/Library/Logs/Homebrew/infer/01.build-infer.sh:

initializing opam... 
Checking for available remotes: rsync and local, git.
  - you won't be able to use mercurial repositories unless you install the hg
    command on your system.
  - you won't be able to use darcs repositories unless you install the darcs
    command on your system.

[WARNING] Recommended external solver aspcud not found.
[ERROR] No OCaml compiler found in path. You should use:

            opam init --comp=VERSION

[ERROR] Initialisation failed
OpamGlobals.Exit(66)

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
  https://github.com/Homebrew/homebrew-core/issues

These open issues may also help:
infer 0.9.3 https://github.com/Homebrew/homebrew-core/pull/5130

My work laptop is on OS X El Capitan Version 10.11.6, and my personal laptop is on macOS Sierra Version 10.12.

http://stackoverflow.com/questions/39683280/brew-install-infer-error

@jberdine
Copy link
Contributor

jberdine commented Sep 25, 2016 via email

@Will5
Copy link
Author

Will5 commented Sep 25, 2016

Hi @jberdine, I tried reinstalling both ocaml and opam, then installing infer, but infer threw the same error

@jberdine
Copy link
Contributor

We are working on this. Brew seems now to sandbox more aggressively and opam cannot find the system ocaml, and the opam init call we use in the build script needs a system ocaml. We will release a new version and update brew soon.

@jberdine jberdine added this to the 0.9.4 milestone Sep 26, 2016
@self-creative
Copy link

self-creative commented Oct 2, 2016

but i can't install infer with

brew install

my mac os is on macOS Version 10.12.

initializing opam...
Checking for available remotes: rsync and local, git.

  • you won't be able to use mercurial repositories unless you install the hg
    command on your system.
  • you won't be able to use darcs repositories unless you install the darcs
    command on your system.

[WARNING] Recommended external solver aspcud not found.
[ERROR] No OCaml compiler found in path. You should use:
opam init --comp=VERSION
[ERROR] Initialisation failed
OpamGlobals.Exit(66)

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
https://github.com/Homebrew/homebrew-core/issues

@self-creative
Copy link

if i build from source code
run sh build-infer.sh clang

following error will occur:

ocamlfind ocamlopt -package unix,atdgen,camlzip -I build -o build/clang_ast_visit.cmx -c clang_ast_visit.ml
ocamlfind ocamlopt -package unix,atdgen,camlzip -I build -o build/clang_ast_j.cmx -c build/clang_ast_j.ml
File "build/clang_ast_proj.ml", line 53, characters 2-28:
Error: This variant pattern is expected to have type Clang_ast_t.decl
The constructor ConstructorUsingShadowDecl does not belong to type Clang_ast_t.decl
make[1]: *** [build/clang_ast_proj.cmx] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [clang_plugin] Error 2

compilation failure; you can try running

make clean
build-infer.sh clang

@h32
Copy link

h32 commented Oct 24, 2016

Same problem, any thoughts how to fix it? (macOS 10.12)

@eXhausted
Copy link

same problem (macOS 10.12)

@loyaltyarm
Copy link

loyaltyarm commented Nov 1, 2016

I'm getting this error on 10.11.5 as well, with some additional output below:

Error: Execution of '/usr/local/bin/brew install infer --without-clang' returned 1: ==> Installing dependencies for infer: automake, libtool, ocaml, ocamlbuild, camlp4, gringo, clasp, aspcud, opam
==> Installing infer dependency: automake
==> Downloading https://homebrew.bintray.com/bottles/automake-1.15.el_capitan.bottle.2.tar.gz
==> Pouring automake-1.15.el_capitan.bottle.2.tar.gz
/usr/local/Cellar/automake/1.15: 130 files, 2.9M
==> Installing infer dependency: libtool
==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6_1.el_capitan.bottle.tar.gz
==> Pouring libtool-2.4.6_1.el_capitan.bottle.tar.gz
==> Caveats
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
==> Summary
/usr/local/Cellar/libtool/2.4.6_1: 70 files, 3.7M
==> Installing infer dependency: ocaml
==> Downloading https://homebrew.bintray.com/bottles/ocaml-4.03.0.el_capitan.bottle.tar.gz
==> Pouring ocaml-4.03.0.el_capitan.bottle.tar.gz
/usr/local/Cellar/ocaml/4.03.0: 1,641 files, 173.7M
==> Installing infer dependency: ocamlbuild
==> Downloading https://homebrew.bintray.com/bottles/ocamlbuild-0.9.2.el_capitan.bottle.tar.gz
==> Pouring ocamlbuild-0.9.2.el_capitan.bottle.tar.gz
/usr/local/Cellar/ocamlbuild/0.9.2: 26 files, 6.6M
==> Installing infer dependency: camlp4
==> Downloading https://homebrew.bintray.com/bottles/camlp4-4.03+1.el_capitan.bottle.tar.gz
==> Pouring camlp4-4.03+1.el_capitan.bottle.tar.gz
/usr/local/Cellar/camlp4/4.03+1: 164 files, 142.2M
==> Installing infer dependency: gringo
==> Downloading https://homebrew.bintray.com/bottles/gringo-4.5.4.el_capitan.bottle.tar.gz
==> Pouring gringo-4.5.4.el_capitan.bottle.tar.gz
/usr/local/Cellar/gringo/4.5.4: 7 files, 5.6M
==> Installing infer dependency: clasp
==> Downloading https://homebrew.bintray.com/bottles/clasp-3.1.3.el_capitan.bottle.tar.gz
==> Pouring clasp-3.1.3.el_capitan.bottle.tar.gz
/usr/local/Cellar/clasp/3.1.3: 5 files, 1011.5K
==> Installing infer dependency: aspcud
==> Downloading https://homebrew.bintray.com/bottles/aspcud-1.9.1.el_capitan.bottle.2.tar.gz
==> Pouring aspcud-1.9.1.el_capitan.bottle.2.tar.gz
/usr/local/Cellar/aspcud/1.9.1: 10 files, 460.6K
==> Installing infer dependency: opam
==> Downloading https://homebrew.bintray.com/bottles/opam-1.2.2_2.el_capitan.bottle.tar.gz
==> Pouring opam-1.2.2_2.el_capitan.bottle.tar.gz
==> Caveats
OPAM uses ~/.opam by default for its package database, so you need to
initialize it first by running (as a normal user):

$  opam init

Run the following to initialize your environment variables:

$  eval `opam config env`

To export the needed variables every time, add them to your dotfiles.
  * On Bash, add them to `~/.bash_profile`.
  * On Zsh, add them to `~/.zprofile` or `~/.zshrc` instead.

Documentation and tutorials are available at https://opam.ocaml.org, or
via "man opam" and "opam --help".

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completion has been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
/usr/local/Cellar/opam/1.2.2_2: 30 files, 14.9M
==> Installing infer
==> Using the sandbox
==> Downloading https://github.com/facebook/infer/releases/download/v0.9.2/infer-osx-v0.9.2.tar.xz
==> Downloading from https://github-cloud.s3.amazonaws.com/releases/29857799/bc398246-6931-11e6-951e-e92ce8ba2a57.xz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20161101%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20161101T204506Z&X-Amz-Expires=300&X-Amz-Signature=3be0f9d5366fa5917e5407ae2d94b44051c863651b4e08247d14a8eaafd61bd1&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dinfer-osx-v0.9.2.tar.xz&response-content-type=application%2Foctet-stream
==> ./build-infer.sh java --yes
Last 15 lines from /Library/Logs/Homebrew/infer/01.build-infer.sh:

initializing opam... 
Checking for available remotes: rsync and local, git.
  - you won't be able to use mercurial repositories unless you install the hg
    command on your system.
  - you won't be able to use darcs repositories unless you install the darcs
    command on your system.

[WARNING] Recommended external solver aspcud not found.
[ERROR] No OCaml compiler found in path. You should use:

            opam init --comp=VERSION

[ERROR] Initialisation failed
OpamGlobals.Exit(66)

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
  https://github.com/Homebrew/homebrew-core/issues
Error: /Stage[main]/Infer/Package[infer]/ensure: change from absent to present failed: Execution of '/usr/local/bin/brew install infer --without-clang' returned 1: ==> Installing dependencies for infer: automake, libtool, ocaml, ocamlbuild, camlp4, gringo, clasp, aspcud, opam
==> Installing infer dependency: automake
==> Downloading https://homebrew.bintray.com/bottles/automake-1.15.el_capitan.bottle.2.tar.gz
==> Pouring automake-1.15.el_capitan.bottle.2.tar.gz
/usr/local/Cellar/automake/1.15: 130 files, 2.9M
==> Installing infer dependency: libtool
==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6_1.el_capitan.bottle.tar.gz
==> Pouring libtool-2.4.6_1.el_capitan.bottle.tar.gz
==> Caveats
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
==> Summary
/usr/local/Cellar/libtool/2.4.6_1: 70 files, 3.7M
==> Installing infer dependency: ocaml
==> Downloading https://homebrew.bintray.com/bottles/ocaml-4.03.0.el_capitan.bottle.tar.gz
==> Pouring ocaml-4.03.0.el_capitan.bottle.tar.gz
/usr/local/Cellar/ocaml/4.03.0: 1,641 files, 173.7M
==> Installing infer dependency: ocamlbuild
==> Downloading https://homebrew.bintray.com/bottles/ocamlbuild-0.9.2.el_capitan.bottle.tar.gz
==> Pouring ocamlbuild-0.9.2.el_capitan.bottle.tar.gz
/usr/local/Cellar/ocamlbuild/0.9.2: 26 files, 6.6M
==> Installing infer dependency: camlp4
==> Downloading https://homebrew.bintray.com/bottles/camlp4-4.03+1.el_capitan.bottle.tar.gz
==> Pouring camlp4-4.03+1.el_capitan.bottle.tar.gz
/usr/local/Cellar/camlp4/4.03+1: 164 files, 142.2M
==> Installing infer dependency: gringo
==> Downloading https://homebrew.bintray.com/bottles/gringo-4.5.4.el_capitan.bottle.tar.gz
==> Pouring gringo-4.5.4.el_capitan.bottle.tar.gz
/usr/local/Cellar/gringo/4.5.4: 7 files, 5.6M
==> Installing infer dependency: clasp
==> Downloading https://homebrew.bintray.com/bottles/clasp-3.1.3.el_capitan.bottle.tar.gz
==> Pouring clasp-3.1.3.el_capitan.bottle.tar.gz
/usr/local/Cellar/clasp/3.1.3: 5 files, 1011.5K
==> Installing infer dependency: aspcud
==> Downloading https://homebrew.bintray.com/bottles/aspcud-1.9.1.el_capitan.bottle.2.tar.gz
==> Pouring aspcud-1.9.1.el_capitan.bottle.2.tar.gz
/usr/local/Cellar/aspcud/1.9.1: 10 files, 460.6K
==> Installing infer dependency: opam
==> Downloading https://homebrew.bintray.com/bottles/opam-1.2.2_2.el_capitan.bottle.tar.gz
==> Pouring opam-1.2.2_2.el_capitan.bottle.tar.gz
==> Caveats
OPAM uses ~/.opam by default for its package database, so you need to
initialize it first by running (as a normal user):

$  opam init

Run the following to initialize your environment variables:

$  eval `opam config env`

To export the needed variables every time, add them to your dotfiles.
  * On Bash, add them to `~/.bash_profile`.
  * On Zsh, add them to `~/.zprofile` or `~/.zshrc` instead.

Documentation and tutorials are available at https://opam.ocaml.org, or
via "man opam" and "opam --help".

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completion has been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
/usr/local/Cellar/opam/1.2.2_2: 30 files, 14.9M
==> Installing infer
==> Using the sandbox
==> Downloading https://github.com/facebook/infer/releases/download/v0.9.2/infer-osx-v0.9.2.tar.xz
==> Downloading from https://github-cloud.s3.amazonaws.com/releases/29857799/bc398246-6931-11e6-951e-e92ce8ba2a57.xz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20161101%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20161101T204506Z&X-Amz-Expires=300&X-Amz-Signature=3be0f9d5366fa5917e5407ae2d94b44051c863651b4e08247d14a8eaafd61bd1&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dinfer-osx-v0.9.2.tar.xz&response-content-type=application%2Foctet-stream
==> ./build-infer.sh java --yes
Last 15 lines from /Library/Logs/Homebrew/infer/01.build-infer.sh:

initializing opam... 
Checking for available remotes: rsync and local, git.
  - you won't be able to use mercurial repositories unless you install the hg
    command on your system.
  - you won't be able to use darcs repositories unless you install the darcs
    command on your system.

[WARNING] Recommended external solver aspcud not found.
[ERROR] No OCaml compiler found in path. You should use:

            opam init --comp=VERSION

[ERROR] Initialisation failed
OpamGlobals.Exit(66)

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
  https://github.com/Homebrew/homebrew-core/issues

I don't recall having to manage opam previous, should this be referred to homebrew-core? In this log we are attempting to install on a machine with no previous infer installed.

@persenlee
Copy link

I got same problem.
something got wrong with build-infer.sh when call opam
but I dont know where is build-infer.sh,may be I can change script manually

@jvillard
Copy link
Contributor

jvillard commented Nov 8, 2016

@self-creative can you please open a separate issue for your problem when compiling from source?

Others: we should have a new Homebrew release by next week, stay tuned.

@sencho
Copy link

sencho commented Nov 19, 2016

Same issue,but i can install 0.9.3 successfully by manual installaction.

@Will5
Copy link
Author

Will5 commented Nov 29, 2016

Resolved in Infer version 0.9.4.1

@Will5 Will5 closed this as completed Nov 29, 2016
@maissanemerrheim
Copy link

Hi everyone,

I would like to install Infer. I tried to use the command .brew install infer. However it didn't work. In fact, I have this error : Error: infer has been disabled because it does not build! . As I looked on the internet, apparently it is a common problem for the macOS Monterey when installing infer. I also tried the command 'brew install --dry-run infer' and this is a part of the output :
'Would install 1 formula: infer
==>Would install 6 dependencies for infer:
libtool ninja openjdk@11 gdbm mpdecimal python@3.9

This is why I decided to install it from the source. I followed this tutorial : https://github.com/facebook/infer/blob/main/INSTALL.md but it doesn't work. In fact, when I try to run infer, I have a zsh command not found : infer .

My operating system and version : macOS Monterey Version 12.6
I am trying to run this command : infer run -- javac Hello.java
My code :
(base) username examples % infer run -- javac Hello.java
zsh: command not found: infer

Note : I installed the dependencies after installing infer from source.

Thank you for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants