Coder Social home page Coder Social logo

uncrustify_vendor's Introduction

uncrustify_vendor's People

Contributors

clalancette avatar cottsay avatar nuclearsandwich avatar marcoag avatar paudrow avatar mikaelarguedas avatar audrow avatar rotu avatar emersonknapp avatar jacobperron avatar hidmic avatar sloretz avatar

Watchers

William Woodall avatar Michael Carroll avatar  avatar Tully Foote avatar Jackie Kay avatar James Cloos avatar Alejandro Hernández Cordero avatar Hunter L. Allen avatar Karsten Knese avatar Jorge J. Perez avatar John Shepherd avatar Yadu avatar methylDragon avatar  avatar  avatar

uncrustify_vendor's Issues

[Windows] No CMAKE_CXX_COMPILER found when building

I'm building the ROS 2 packages from source following the Windows source tutorial, but I'm blocked by a failure on uncrustify_vendor package. CMake reports that C/CXX compilers cannot be found. Following is the traceback I see:

CMake error
C:\dev\ros2_rolling>colcon build --merge-install --packages-select uncrustify_vendor --event-handlers console_direct+
Starting >>> uncrustify_vendor
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
-- Found ament_cmake: 1.2.0 (C:/dev/ros2_rolling/install/share/ament_cmake/cmake)
-- Configuring done
-- Generating done
-- Build files have been written to: C:/dev/ros2_rolling/build/uncrustify_vendor
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  Checking Build System
  Performing configure step for 'uncrustify-45b836cff040594994d364ad6fd3f04adc890a26'
  -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
  -- The C compiler identification is unknown
  -- The CXX compiler identification is unknown
  CMake Error at CMakeLists.txt:3 (project):
    No CMAKE_C_COMPILER could be found.



  CMake Error at CMakeLists.txt:3 (project):
    No CMAKE_CXX_COMPILER could be found.



  -- Configuring incomplete, errors occurred!
  See also "C:/dev/ros2_rolling/build/uncrustify_vendor/uncrustify-45b836cff040594994d364ad6fd3f04adc890a26-prefix/src/uncrustify-45b836cff040594994d364ad6fd3f04adc890a26-build/CMakeFiles/CMakeOutput.log".
  See also "C:/dev/ros2_rolling/build/uncrustify_vendor/uncrustify-45b836cff040594994d364ad6fd3f04adc890a26-prefix/src/uncrustify-45b836cff040594994d364ad6fd3f04adc890a26-build/CMakeFiles/CMakeError.log".
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'C:\dev\ros2_rolling\build\uncrustify_vendor\CMakeFiles\d177f57d11cdf441cb98984155862ddc\uncrustify-45b836cff040594994d364ad6fd3f04adc890a26-configure.rule;C:\dev\ros2_rolling\build\uncrustify_vendor\CMakeFiles\d177f57d11cdf441cb98984155862ddc\uncrustify-45b836cff040594994d364ad6fd3f04adc890a26-build.rule;C:\dev\ros2_rolling\build\uncrustify_vendor\CMakeFiles\d177f57d11cdf441cb98984155862ddc\uncrustify-45b836cff040594994d364ad6fd3f04adc890a26-install.rule;C:\dev\ros2_rolling\build\uncrustify_vendor\CMakeFiles\1f61a89c37b27fe4d1c79f10968d9730\uncrustify-45b836cff040594994d364ad6fd3f04adc890a26-complete.rule;C:\dev\ros2_rolling\build\uncrustify_vendor\CMakeFiles\6aaed628ba48b5d83eef28c741094c56\uncrustify-45b836cff040594994d364ad6fd3f04adc890a26.rule;C:\dev\ros2_rolling\src\ament\uncrustify_vendor\CMakeLists.txt' exited with code 1. [C:\dev\ros2_rolling\build\uncrustify_vendor\uncrustify-45b836cff040594994d364ad6fd3f04adc890a26.vcxproj]
Failed   <<< uncrustify_vendor [6.84s, exited with code 1]

Summary: 0 packages finished [10.4s]
  1 package failed: uncrustify_vendor

Things to note:

  • I can build uncrustify_vendor as a pure CMake package if I comment out the ament_package invocation, but I get this error every time when building through colcon.
  • Per a suggestion on ROS answers, checking out the foxy branch lets me build successfully.

Any idea what's going on? I made a ROS answers post recently but didn't get much traction, so I'm redirecting here.

Compilation error python/pyenv related?

Hello,

I have a compilation error when trying to compile ROS 2 which seems to depend on that package.

Here is the error log, any idea of what am I supposed to do ?

--- stderr: uncrustify_vendor                                                                                                                                                                                                             
pyenv: python: command not found

The `python' command exists in these Python versions:
  2.7.18

Note: See 'pyenv help global' for tips on allowing both
      python2 and python3 to be found.
pyenv: python: command not found

The `python' command exists in these Python versions:
  2.7.18

Note: See 'pyenv help global' for tips on allowing both
      python2 and python3 to be found.
make[5]: *** [src/option_enum.cpp] Error 127
make[4]: *** [CMakeFiles/uncrustify.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [uncrustify-0.72.0-prefix/src/uncrustify-0.72.0-stamp/uncrustify-0.72.0-build] Error 2
make[1]: *** [CMakeFiles/uncrustify-0.72.0.dir/all] Error 2
make: *** [all] Error 2
make: INTERNAL: Exiting with 13 jobserver tokens available; should be 12!
---
Failed   <<< uncrustify_vendor [3.78s, exited with code 2]

I am on MacOS 13.0.1 with python 3.11.4 (system) and pyenv 2.3.23

Compile error:use of undeclared identifier 'rindex'

chris@chris-166:~/Projects/ros2-android/src$ colcon build --packages-select uncrustify_vendor
Starting >>> uncrustify_vendor
--- stderr: uncrustify_vendor                            
/home/chris/Projects/ros2-android/src/build/uncrustify_vendor/uncrustify-0.72.0-prefix/src/uncrustify-0.72.0/src/log_rules.cpp:51:12: error: use of undeclared identifier 'rindex'
   where = rindex(func, ':');
           ^
1 error generated.
gmake[5]: *** [CMakeFiles/uncrustify.dir/build.make:797: CMakeFiles/uncrustify.dir/src/log_rules.cpp.o] Error 1
gmake[5]: *** Waiting for unfinished jobs....
gmake[4]: *** [CMakeFiles/Makefile2:1048: CMakeFiles/uncrustify.dir/all] Error 2
gmake[3]: *** [Makefile:166: all] Error 2
gmake[2]: *** [CMakeFiles/uncrustify-0.72.0.dir/build.make:89: uncrustify-0.72.0-prefix/src/uncrustify-0.72.0-stamp/uncrustify-0.72.0-build] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:140: CMakeFiles/uncrustify-0.72.0.dir/all] Error 2
gmake: *** [Makefile:149: all] Error 2
---
Failed   <<< uncrustify_vendor [0.68s, exited with code 2]

Summary: 0 packages finished [1.12s]
  1 package failed: uncrustify_vendor
  1 package had stderr output: uncrustify_vendor
  1. Version or commit hash
    commit ec8f8b4 (HEAD -> humble, tag: 2.0.2, origin/humble)
  2. Compilation environment:22.04.1-Ubuntu

ROS 2 Galactic Failed to compile due to Uncrustify_vendor

The CMakeLists.txt in this directory doesn't work. I believe there are errors in the implementation for ros2 galactic and should revert to ros2 foxy instead. Using ros2 foxy CMake produced a successful build.

C:\dev\ros2_galactic\src\ament\uncrustify_vendor\CMakeLists.txt

Galactic Implementation error code.
Performing patch step for 'uncrustify-704034b8e9999fc2bf83be4aaf464859021a20c4' CUSTOMBUILD : error : patch failed: CMakeLists.txt:440 [C:\dev\ros2_galactic\build\uncrustify_vendor\uncrustify-704034b8e9999fc2bf83be4aaf464859021a20c4.vcxproj] CUSTOMBUILD : error : CMakeLists.txt: patch does not apply [C:\dev\ros2_galactic\build\uncrustify_vendor\uncrustify-704034b8e9999fc2bf83be4aaf464859021a20c4.vcxproj]

Update to upstream (0.72.0)

Is there a plan to update the bundled uncrustify to the upstream version? As it stands, the version packed here is older than the one in Ubuntu Focal repos (0.69.0).

Personally, I'm most interested in the following options added in 0.70.0:

  • nl_multi_line_sparen_open
  • nl_multi_line_sparen_close
    but many more useful additions and fixes were made since 0.68.

Another possible solution would be to optionally depend on the system-provided uncrustify on *nixes and softlinking /opt/ros/<release>/bin/uncrustify to the /usr/bin/uncrustify binary - this way one could install another version and have e.g. ament_cmake_uncrustify use it automagically.


Note: Uncrustify (unfortunately) doesn't stick to semver and such an update could be a breaking change - some configuration files may need minor manual updating, e.g. with:

uncrustify --update-config-with-doc -c uncrustify.cfg -o uncrustify.cfg

Patch does not apply on rebuild

I don't know if it was #15 or #16, but rebuilding the package after a successful build results in an error now.

error: patch failed: CMakeLists.txt:440
error: CMakeLists.txt: patch does not apply
gmake[2]: *** [CMakeFiles/uncrustify-0.68.1.dir/build.make:119: uncrustify-0.68.1-prefix/src/uncrustify-0.68.1-stamp/uncrustify-0.68.1-patch] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:97: CMakeFiles/uncrustify-0.68.1.dir/all] Error 2
gmake: *** [Makefile:160: all] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.