Open spinor87 opened 11 months ago
Yeah, I know. I spent 5 minutes updating the homebrew package to the latest cadabra version, and then two hours trying to figure out why this happens. I have no idea so far, but it looks like the homebrew people messed up something. I don't have time to dig into this further, any help is welcome (if not I will probably remove the homebrew package altogether as it is just causing headaches).
any help is welcome
I will let you know if I figure out a fix.
Is there an update on this?
I am also having trouble building from source when I run the last step. This worked in the past for the previous version 2.4.2.4 but I have the following error for the latest version 2.4.4.1:
% sudo make install
[ 2%] Built target cadabra-server
[ 6%] Built target cadabra_client
[ 9%] Built target cadabra2html
[ 11%] Built target cadabra2latex
[ 79%] Built target cadabra2
[ 79%] Built target cadabra2-cli
[ 81%] Built target cdb-nbtool
[ 81%] Built target test_preprocessor
[ 83%] Built target cadabra2python
[ 86%] Built target cadabra2ipynb
[ 88%] Built target cadabra2cadabra
[ 90%] Built target _component
[ 90%] Built target _algorithm
[ 97%] Built target cadabra2-gtk
[ 97%] Built target quickstart_test
[ 97%] Built target beginners_test
[ 97%] Built target tensor_monomials_test
[ 97%] Built target for_previous_users_test
[ 97%] Built target converge_test
[100%] Built target fierz_test
[100%] Built target gamma_matrix_algebra_test
[100%] Built target poincare_algebra_test
[100%] Built target string_states_test
[100%] Built target bianchi_identities_test
[100%] Built target schwarzschild_test
[100%] Built target kaluza_klein_test
[100%] Built target scalar_manipulations_test
Install the project...
-- Install configuration: ""
-- Up-to-date: /usr/local/share/jupyter/kernels/cadabra2/kernel.json
-- Up-to-date: /usr/local/share/jupyter/kernels/cadabra2/logo-32x32.png
-- Up-to-date: /usr/local/share/jupyter/kernels/cadabra2/logo-64x64.png
-- Up-to-date: /opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/cadabra2_jupyter/__init__.py
-- Up-to-date: /opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/cadabra2_jupyter/__main__.py
-- Up-to-date: /opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/cadabra2_jupyter/context.py
-- Up-to-date: /opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/cadabra2_jupyter/completer.py
-- Up-to-date: /opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/cadabra2_jupyter/kernel.py
-- Up-to-date: /opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/cadabra2_jupyter/server.py
-- Up-to-date: /opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/notebook/static/components/codemirror/mode/cadabra/cadabra.js
CMake Error at client_server/cmake_install.cmake:49 (file):
file cannot create directory: /usr/local/share/cadabra2. Maybe need
administrative privileges.
Call Stack (most recent call first):
cmake_install.cmake:44 (include)
make: *** [install] Error 1
I can't help with the homebrew problem, they messed something up or changed something in a backward incompatible way and I do not have time to dig into that.
When you build from source and do make install
, unless you have indicated an installation directory which is writable for you, it will go into /usr/local/
and you need superuser privileges to write there. Do make
as normal user, and then sudo make install
to install.
Thanks for your response, Kasper. I do literally what you suggested
git clone https://github.com/kpeeters/cadabra2
cd cadabra2
mkdir build
cd build
cmake -DENABLE_MATHEMATICA=OFF ..
make
sudo make install
So I do make
as normal user, and then sudo make install
after that. This last step is what produced the error I mentioned earlier.
Some weird permissions on your /usr/local
folder. What does
ls -lad /usr/local
give?
That gives
drwxr-xr-x 17 root wheel 544 Jan 13 18:26 /usr/local
What should the normal permissions be?
What does
ls -la /usr/local/share/
give?
brew upgrade
is failing to upgrade Cadabra.Things I tried but which failed
brew cleanup
brew cleanup --prune=1
sudo chown -R <user> /opt/homebrew
sudo brew upgrade
(not supported anymore)This is a single-user Mac system and I do have admin privileges. However, the standard online remedies for a
CMake
error inbrew
did not cure the ailment.I am fairly certain this is just a
brew
problem with privileges and not a Cadabra issue, but I've never faced it in a form that wouldn't get fixed after usingchown
.