Skip to content

CPython 3.5 manylinux s390x failed #658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
caishanli opened this issue May 7, 2021 · 18 comments
Closed

CPython 3.5 manylinux s390x failed #658

caishanli opened this issue May 7, 2021 · 18 comments

Comments

@caishanli
Copy link

Hi, I use cibuildwheel to build ncnn, build log is here, and workflow file is release-python.yml

@Czaki
Copy link
Contributor

Czaki commented May 7, 2021

It looks like lack of SSL library in docker image. Could You fix it using yum install for the proper package.

@caishanli
Copy link
Author

It looks like lack of SSL library in docker image. Could You fix it using yum install for the proper package.

error msg is ERROR: Could not build wheels for cmake which use PEP 517 and cannot be installed directly
You mean install cmake via yum?

@henryiii
Copy link
Contributor

henryiii commented May 7, 2021

These are being added soon, see scikit-build/cmake-python-distributions#130 - but for now, you can turn them off when building on s390x in your pyproject.yaml via a selector and use the built-in CMake in those images instead.

@henryiii
Copy link
Contributor

henryiii commented May 7, 2021

(You should also be able to add the requirements for CMake to build from SDist, which also would fix it - I expect it's SSL that's missing?)

@henryiii
Copy link
Contributor

henryiii commented May 7, 2021

Why are you shipping 3.5 + s390x? Shouldn't you start with 3.6? We are currently dropping 3.5 and 3.5 has already been removed from the manylinux images, including s390x images.

@caishanli
Copy link
Author

Why are you shipping 3.5 + s390x? Shouldn't you start with 3.6? We are currently dropping 3.5 and 3.5 has already been removed from the manylinux images already, including s390x images.

3.5+s390x is auto build
yml is here, anything wrong?

@henryiii
Copy link
Contributor

henryiii commented May 7, 2021

Okay, the next release will build only 3.6+, so just making sure you were not needing that specific version for something.

@henryiii
Copy link
Contributor

henryiii commented May 7, 2021

Something roughly like this should work for your pyproject.toml until new wheels are released. I'm only guessing Ninja has similar issues.

[build-system]
requires = [
    "setuptools>=42",
    "wheel",
    "ninja; sys_platform != 'win32' and platform_machine != 's390x'",
    "cmake>=3.12; platform_machine != 's390x'",
]
build-backend = "setuptools.build_meta"

@caishanli
Copy link
Author

Something roughly like this should work for your pyproject.toml until new wheels are released. I'm only guessing Ninja has similar issues.

[build-system]
requires = [
    "setuptools>=42",
    "wheel",
    "ninja; sys_platform != 'win32' and platform_machine != 'aarch64'",
    "cmake>=3.12; platform_machine != 'aarch64'",
]
build-backend = "setuptools.build_meta"

ninja is ok on aarch64, see build log here

@henryiii
Copy link
Contributor

henryiii commented May 7, 2021

Oops, please replace aarch64 with s390x above. 😳

@caishanli
Copy link
Author

Oops, please replace aarch64 with s390x above.

still failed with s390x, see log

@mayeut
Copy link
Member

mayeut commented May 8, 2021

Only the build for CMake wheel was failing in the original log so I guess you can still rely on Ninja being built from source correctly and use the manylinux provided cmake:

[build-system]
requires = [
    "setuptools>=42",
    "wheel",
    "ninja; sys_platform != 'win32'",
    "cmake>=3.12; platform_machine != 's390x'",
]
build-backend = "setuptools.build_meta"

@henryiii
Copy link
Contributor

henryiii commented May 20, 2021

I just released CMake 3.20.2 on PyPI which contains Apple Silicon, S390x, and PowerPC builds now too (thanks to @mayeut). So this should "just work" now (though Ninja may still need some work).

@henryiii
Copy link
Contributor

henryiii commented Jun 1, 2021

Closable, @caishanli?

@caishanli
Copy link
Author

in testing now...
aarch64 takes long time to build
and i will report the result

@caishanli
Copy link
Author

Closable, @caishanli?

still failed. see build log here

@mayeut
Copy link
Member

mayeut commented Jun 2, 2021

see build log here

@caishanli,
The error is now completely different. All tools seem to install correctly.
The CMakeLists.txt has a fallback to x86 arch with sse2 enabled which seems wrong for s390x.
This is what is now failing:

/opt/rh/devtoolset-9/root/usr/bin/c++  -I../../src/layer/x86 -I../../src -Isrc -I../../src/layer -O3 -DNDEBUG -fPIC -DNCNN_STATIC_DEFINE -Wall -Wextra -Wno-unused-function -Ofast -ffast-math -fvisibility=hidden -fvisibility-inlines-hidden -msse2 -msse -fopenmp -pthread -MD -MT src/CMakeFiles/ncnn.dir/allocator.cpp.o -MF src/CMakeFiles/ncnn.dir/allocator.cpp.o.d -o src/CMakeFiles/ncnn.dir/allocator.cpp.o -c ../../src/allocator.cpp
929
    c++: error: unrecognized command line option ‘-msse2’
930
    c++: error: unrecognized command line option ‘-msse’

@mayeut
Copy link
Member

mayeut commented Dec 18, 2021

fixed by Tencent/ncnn#3396 which indeed includes a fix in CMakeLists.txt.

@mayeut mayeut closed this as completed Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants