firedrakeproject / firedrake

Firedrake is an automated system for the portable solution of partial differential equations using the finite element method (FEM)
https://firedrakeproject.org
Other
486 stars 157 forks source link

INSTALL: Linux (Ubuntu 22.04.4 LTS) #3654

Open adiegel opened 1 week ago

adiegel commented 1 week ago

Describe the error I am attempting to install firedrake on a Linux machine running Ubuntu 22.04.4 LTS. My python version is Python 3.10.12. It appears that the installation failed. I am attaching the logs to this post. Any help is appreciated.

Error message Traceback (most recent call last): File "/home/mathstudent/firedrake-install", line 1877, in install(p+"/") File "/home/mathstudent/firedrake-install", line 1058, in install run_pip_install(["-e", package]) File "/home/mathstudent/firedrake-install", line 991, in run_pip_install check_call(pipinstall + pipargs) File "/home/mathstudent/firedrake-install", line 672, in check_call log.debug(subprocess.check_output(arguments, stderr=subprocess.STDOUT, env=os.environ).decode()) File "/usr/lib/python3.10/subprocess.py", line 421, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/lib/python3.10/subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['/home/mathstudent/firedrake/bin/python', '-m', 'pip', 'install', '--no-build-isolation', '--no-binary', 'mpi4py,randomgen,numpy', '--no-deps', '-v', '-e', 'firedrake/']' returned non-zero exit status 1.

firedrake-install.log configure.log

connorjward commented 1 week ago

So the error message is

    gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory

Looking online (here and here) it seems like you may just need to run

$ sudo apt install g++

This is the sort of thing that should happen automatically in the install script though so this is a bit confusing.

Please can you try making sure that your system is up-to-date and then try again? I recommend running the following:

$ sudo apt update
$ sudo apt upgrade
$ sudo apt install g++

It may be possible at that point to just run firedrake-update (with the venv activated) instead of firedrake-install. I recommend trying that before doing a full install from scratch again.

adiegel commented 1 week ago

Hi Connor, Thank you for your help. Unfortunately, that did not work. I also tried reinstalling firedrake. I am attaching the new logs, but it looks to be the same issue. Could my g++ compiler be on a version that is newer than firedrake requires? When I run $sudo apt install g++, I get the following:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
g++ is already the newest version (4:11.2.0-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

firedrake-install.log configure.log

connorjward commented 1 week ago

OK this looks like an issue with the recent work done on tinyASM. @JDBetteridge is there something wrong with the compiler invocation? I wonder if we should be calling mpicxx instead of mpicc below?

    building 'tinyasm._tinyasm' extension
    creating build/temp.linux-x86_64-cpython-310/tinyasm
    /home/mathstudent/firedrake/src/petsc/default/bin/mpicc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/mathstudent/firedrake/lib/python3.10/site-packages/petsc4py/include -I/home/mathstudent/firedrake/src/petsc/include -I/home/mathstudent/firedrake/src/petsc/default/include -I/home/mathstudent/firedrake/lib/python3.10/site-packages/pybind11/include -I/home/mathstudent/firedrake/include -I/usr/include/python3.10 -c tinyasm/matinvert.cpp -o build/temp.linux-x86_64-cpython-310/tinyasm/matinvert.o -fvisibility=hidden -g0 -std=c++11
    gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory
    compilation terminated.