Giter Site home page Giter Site logo

Comments (4)

abhi18av avatar abhi18av commented on June 14, 2024

Even after that, I run into the following error

Abhinavs-MacBook-Pro:~ eklavya$ sudo opam switch create 4.07.1+BER
[WARNING] Running as root is not recommended

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
[ocaml-variants.4.07.1+BER] found in cache

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
∗ installed base-bigarray.base
∗ installed base-threads.base
∗ installed base-unix.base
[ERROR] The compilation of ocaml-variants failed at "/Users/eklavya/.opam/opam-init/hooks/sandbox.sh build ./configure -prefix
        /Users/eklavya/.opam/4.07.1+BER -cc cc -aspp cc -c".

#=== ERROR while compiling ocaml-variants.4.07.1+BER ==========================#
# context     2.0.1 | macos/x86_64 |  | https://opam.ocaml.org#41ad4464
# path        ~/.opam/4.07.1+BER/.opam-switch/build/ocaml-variants.4.07.1+BER
# command     ~/.opam/opam-init/hooks/sandbox.sh build ./configure -prefix /Users/eklavya/.opam/4.07.1+BER -cc cc -aspp cc -c
# exit-code   2
# env-file    ~/.opam/log/ocaml-variants-54088-ffb3fd.env
# output-file ~/.opam/log/ocaml-variants-54088-ffb3fd.out
### output ###
# Configuring OCaml version 4.07.1
# Configuring for host x86_64-apple-darwin17.5.0 ...
# Configuring for target x86_64-apple-darwin17.5.0 ...
# Using compiler cc.
# cc: error: couldn't create cache file '/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db-0I43LQsf' (errno=Operation not permitted)
# cc: error: couldn't create cache file '/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db-nEKsLkkR' (errno=Operation not permitted)
# cc: error: couldn't create cache file '/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db-EIDDLBrr' (errno=Operation not permitted)
# Compiler family and version: clang-9-1.
# [ERROR!] Unable to compile the test program.
#  Make sure the C compiler cc is properly installed.



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
┌─ The following actions failed
│ λ build ocaml-variants 4.07.1+BER
└─
┌─ The following changes have been performed (the rest was aborted)
│ ∗ install base-bigarray base
│ ∗ install base-threads  base
│ ∗ install base-unix     base
└─
# Run eval $(opam env) to update the current shell environment
Switch initialisation failed: clean up? ('n' will leave the switch partially installed) [Y/n]

I have already done

sudo xcode-select --reset

Please guide me a bit here :)

from metaocaml-letrec.

abhi18av avatar abhi18av commented on June 14, 2024

I have since tried working with the environment variables like


alias gcc='gcc-8'
alias cc='gcc-8'
alias g++='g++-8'
alias c++='c++-8'


But when I try to install metaocaml, it still seems to be using clang

Abhinavs-MacBook-Pro:~ eklavya$ sudo opam switch create 4.07.1+BER
[WARNING] Running as root is not recommended

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
[ocaml-variants.4.07.1+BER] found in cache

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
∗ installed base-bigarray.base
∗ installed base-threads.base
∗ installed base-unix.base
[ERROR] The compilation of ocaml-variants failed at "/Users/eklavya/.opam/opam-init/hooks/sandbox.sh build ./configure -prefix
        /Users/eklavya/.opam/4.07.1+BER -cc cc -aspp cc -c".

#=== ERROR while compiling ocaml-variants.4.07.1+BER ==========================#
# context     2.0.1 | macos/x86_64 |  | https://opam.ocaml.org#41ad4464
# path        ~/.opam/4.07.1+BER/.opam-switch/build/ocaml-variants.4.07.1+BER
# command     ~/.opam/opam-init/hooks/sandbox.sh build ./configure -prefix /Users/eklavya/.opam/4.07.1+BER -cc cc -aspp cc -c
# exit-code   2
# env-file    ~/.opam/log/ocaml-variants-56546-ffb3fd.env
# output-file ~/.opam/log/ocaml-variants-56546-ffb3fd.out
### output ###
# Configuring OCaml version 4.07.1
# Configuring for host x86_64-apple-darwin17.5.0 ...
# Configuring for target x86_64-apple-darwin17.5.0 ...
# Using compiler cc.
# cc: error: couldn't create cache file '/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db-SLFHwPXO' (errno=Operation not permitted)
# cc: error: couldn't create cache file '/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db-nUGItVQz' (errno=Operation not permitted)
# cc: error: couldn't create cache file '/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db-gD5ZIuIZ' (errno=Operation not permitted)
# Compiler family and version: clang-9-1.
# [ERROR!] Unable to compile the test program.
#  Make sure the C compiler cc is properly installed.



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
┌─ The following actions failed
│ λ build ocaml-variants 4.07.1+BER
└─
┌─ The following changes have been performed (the rest was aborted)
│ ∗ install base-bigarray base
│ ∗ install base-threads  base
│ ∗ install base-unix     base
└─
# Run eval $(opam env) to update the current shell environment
Switch initialisation failed: clean up? ('n' will leave the switch partially installed) [Y/n] n
Abhinavs-MacBook-Pro:~ eklavya$ cc
gcc-8: fatal error: no input files
compilation terminated.

from metaocaml-letrec.

yallop avatar yallop commented on June 14, 2024

I don't think running opam under sudo will do what you need. In addition to the security issues, it'll install things in the wrong place (e.g. under the home directory of the root account) and with the wrong owner.

Once you've worked out how to get opam working on your system (which I can't help with, I'm afraid) I'd expect MetaOCaml installation to go much more smoothly.

from metaocaml-letrec.

abhi18av avatar abhi18av commented on June 14, 2024

Hi @yallop , I have realized the issue now.

Initially I had installed opam via homebrew which resulted in opam not being able to update or install anything.

Then eventually, after trying a lot many things, I just did the vanilla shell script based installation as mentioned in the website and then everything started working fine.

I've since been able to install and setup 4.07.1+BER without any issues 👍

from metaocaml-letrec.

Related Issues (3)

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.