-
Notifications
You must be signed in to change notification settings - Fork 42
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
"Building Linux wheels for Python 3.8 requires a compiler (e.g gcc)." #123
Comments
It's also worth mentioning that gcc is in fact installed in the container:
|
Hi, To quote from the version 0.3.5 README:
From your log:
gcc 8.3.0 is found, but gfortran is not installed. The generic scikit-build message does not differentiate between the C and Fortran compiler. |
Yeah, as I discovered the magic incantation is
|
... or any other more performant blas/lapack implementation |
I'm running into the same problem in a CI build job using Ubuntu 18.04 with ROS in a docker container, which installs slycot automatically via pip (as a dependency of our application code). As the slycot pip build depends on gfortran, but doesn't provide it as dependency itself, the build fails. I'm not an expert on pip, but would it be possible to either
|
Wheels are not distro specific. When we provide wheels, which are linked with the blas/lapack libraries of one Ubuntu LTS, people will try to install them on different Linux distros and have a horrible user experience. The NumPy and SciPy wheels provide their own lapack/libraries and we would have to sync with them in order to avoid trouble.
As far as I am aware, pip only follows the Python package dependencies specified via setuptools. A Fortran compiler is not a Python package. It has to be provided through the operating system before running pip install. For Ubuntu, that is I am not familiar with ROS containers. Here are two ideas, which you could try:
If you need pre-compiled packages, consider using the conda ecosystem instead of pip. Or use a distribution which provides distro specific packages. I know of Archlinux (AUR) and openSUSE Tumleweed. |
Hmm, that sounds more like you have specified a runtime dependency where a buildtime dependency should have been used. Somehow you must specify to rosdep that gfortran is a build requirement for Slycot. |
Actually, I did specify gfortran as a build dependency of my ROS package: <package format="3">
<name>my_ros_pkg</name>
[…]
<buildtool_depend>gfortran</buildtool_depend>
<exec_depend>python-control-pip</exec_depend>
<exec_depend>python-slycot-pip</exec_depend>
</package> but rosdep is interpreting
so it thinks gfortran is needed to build That's why I'm asking why pip is not installing gfortran, if it needs it or how to get it to do so? As a workaround I could try to setup a wrapper package with gfortran as build dependency and then add this wrapper package to |
Because pip can only install python packages. It is not meant to install system packages at all. If you run pip as root it gives you a stern warning. I guess you have to fix the ROS package |
You're right, pip wouldn't be able to install system packages anyways (And using pip as root is a bad idea, because it can break the system Python installation). Unfortunately there is no ROS package Btw. changing the OS is not an option, as ROS is (more or less) tightly coupled to Ubuntu. I'll take care to install gfortran in all our docker containers and physical machines then (won't hurt anyways) 💁♂️ Thanks for your explanations and efforts @bnavigator ! |
You could create a
Don't forget cmake and the lapack/blas headers. Have a look at our GitHub Actions workflow for hints: Slycot/.github/workflows/slycot-build-and-test.yml Lines 88 to 99 in a40505a
Slycot/.github/workflows/slycot-build-and-test.yml Lines 115 to 122 in a40505a
|
Thanks for the hint! |
The pip install process for slycot fails on most clean linux installs. Here are the results running in a
circleci/python
Docker container:But the thing is... running
sudo apt-get install build-essential
doesn't help at all. Installing build-essential and then re-running results in exactly the same error.I don't have issues pip installing any other packages in the same container.
The text was updated successfully, but these errors were encountered: