Skip to content

Errors installing Mathematica #13718

@brisk022

Description

@brisk022

I tried to install mathematica from the builtin recipe using a fresh installation of spack v0.13.0 with all default settings on Ubuntu 18.04. First, I got an error when spack was trying to copy the log file.

$ spack -d install mathematica
...
lib/spack/spack/fetch_strategy.py:312 ==> [2019-11-13-11:32:44.728155] Fetching file:///home/ubuntu/downloads/Mathematica_12.0.0_LINUX.sh                                                                                                                     [150/811]
lib/spack/spack/util/executable.py:159 ==> [2019-11-13-11:32:44.728941] '/usr/bin/curl' '-C' '-' '-o' '/tmp/ubuntu/spack-stage/spack-stage-mathematica-12.0.0-qn3v7car65i6g3dtjgcbha5giejbjpgu/Mathematica_12.0.0_LINUX.sh.part' '-f' '-D' '-' '-L' 'file:///home/ubunt
u/downloads/Mathematica_12.0.0_LINUX.sh' '-#'
############################################################################################################################ 100.0%
lib/spack/spack/fetch_strategy.py:404 ==> [2019-11-13-11:34:42.632324] Staging unexpanded archive /tmp/ubuntu/spack-stage/spack-stage-mathematica-12.0.0-qn3v7car65i6g3dtjgcbha5giejbjpgu/Mathematica_12.0.0_LINUX.sh in /tmp/ubuntu/spack-stage/spack-stage-mathematic
a-12.0.0-qn3v7car65i6g3dtjgcbha5giejbjpgu/spack-src
lib/spack/spack/stage.py:517 ==> [2019-11-13-11:34:42.633283] Created stage in /tmp/ubuntu/spack-stage/spack-stage-mathematica-12.0.0-qn3v7car65i6g3dtjgcbha5giejbjpgu
lib/spack/spack/package.py:1129 ==> [2019-11-13-11:34:42.633872] No patches needed for mathematica
lib/spack/spack/package.py:1667 ==> [2019-11-13-11:34:42.634350] Building mathematica [Package]
lib/spack/llnl/util/lock.py:334 ==> [2019-11-13-11:34:42.635159] WRITE LOCK: /tmp/ubuntu/spack-stage/.lock[992830639569496916:1] [Acquiring]
lib/spack/llnl/util/lock.py:334 ==> [2019-11-13-11:34:42.635983] WRITE LOCK: /tmp/ubuntu/spack-stage/.lock[992830639569496916:1] [Acquired]
lib/spack/llnl/util/lock.py:334 ==> [2019-11-13-11:34:42.636686] WRITE LOCK: /sapps/spack/opt/spack/.spack-db/prefix_lock[4736572689609369841:1] [Acquiring]
lib/spack/llnl/util/lock.py:334 ==> [2019-11-13-11:34:42.637375] WRITE LOCK: /sapps/spack/opt/spack/.spack-db/prefix_lock[4736572689609369841:1] [Acquired]
lib/spack/spack/package.py:1708 ==> [2019-11-13-11:34:42.641480] Executing phase: 'install'
lib/spack/spack/package.py:1883 ==> [2019-11-13-11:38:51.887352] FileNotFoundError: [Errno 2] No such file or directory: '/sapps/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.4.0/mathematica-12.0.0-qn3v7car65i6g3dtjgcbha5giejbjpgu/.spack/repos'
lib/spack/llnl/util/filesystem.py:353 ==> [2019-11-13-11:38:51.914965] Installing /tmp/ubuntu/spack-stage/spack-stage-mathematica-12.0.0-qn3v7car65i6g3dtjgcbha5giejbjpgu/spack-build-out.txt to /sapps/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.4.0/mathematica
-12.0.0-qn3v7car65i6g3dtjgcbha5giejbjpgu/.spack/spack-build-out.txt
lib/spack/llnl/util/lock.py:334 ==> [2019-11-13-11:38:51.917088] WRITE LOCK: /sapps/spack/opt/spack/.spack-db/prefix_lock[4736572689609369841:1] [Released]
lib/spack/llnl/util/lock.py:334 ==> [2019-11-13-11:38:51.917919] WRITE LOCK: /tmp/ubuntu/spack-stage/.lock[992830639569496916:1] [Released]
lib/spack/spack/error.py:55 ==> [2019-11-13-11:38:51.964598] Error: FileNotFoundError: [Errno 2] No such file or directory: '/sapps/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.4.0/mathematica-12.0.0-qn3v7car65i6g3dtjgcbha5giejbjpgu/.spack/spack-build-out.txt'

/sapps/spack/lib/spack/spack/package.py:1885, in log:
       1882            # FIXME : this potentially catches too many things...
       1883            tty.debug(e)
       1884
  >>   1885        # Archive the whole stdout + stderr for the package
       1886        install(self.log_path, self.install_log_path)
       1887
       1888        # Archive the environment used for the build

See build log for details:
  /tmp/ubuntu/spack-stage/spack-stage-mathematica-12.0.0-qn3v7car65i6g3dtjgcbha5giejbjpgu/spack-build-out.txt

If I create the .spack directory manually in the recipe, i.e.,

install_spack_dir = os.path.dirname(self.install_log_path)
os.makedirs(install_spack_dir, exist_ok=True)

the installation is successful but the package is not registered because spec.yaml is not present in the installation directory.

$  spack -d install mathematica
...
==> [2019-11-13-13:19:55.052692] Warning: Dependency missing: may be deprecated or corrupted:
  /sapps/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.4.0/mathematica-12.0.0-qn3v7car65i6g3dtjgcbha5giejbjpgu
  Install prefix exists but contains no spec.yaml:
      /sapps/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.4.0/mathematica-12.0.0-qn3v7car65i6g3dtjgcbha5giejbjpgu
==> [2019-11-13-13:19:55.053337] WRITE LOCK: /sapps/spack/opt/spack/.spack-db/lock[0:0] [Released]
$ spack uninstall mathematica
==> Error: mathematica does not match any installed packages.

Interestingly, the problems do not occur if I use a dummy installation script that simply creates the prefix. Then everything works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions