Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Testing if python 3.8 is available. #62

Closed
wants to merge 11 commits into from
Closed

Testing if python 3.8 is available. #62

wants to merge 11 commits into from

Conversation

charris
Copy link
Contributor

@charris charris commented Oct 3, 2019

No description provided.

@@ -46,6 +46,9 @@ matrix:
env:
- MB_PYTHON_VERSION=3.7
- PLAT=i686
- os: linux
env:
- MB_PYTHON_VERSION=3.8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you try here to use the manylinux2010 image by adding MB_ML_VER=2010? In order to use this you will also need to update the multibuild subrepo to the HEAD of the devel branch

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly, it failed at the same spot, it cannot find pip.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did download 2010 however.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path in the docker image is /opt/python/cp38-cp38, multibuild expects a m suffix /opt/python/cp38-cp38m

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could test locally on ubuntu 18.04 with

##!bash
set -x
REPO_DIR=numpy
        # Also see DAILY_COMMIT below
BUILD_COMMIT=master
BUILD_DEPENDS=cython
TEST_DEPENDS=pytest
PLAT=x86_64
UNICODE_WIDTH=32
WHEELHOUSE_UPLOADER_USERNAME=travis-worker
MB_PYTHON_VERSION=3.8
MB_ML_VER=2010
source multibuild/common_utils.sh
source multibuild/travis_steps.sh
before_install
clean_code $REPO_DIR $BUILD_COMMIT
./patch_code.sh $REPO_DIR
if [ "$TRAVIS_OS_NAME"  == "linux" ]; then
    export CFLAGS=${CFLAGS}" -Wno-sign-compare -Wno-unused-result\
                             -Wno-strict-aliasing";
fi
build_wheel $REPO_DIR $PLAT

and to debug the docker I added set -x to the top of multibuild/docker_build_wrap.sh

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference between a python with and without the m suffix?

@charris
Copy link
Contributor Author

charris commented Oct 4, 2019

What is the difference between a python with and without the m suffix?

Don't know, but I recall seeing somewhere that the "m" was going away.

@mattip
Copy link
Contributor

mattip commented Oct 4, 2019

the m was removed fromget_abi_tag in wheel.pep425tags.py by pypa/wheel#303 for python3.8 and up.

@mattip
Copy link
Contributor

mattip commented Oct 4, 2019

If I locally modify multibuild as per matthew-brett/multibuild#262, I get further, but auditwheel fails, it needs libgfortran.so.3:

+ cp dist/numpy-1.18.0.dev0+ec24179-cp38-cp38-linux_x86_64.whl /io/wheelhouse
+ repair_wheelhouse /io/wheelhouse
+ local in_dir=/io/wheelhouse
+ local out_dir=/io/wheelhouse
+ for whl in '$in_dir/*.whl'
+ [[ /io/wheelhouse/numpy-1.18.0.dev0+ec24179-cp38-cp38-linux_x86_64.whl == *none-any.whl ]]
+ auditwheel repair /io/wheelhouse/numpy-1.18.0.dev0+ec24179-cp38-cp38-linux_x86_64.whl -w /io/wheelhouse/
INFO:auditwheel.main_repair:Repairing numpy-1.18.0.dev0+ec24179-cp38-cp38-linux_x86_64.whl
Traceback (most recent call last):
  File "/usr/local/bin/auditwheel", line 10, in <module>
    sys.exit(main())
  File "/opt/_internal/cpython-3.6.9/lib/python3.6/site-packages/auditwheel/main.py", line 50, in main
    rval = args.func(args, p)
  File "/opt/_internal/cpython-3.6.9/lib/python3.6/site-packages/auditwheel/main_repair.py", line 83, in execute
    update_tags=args.UPDATE_TAGS)
  File "/opt/_internal/cpython-3.6.9/lib/python3.6/site-packages/auditwheel/repair.py", line 86, in repair_wheel
    soname)
ValueError: Cannot repair wheel, because required library "libgfortran.so.3" could not be located

@mattip
Copy link
Contributor

mattip commented Oct 6, 2019

can you update the multibuild subrepo to f0bff09 which will pull in a change to the way it processes the m abi suffix?

@charris
Copy link
Contributor Author

charris commented Oct 6, 2019

Goes further, but shows the same error you found locally.

ValueError: Cannot repair wheel, because required library "libgfortran.so.3" could not be located

I wonder if that is a manylinux2010 problem?

