Fast-Poisson-Image-Editing icon indicating copy to clipboard operation
Fast-Poisson-Image-Editing copied to clipboard

gcc backend does not install anymore on newer platforms

Open ksakmann opened this issue 1 year ago • 2 comments

Hi @Trinkle23897. Awesome work. I came across the following environment issue. On an older platform the installation proceeds to install gcc backend

$ fpie --check-backend
[Taichi] version 1.6.0, llvm 15.0.4, commit f1c6fbbd, linux, python 3.9.7
['numpy', 'numba', 'taichi-cpu', 'taichi-gpu', 'gcc', 'openmp']
$ gcc --version
gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-18)

However, on a newer platform the gcc backend does not install.

$ fpie --check-backend
[Taichi] version 1.6.0, llvm 15.0.4, commit f1c6fbbd, linux, python 3.10.12
['numpy', 'numba', 'taichi-cpu', 'taichi-gpu']
$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

Do you have any ideas what the issue could be?

ksakmann avatar Oct 25 '23 10:10 ksakmann

Could you try to inspect which error it raises in this line via python setup.py install or pip install -e .? https://github.com/Trinkle23897/Fast-Poisson-Image-Editing/blob/6a607f17e335a8be97cbfe39dd9b2de6de2a7cb6/setup.py#L56

Trinkle23897 avatar Oct 25 '23 18:10 Trinkle23897

Hi @Trinkle23897 The solution is to comment out cmake in setup.py. I don't get how that affects the build, but it solves my problem. For reference, I just checked what you suggested, run pip install -e .. I use the code on master, but just to be sure to not deal with CUDA issues I commented out the CUDA section in CMakeLists.txt. pip install -e . then spits out the following exception. It looks like some path is wrong

...
    [ 83%] Linking CXX shared module /home/XXXX/Fast-Poisson-Image-Editing/build/lib.linux-x86_64-cpython-310/fpie/core_mpi.cpython-310-x86_64-linux-gnu.so
    lto-wrapper: warning: using serial compilation of 3 LTRANS jobs
    [ 91%] Linking CXX shared module /home/XXXX/Fast-Poisson-Image-Editing/build/lib.linux-x86_64-cpython-310/fpie/core_gcc.cpython-310-x86_64-linux-gnu.so
    [100%] Linking CXX shared module /home/XXXX/Fast-Poisson-Image-Editing/build/lib.linux-x86_64-cpython-310/fpie/core_openmp.cpython-310-x86_64-linux-gnu.so
    lto-wrapper: warning: using serial compilation of 3 LTRANS jobs
    lto-wrapper: warning: using serial compilation of 3 LTRANS jobs
    [100%] Built target core_mpi
    [100%] Built target core_gcc
    [100%] Built target core_openmp
    error: can't copy 'build/lib.linux-x86_64-cpython-310/fpie.cpython-310-x86_64-linux-gnu.so': doesn't exist or not a regular file
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

Running pip install -e . after commenting out "cmake>=3.4", in setup.py still returns the exact same exception. However, when I run pip install . I finally get what I want:

XXX@XXXX:~/Fast-Poisson-Image-Editing$ fpie --check-backend
[Taichi] version 1.6.0, llvm 15.0.4, commit f1c6fbbd, linux, python 3.10.12
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
['numpy', 'numba', 'taichi-cpu', 'taichi-gpu', 'gcc', 'openmp', 'mpi']

I can't say I understand what happend, but I'm happy now. For reference:

XXX@XXXX:~/Fast-Poisson-Image-Editing$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

XXX@XXXX:~/Fast-Poisson-Image-Editing$ cmake --version
cmake version 3.27.7

CMake suite maintained and supported by Kitware (kitware.com/cmake).

ksakmann avatar Oct 27 '23 08:10 ksakmann