rticommunity / connextdds-py

Connext DDS Python API
Other
27 stars 12 forks source link

Windows install issue - running into CMake issue #33

Closed huntrontrakkr closed 3 years ago

huntrontrakkr commented 3 years ago

Hello!

Just recently updated to the most recent version on Windows. Running into an unusual build issue as seen by this log file:

Processing c:\users\wadehunter\onedrive - marathon consulting\documents\liebherr\testdds\connextdds-py
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: rti
  Building wheel for rti (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\WadeHunter\anaconda3\envs\dds_test\python.exe' 'C:\Users\WadeHunter\anaconda3\envs\dds_test\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\WADEHU~1\AppData\Local\Temp\tmpa_8de9p2'
       cwd: C:\Users\WadeHunter\AppData\Local\Temp\pip-req-build-iqgdomu8
  Complete output (105 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\rti
  copying rti_pkg\__init__.py -> build\lib.win-amd64-3.9\rti
  creating build\lib.win-amd64-3.9\rti\logging
  copying rti_pkg\logging\handler.py -> build\lib.win-amd64-3.9\rti\logging
  copying rti_pkg\logging\__init__.py -> build\lib.win-amd64-3.9\rti\logging
  running egg_info
  writing rti.egg-info\PKG-INFO
  writing dependency_links to rti.egg-info\dependency_links.txt
  writing top-level names to rti.egg-info\top_level.txt
  reading manifest file 'rti.egg-info\SOURCES.txt'
  writing manifest file 'rti.egg-info\SOURCES.txt'
  running build_ext
  -- Building for: Visual Studio 16 2019
  -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19042.
  -- The C compiler identification is MSVC 19.28.29336.0
  -- The CXX compiler identification is MSVC 19.28.29336.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Performing Test HAVE_FLAG_STD_CXX17
  -- Performing Test HAVE_FLAG_STD_CXX17 - Failed
  -- Performing Test HAVE_FLAG_STD_CXX14
  -- Performing Test HAVE_FLAG_STD_CXX14 - Failed
  -- RTI Connext DDS installation directory: C:/Users/WadeHunter/rti_connext_dds-6.0.1
  -- RTI Connext DDS architecture: x64Win64VS2017
  -- Found RTIConnextDDS: C:/Users/WadeHunter/rti_connext_dds-6.0.1 (found suitable version "6.0.1.0", minimum required is "5.3.1") found components: core
  -- Found Python: C:/Users/WadeHunter/anaconda3/envs/dds_test/python.exe (found version "3.9.1") found components: Interpreter Development Development.Module Development.Embed
  -- Performing Test HAS_MSVC_GL_LTCG
  -- Performing Test HAS_MSVC_GL_LTCG - Success
  -- Found pybind11: C:/Users/WadeHunter/AppData/Local/Temp/pip-build-env-gbip9ypc/overlay/Lib/site-packages/pybind11/include (found version "2.6.1" )
  -- RTI Connext DDS installation directory: C:/Users/WadeHunter/rti_connext_dds-6.0.1
  -- RTI Connext DDS architecture: x64Win64VS2017
  -- Found RTIConnextDDS: C:/Users/WadeHunter/rti_connext_dds-6.0.1 (found suitable version "6.0.1.0", minimum required is "5.3.1") found components: core distributed_logger
  -- Found pybind11: C:/Users/WadeHunter/AppData/Local/Temp/pip-build-env-gbip9ypc/overlay/Lib/site-packages/pybind11/include (found version "2.6.1" )
  -- Configuring done
  CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
  Please set them or make sure they are set and tested correctly in the CMake files:
  nddsc_lib
      linked by target "connextdds" in directory C:/Users/WadeHunter/AppData/Local/Temp/pip-req-build-iqgdomu8/modules/connextdds
      linked by target "distlog" in directory C:/Users/WadeHunter/AppData/Local/Temp/pip-req-build-iqgdomu8/modules/distlog
  nddscore_lib
      linked by target "connextdds" in directory C:/Users/WadeHunter/AppData/Local/Temp/pip-req-build-iqgdomu8/modules/connextdds
      linked by target "distlog" in directory C:/Users/WadeHunter/AppData/Local/Temp/pip-req-build-iqgdomu8/modules/distlog
  nddscpp2_lib
      linked by target "connextdds" in directory C:/Users/WadeHunter/AppData/Local/Temp/pip-req-build-iqgdomu8/modules/connextdds
      linked by target "distlog" in directory C:/Users/WadeHunter/AppData/Local/Temp/pip-req-build-iqgdomu8/modules/distlog
  rtidlc_lib
      linked by target "distlog" in directory C:/Users/WadeHunter/AppData/Local/Temp/pip-req-build-iqgdomu8/modules/distlog

  -- Generating done
  CMake Generate step failed.  Build files cannot be regenerated correctly.
  Traceback (most recent call last):
    File "C:\Users\WadeHunter\anaconda3\envs\dds_test\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 280, in <module>
      main()
    File "C:\Users\WadeHunter\anaconda3\envs\dds_test\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "C:\Users\WadeHunter\anaconda3\envs\dds_test\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 204, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "C:\Users\WadeHunter\AppData\Local\Temp\pip-build-env-gbip9ypc\overlay\Lib\site-packages\setuptools\build_meta.py", line 216, in build_wheel
      return self._build_with_temp_dir(['bdist_wheel'], '.whl',
    File "C:\Users\WadeHunter\AppData\Local\Temp\pip-build-env-gbip9ypc\overlay\Lib\site-packages\setuptools\build_meta.py", line 202, in _build_with_temp_dir
      self.run_setup()
    File "C:\Users\WadeHunter\AppData\Local\Temp\pip-build-env-gbip9ypc\overlay\Lib\site-packages\setuptools\build_meta.py", line 253, in run_setup
      super(_BuildMetaLegacyBackend,
    File "C:\Users\WadeHunter\AppData\Local\Temp\pip-build-env-gbip9ypc\overlay\Lib\site-packages\setuptools\build_meta.py", line 145, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 227, in <module>
      setup(
    File "C:\Users\WadeHunter\AppData\Local\Temp\pip-build-env-gbip9ypc\overlay\Lib\site-packages\setuptools\__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "C:\Users\WadeHunter\anaconda3\envs\dds_test\lib\distutils\core.py", line 148, in setup
      dist.run_commands()
    File "C:\Users\WadeHunter\anaconda3\envs\dds_test\lib\distutils\dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "C:\Users\WadeHunter\anaconda3\envs\dds_test\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "C:\Users\WadeHunter\AppData\Local\Temp\pip-build-env-gbip9ypc\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "C:\Users\WadeHunter\anaconda3\envs\dds_test\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "C:\Users\WadeHunter\anaconda3\envs\dds_test\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "C:\Users\WadeHunter\anaconda3\envs\dds_test\lib\distutils\command\build.py", line 135, in run
      self.run_command(cmd_name)
    File "C:\Users\WadeHunter\anaconda3\envs\dds_test\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "C:\Users\WadeHunter\anaconda3\envs\dds_test\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "setup.py", line 195, in run
      subprocess.check_call([cmake_cmd, os.path.abspath(os.path.join(get_script_dir(), 'modules'))] + cmake_args, cwd=module_build_dir, env=env)
    File "C:\Users\WadeHunter\anaconda3\envs\dds_test\lib\subprocess.py", line 373, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['C:\\Users\\WadeHunter\\AppData\\Local\\Temp\\pip-build-env-gbip9ypc\\overlay\\Lib\\site-packages\\cmake\\data\\bin\\cmake', 'C:\\Users\\WadeHunter\\AppData\\Local\\Temp\\pip-req-build-iqgdomu8\\modules', '-DBUILD_SHARED_LIBS=ON', '-DCONNEXTDDS_DIR=C:\\Users\\WadeHunter\\rti_connext_dds-6.0.1', '-DCONNEXTDDS_ARCH=x64Win64VS2017', '-DCMAKE_BUILD_TYPE=Debug', '-Dpybind11_DIR=C:\\Users\\WadeHunter\\AppData\\Local\\Temp\\pip-build-env-gbip9ypc\\overlay\\Lib\\site-packages\\pybind11\\share\\cmake\\pybind11', '-DRTI_PLATFORM_DIR=C:\\Users\\WadeHunter\\AppData\\Local\\Temp\\pip-req-build-iqgdomu8\\platform\\x64Win64VS2017', '-DRTI_CONNEXTDDS_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\WadeHunter\\AppData\\Local\\Temp\\pip-req-build-iqgdomu8\\build\\lib.win-amd64-3.9\\rti', '-DRTI_LOGGING_DISTLOG_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\WadeHunter\\AppData\\Local\\Temp\\pip-req-build-iqgdomu8\\build\\lib.win-amd64-3.9\\rti\\logging', '-A', 'x64']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for rti
Failed to build rti
ERROR: Failed to build one or more wheels
marc-chiesa commented 3 years ago

Please try re-running the configure.py script. It appears that CMake is unable to find the required target libraries which are copied during configuration. The destination directory for these libraries changed in a recent revision in order to make CMake's find_library work, so if you pulled the latest and tried to build without rerunning configuration the libraries aren't where CMake expects to find them.

huntrontrakkr commented 3 years ago

Thanks for the prompt reply. Upon doing that, I am met with:

python configure.py -j 4 -m -d x64Win64VS2017
INFO: nddscd.dll already exists in destination, skipping copy...
INFO: nddscd.lib already exists in destination, skipping copy...
INFO: nddscored.dll already exists in destination, skipping copy...
INFO: nddscored.lib already exists in destination, skipping copy...
INFO: nddscpp2d.dll already exists in destination, skipping copy...
INFO: nddscpp2d.lib already exists in destination, skipping copy...
INFO: rtidlcd.dll already exists in destination, skipping copy...
INFO: rtidlcd.lib already exists in destination, skipping copy...
INFO: msvcp140.dll already exists in destination, skipping copy...
INFO: rtimonitoringd.dll already exists in destination, skipping copy...
Finished! Run "pip wheel ." to create whl file.

and, then upon rerunning the install, the same error occurs.

huntrontrakkr commented 3 years ago

I attempted to clone a fresh branch just to verify and it seems to be running across the same issue.

marc-chiesa commented 3 years ago

Yes, I can confirm the issue now. As a temporary workaround (and the reason it worked for me initially), append the location of the libraries on your Path environment variable.

marc-chiesa commented 3 years ago

I think I have found a remedy, I am testing it now and will push the fix shortly after.

marc-chiesa commented 3 years ago

Ok, just pushed the update.

huntrontrakkr commented 3 years ago

Works as expected, well done.