@charris
Copy link
Contributor Author

charris commented Oct 6, 2019

It isn't like NumPy needs gfortran. Maybe BLAS? We can disable the OpenBLAS library and see if that fixes things.

@mattip
Copy link
Contributor

mattip commented Oct 6, 2019

OpenBLAS needs gfortran. The multilinux2010 docker image has /usr/lib64/libgfortran.so.5, not what auditwheel is looking for.

@matthew-brett
Copy link
Contributor

I guess we need to build OpenBLAS on manylinux2010 then? Or can we just link the libgfortran.so.5 binary to the right name? Does it contain all the symbols / versions we use when building from a Manylinux1 container?

@charris
Copy link
Contributor Author

charris commented Oct 6, 2019

Little googling seems to imply that we either need to compile with later fortran or install libgfortran.so.3. Not sure if the wheel will end up containing two fortran libraries if we do that. The best bet would seem to be making OpenBLAS libraries that are compatible with the fortran in manylinux2010 if we move to that.

@mattip
Copy link
Contributor

mattip commented Oct 6, 2019

we could ask the manylinux2010 people to provide libgfortran.so.3

@mattip
Copy link
Contributor

mattip commented Oct 6, 2019

it is in the libgfortran-4 rpm

@charris
Copy link
Contributor Author

charris commented Oct 6, 2019

ISTR that backward compatibility was broken in some gfortran release, although it was claimed at some point that it would be maintained. The safe bet is to use the library that goes with the compiler.

@mattip
Copy link
Contributor

mattip commented Oct 6, 2019

Adding a pre_build function to create a symbolic link for libfortran.so.3 got me passed the auditwheel stage, but it is an awful hack since it rewrites the libblas to use libfortran.so.5. I don't know if that works.

diff --git a/config.sh b/config.sh
index 0329262..7659d40 100644
--- a/config.sh
+++ b/config.sh
@@ -48,3 +48,12 @@ function run_tests {
     # Show BLAS / LAPACK used
     python -c 'import numpy; numpy.show_config()'
 }
+
+function pre_build {
+    if [ -z "$IS_OSX" ]; then
+        # manylinux2010 image uses gfortran.so.5, we still need gfortran.so.3
+        if [ "$MB_ML_VER" == "2010" ]; then
+            ln -s /usr/lib64/libgfortran.so.5 /usr/lib64/libgfortran.so.3
+        fi
+    fi
+}

@charris
Copy link
Contributor Author

charris commented Oct 6, 2019

My machine has

compat-libgfortran-41.i686 : Compatibility Fortran 95 runtime library version 4.1.2
compat-libgfortran-41.x86_64 : Compatibility Fortran 95 runtime library version 4.1.2

since it is now at version 5.

@mattip
Copy link
Contributor

mattip commented Oct 6, 2019

Hopefully we can separate between manylinux1 -> manylinux2010 transition (which we should do across the board and not just for 3.8) and this PR. pypa/manylinux#360 to get 3.8 on manylinux1 might be merged soon.

@mattip
Copy link
Contributor

mattip commented Oct 6, 2019

compat-libgfortran-41.x86_64

is that CentOS ?

@charris
Copy link
Contributor Author

charris commented Oct 6, 2019

Fedora 30. You might try yum search libgfortran if you are in CentOS (Old Redhat derived).

@mattip
Copy link
Contributor

mattip commented Oct 7, 2019

pypa/manylinux#360 was merged, can you try removing the MB_ML_VER=2010 spec from the .travis.yml file?

@charris
Copy link
Contributor Author

charris commented Oct 7, 2019

Seems like the default python3.3 in the docker image is being used.

@charris
Copy link
Contributor Author

charris commented Oct 7, 2019

Does mathew-brett/trusty need an update?

@charris
Copy link
Contributor Author

charris commented Oct 7, 2019

It builds, the wheel is created, but fails at install_run $PLAT, which seems to be a problem with matthew-brett/trusty.

@mattip
Copy link
Contributor

mattip commented Oct 7, 2019

xref matthew-brett/trusty#5 for 64-bit builds

@charris
Copy link
Contributor Author

charris commented Oct 7, 2019

Close/reopen.

@charris charris closed this Oct 7, 2019
@charris charris reopened this Oct 7, 2019
@mattip
Copy link
Contributor

mattip commented Oct 7, 2019

The 64-bit image was updated, the 32-bit still not

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants