configure build with python3

Issue #15 invalid
Drew Parsons created an issue

PETSc 3.11 now allows configure to be run with python3 instead of python2.

It looks like SLEPc 3.11 is intended to do the same. Indeed, configure itself appears to run fine with python3.

But then make gives this error (building with Debian experimental):

make -j4 V=1 SLEPC_DIR=/home/builds/projects/petsc/build/slepc PETSC_DIR=/usr/lib/petscdir/petsc3.11/x86_64-linux-gnu-real PETSC_ARCH=installed-arch-linux2-c-opt

No rule to make target '/home/builds/projects/petsc/build/slepc/installed-arch-linux2-c-opt/lib/slepc/conf/slepcrules'.

The more complete log (with the ./configure shebang changed to #!/usr/bin/python3) is:

PETSC_DIR=/usr/lib/petscdir/petsc3.11/x86_64-linux-gnu-real \
          ./configure --prefix=/usr/lib/slepcdir/slepc3.11/x86_64-linux-gnu-real  \
            --with-arpack=1 \
            --shared-library-extension=_real 
Checking environment... done
Checking PETSc installation... done
Checking ARPACK... done
Checking LAPACK library... done
Writing various configuration files... done

        ===============================================================================
SLEPc Configuration
================================================================================

SLEPc directory:
 /home/builds/projects/petsc/build/slepc
SLEPc prefix directory:
 /usr/lib/slepcdir/slepc3.11/x86_64-linux-gnu-real
PETSc directory:
 /usr/lib/petscdir/petsc3.11/x86_64-linux-gnu-real
Prefix install with double precision real numbers
ARPACK library flags:
 -lparpack -larpack

xxx==========================================================================xxx
 Configure stage complete. Now build the SLEPc library with (gnumake build):
   make SLEPC_DIR=/home/builds/projects/petsc/build/slepc PETSC_DIR=/usr/lib/petscdir/petsc3.11/x86_64-linux-gnu-real
xxx==========================================================================xxx

    make -j4 V=1 SLEPC_DIR=/home/builds/projects/petsc/build/slepc PETSC_DIR=/usr/lib/petscdir/petsc3.11/x86_64-linux-gnu-real PETSC_ARCH=installed-arch-linux2-c-opt
make[2]: Entering directory '/home/builds/projects/petsc/build/slepc'
/home/builds/projects/petsc/build/slepc/lib/slepc/conf/slepc_rules:210: /home/builds   /projects/petsc/build/slepc/installed-arch-linux2-c-opt/lib/slepc/conf/slepcrules: No such file or directory
make[2]: *** No rule to make target '/home/builds/projects/petsc/build/slepc/installed-arch-linux2-c-opt/lib/slepc/conf/slepcrules'.  Stop.
make[2]: Leaving directory '/home/builds/projects/petsc/build/slepc'
dh_auto_build: make -j4 V=1 SLEPC_DIR=/home/builds/projects/petsc/build/slepc PETSC_DIR=/usr/lib/petscdir/petsc3.11/x86_64-linux-gnu-real PETSC_ARCH=installed-arch-linux2-c-opt returned exit code 2
make[1]: *** [debian/rules:145: override_dh_auto_build] Error 2

Comments (8)

  1. Jose E. Roman

    I cannot reproduce this. Does it change if you add PYTHON=python3?

    What do you have for ls -l /home/builds/projects/petsc/build/slepc/installed-arch-linux2-c-opt/lib/slepc/conf?

    What is shared-library-extension? Is it a Debian hack?

  2. Drew Parsons reporter

    So, installed-arch-linux2-c-opt vs installed-arch-linux2-c-opt. I think I can see the problem. In debian/rules the build dir is set using BUILDDIR_ARCH := $(shell python2 -c "import sys; print(sys.platform.replace('cygwin','mswin'))" )

    So there's a python2 usage that I missed. With python2 it returns linux2. With python3 it's linux. The expression comes from the debhelper tools (dh --with python3) used to help automate the Debian build.

    I'll check the build proceeds once these remaining python2 usages have been updated.

  3. Drew Parsons reporter

    Confirmed, the build proceeds once I use python3 to set the build dir in the Debian build script.

    I was wrong about where the expression comes from though. It's not from debhelper or dh, it's from SLEPc's definition in config/configure.py, line 189.

    The bug was in the Debian build script. so I'll close this bug now.

  4. Log in to comment