iory / pySDFGen

SDFGen for Python
8 stars 2 forks source link

pip install error of pysdfgen==0.1.4 #11

Closed HiroIshida closed 3 years ago

HiroIshida commented 3 years ago

after pip install pysdfgen==0.1.4, I encounter the error. I also tried pip install . locally at the latest branch, and at that time, the compilation succeeds. So I guess there is some problem when you uploading the program to pypi.

I found this bag when my build test in the PR fails when I change the requirement of the pysdfgen up to 0.1.4 see: https://github.com/iory/scikit-robot/pull/199/checks?check_run_id=1625575190, which implies that this problem is not my machine-specific problem.

hiro@p50:~$ pip install pysdfgen==0.1.4 
Collecting pysdfgen==0.1.4
  Using cached https://files.pythonhosted.org/packages/7d/46/eb83d0084c6725686bb8c635df47f2d399f77b954a1bb5fe33eb5d77f33f/pysdfgen-0.1.4.tar.gz
Collecting scikit-build (from pysdfgen==0.1.4)
  Using cached https://files.pythonhosted.org/packages/78/c9/7c2c7397ea64e36ebb292446896edcdecbb8c1aa6b9a1a32f6f67984c3df/scikit_build-0.11.1-py2.py3-none-any.whl
Collecting trimesh>=3.5.20 (from pysdfgen==0.1.4)
Collecting setuptools<45,>=28.0.0; python_version < "3" (from scikit-build->pysdfgen==0.1.4)
  Using cached https://files.pythonhosted.org/packages/e1/b7/182161210a13158cd3ccc41ee19aadef54496b74f2817cc147006ec932b4/setuptools-44.1.1-py2.py3-none-any.whl
Collecting wheel>=0.29.0 (from scikit-build->pysdfgen==0.1.4)
  Using cached https://files.pythonhosted.org/packages/65/63/39d04c74222770ed1589c0eaba06c05891801219272420b40311cd60c880/wheel-0.36.2-py2.py3-none-any.whl
Collecting distro (from scikit-build->pysdfgen==0.1.4)
  Using cached https://files.pythonhosted.org/packages/25/b7/b3c4270a11414cb22c6352ebc7a83aaa3712043be29daa05018fd5a5c956/distro-1.5.0-py2.py3-none-any.whl
Collecting packaging (from scikit-build->pysdfgen==0.1.4)
  Using cached https://files.pythonhosted.org/packages/b1/a7/588bfa063e7763247ab6f7e1d994e331b85e0e7d09f853c59a6eb9696974/packaging-20.8-py2.py3-none-any.whl
Collecting numpy (from trimesh>=3.5.20->pysdfgen==0.1.4)
  Using cached https://files.pythonhosted.org/packages/3a/5f/47e578b3ae79e2624e205445ab77a1848acdaa2929a00eeef6b16eaaeb20/numpy-1.16.6-cp27-cp27mu-manylinux1_x86_64.whl
Collecting pyparsing>=2.0.2 (from packaging->scikit-build->pysdfgen==0.1.4)
  Using cached https://files.pythonhosted.org/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl
