gatagat / lap

Linear Assignment Problem solver (LAPJV/LAPMOD).
BSD 2-Clause "Simplified" License
211 stars 66 forks source link

[Solved] Failure building wheel, even with g++ #26

Closed Jarelk closed 3 years ago

Jarelk commented 3 years ago

Our team is running into trouble installing lap in Docker (using nvidia/cuda:10.1-cudnn7-runtime-ubuntu18.04 as base image). Even with g++ installed.

Here is the log for g++ --version:

`#9 0.520 g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

9 0.520 Copyright (C) 2017 Free Software Foundation, Inc.

9 0.520 This is free software; see the source for copying conditions. There is NO

9 0.520 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.`

Log of install failure attached. log.txt

gatagat commented 3 years ago

Thanks for the report. Could you provide the Dockerfile to make it easier to reproduce the error? The base image above does not provide g++, python and any of the python dependencies.

Jarelk commented 3 years ago

Thank you for taking the time. I've rewritten these a bit for readability, but these should still reproduce the bug (I tested it).

I build the image using the command line docker-compose -f docker-compose.yml build

Dockerfile.txt docker-compose.yml.txt requirements.txt

gatagat commented 3 years ago

Thanks, the build is missing python headers:

...
#17 122.1   lap/_lapjv.cpp:4:10: fatal error: Python.h: No such file or directory
#17 122.1    #include "Python.h"
#17 122.1             ^~~~~~~~~~
#17 122.1   compilation terminated.
...

Adding the headers to your dockerfile should solve it:

apt install python3.8-dev

Let me know if this helped.

Jarelk commented 3 years ago

That fixed it, thank you!