Building wheels for collected packages: pysdfgen
  Running setup.py bdist_wheel for pysdfgen ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-_11GxP/pysdfgen/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpOqpQz1pip-wheel- --python-tag cp27:

  --------------------------------------------------------------------------------
  -- Trying "Ninja" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  Not searching for unused variables given on the command line.
  CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
  -- Configuring incomplete, errors occurred!
  See also "/tmp/pip-build-_11GxP/pysdfgen/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Ninja" generator - failure
  --------------------------------------------------------------------------------

  --------------------------------------------------------------------------------
  -- Trying "Unix Makefiles" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  Not searching for unused variables given on the command line.
  -- The C compiler identification is GNU 7.5.0
  -- Check for working C compiler: /usr/bin/cc
  -- Check for working C compiler: /usr/bin/cc -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- The CXX compiler identification is GNU 7.5.0
  -- Check for working CXX compiler: /usr/bin/c++
  -- Check for working CXX compiler: /usr/bin/c++ -- works
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /tmp/pip-build-_11GxP/pysdfgen/_cmake_test_compile/build
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Unix Makefiles" generator - success
  --------------------------------------------------------------------------------

  Configuring Project
    Working directory:
      /tmp/pip-build-_11GxP/pysdfgen/_skbuild/linux-x86_64-2.7/cmake-build
    Command:
      cmake /tmp/pip-build-_11GxP/pysdfgen -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-build-_11GxP/pysdfgen/_skbuild/linux-x86_64-2.7/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python -DPYTHON_VERSION_STRING:STRING=2.7.17 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python2.7 -DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython2.7.so -DSKBUILD:BOOL=TRUE -DCMAKE_MODULE_PATH:PATH=/home/hiro/.local/lib/python2.7/site-packages/skbuild/resources/cmake -DCMAKE_BUILD_TYPE:STRING=Release

  -- The C compiler identification is GNU 7.5.0
  -- The CXX compiler identification is GNU 7.5.0
  -- Check for working C compiler: /usr/bin/cc
  -- Check for working C compiler: /usr/bin/cc -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Check for working CXX compiler: /usr/bin/c++
  -- Check for working CXX compiler: /usr/bin/c++ -- works
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done
  -- Generating done
  CMake Warning:
    Manually-specified variables were not used by the project:

      PYTHON_EXECUTABLE
      PYTHON_INCLUDE_DIR
      PYTHON_LIBRARY
      PYTHON_VERSION_STRING
      SKBUILD

  -- Build files have been written to: /tmp/pip-build-_11GxP/pysdfgen/_skbuild/linux-x86_64-2.7/cmake-build
  Scanning dependencies of target SDFGen
  [ 33%] Building CXX object CMakeFiles/SDFGen.dir/SDFGen/main.o
  /tmp/pip-build-_11GxP/pysdfgen/SDFGen/main.cpp:7:10: fatal error: config.h: No such file or directory
   #include "config.h"
            ^~~~~~~~~~
  compilation terminated.
  CMakeFiles/SDFGen.dir/build.make:62: recipe for target 'CMakeFiles/SDFGen.dir/SDFGen/main.o' failed
  make[2]: *** [CMakeFiles/SDFGen.dir/SDFGen/main.o] Error 1
  CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/SDFGen.dir/all' failed
  make[1]: *** [CMakeFiles/SDFGen.dir/all] Error 2
  Makefile:129: recipe for target 'all' failed
  make: *** [all] Error 2
  Traceback (most recent call last):
    File "/home/hiro/.local/lib/python2.7/site-packages/skbuild/setuptools_wrap.py", line 589, in setup
      cmkr.make(make_args, env=env)
    File "/home/hiro/.local/lib/python2.7/site-packages/skbuild/cmaker.py", line 507, in make
      os.path.abspath(CMAKE_BUILD_DIR())))

  An error occurred while building with CMake.
    Command:
      cmake --build . --target install --config Release --
    Source directory:
      /tmp/pip-build-_11GxP/pysdfgen
    Working directory:
      /tmp/pip-build-_11GxP/pysdfgen/_skbuild/linux-x86_64-2.7/cmake-build
  Please see CMake's output for more information.

  ----------------------------------------
  Failed building wheel for pysdfgen
  Running setup.py clean for pysdfgen
Failed to build pysdfgen
Installing collected packages: setuptools, wheel, distro, pyparsing, packaging, scikit-build, numpy, trimesh, pysdfgen
  Running setup.py install for pysdfgen ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-_11GxP/pysdfgen/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-jUf25k-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:

    --------------------------------------------------------------------------------
    -- Trying "Ninja" generator
    --------------------------------
    ---------------------------
    ----------------------
    -----------------
    ------------
    -------
    --
    Not searching for unused variables given on the command line.
    CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
    -- Configuring incomplete, errors occurred!
    See also "/tmp/pip-build-_11GxP/pysdfgen/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
    --
    -------
    ------------
    -----------------
    ----------------------
    ---------------------------
    --------------------------------
    -- Trying "Ninja" generator - failure
    --------------------------------------------------------------------------------

    --------------------------------------------------------------------------------
    -- Trying "Unix Makefiles" generator
    --------------------------------
    ---------------------------
    ----------------------
    -----------------
    ------------
    -------
    --
    Not searching for unused variables given on the command line.
    -- The C compiler identification is GNU 7.5.0
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- The CXX compiler identification is GNU 7.5.0
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /tmp/pip-build-_11GxP/pysdfgen/_cmake_test_compile/build
    --
    -------
    ------------
    -----------------
    ----------------------
    ---------------------------
    --------------------------------
    -- Trying "Unix Makefiles" generator - success
    --------------------------------------------------------------------------------

    Configuring Project
      Working directory:
        /tmp/pip-build-_11GxP/pysdfgen/_skbuild/linux-x86_64-2.7/cmake-build
      Command:
        cmake /tmp/pip-build-_11GxP/pysdfgen -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-build-_11GxP/pysdfgen/_skbuild/linux-x86_64-2.7/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python -DPYTHON_VERSION_STRING:STRING=2.7.17 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python2.7 -DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython2.7.so -DSKBUILD:BOOL=TRUE -DCMAKE_MODULE_PATH:PATH=/home/hiro/.local/lib/python2.7/site-packages/skbuild/resources/cmake -DCMAKE_BUILD_TYPE:STRING=Release

    -- The C compiler identification is GNU 7.5.0
    -- The CXX compiler identification is GNU 7.5.0
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Configuring done
    -- Generating done
    CMake Warning:
      Manually-specified variables were not used by the project:

        PYTHON_EXECUTABLE
        PYTHON_INCLUDE_DIR
        PYTHON_LIBRARY
        PYTHON_VERSION_STRING
        SKBUILD

    -- Build files have been written to: /tmp/pip-build-_11GxP/pysdfgen/_skbuild/linux-x86_64-2.7/cmake-build
    Scanning dependencies of target SDFGen
    [ 33%] Building CXX object CMakeFiles/SDFGen.dir/SDFGen/main.o
    /tmp/pip-build-_11GxP/pysdfgen/SDFGen/main.cpp:7:10: fatal error: config.h: No such file or directory
     #include "config.h"
              ^~~~~~~~~~
    compilation terminated.
    CMakeFiles/SDFGen.dir/build.make:62: recipe for target 'CMakeFiles/SDFGen.dir/SDFGen/main.o' failed
    make[2]: *** [CMakeFiles/SDFGen.dir/SDFGen/main.o] Error 1
    CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/SDFGen.dir/all' failed
    make[1]: *** [CMakeFiles/SDFGen.dir/all] Error 2
    Makefile:129: recipe for target 'all' failed
    make: *** [all] Error 2
    Traceback (most recent call last):
      File "/home/hiro/.local/lib/python2.7/site-packages/skbuild/setuptools_wrap.py", line 589, in setup
        cmkr.make(make_args, env=env)
      File "/home/hiro/.local/lib/python2.7/site-packages/skbuild/cmaker.py", line 507, in make
        os.path.abspath(CMAKE_BUILD_DIR())))

    An error occurred while building with CMake.
      Command:
        cmake --build . --target install --config Release --
      Source directory:
        /tmp/pip-build-_11GxP/pysdfgen
      Working directory:
        /tmp/pip-build-_11GxP/pysdfgen/_skbuild/linux-x86_64-2.7/cmake-build
    Please see CMake's output for more information.

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-_11GxP/pysdfgen/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-jUf25k-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-_11GxP/pysdfgen/
iory commented 3 years ago

Thank you for your report. I fixed this problem by adding github actions's release. Please try v0.1.5.

HiroIshida commented 3 years ago

build succeeded. Thanks!