Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

direct stderr output to stderr again #424

Merged
merged 3 commits into from
Jan 13, 2017
Merged

direct stderr output to stderr again #424

merged 3 commits into from
Jan 13, 2017

Conversation

wjwwood
Copy link
Member

@wjwwood wjwwood commented Jan 12, 2017

Replacement for #400, as I could not push to that pr.

@wjwwood
Copy link
Member Author

wjwwood commented Jan 12, 2017

Starting with a baseline output of:

% catkin b
==> Expanding alias 'b' from 'catkin b' to 'catkin build'
-------------------------------------------------------------------
Profile:                     default
Extending:                   None
Workspace:                   /Users/william/Desktop/test_ws
-------------------------------------------------------------------
Source Space:       [exists] /Users/william/Desktop/test_ws/src
Log Space:          [exists] /Users/william/Desktop/test_ws/logs
Build Space:        [exists] /Users/william/Desktop/test_ws/build
Devel Space:        [exists] /Users/william/Desktop/test_ws/devel
Install Space:      [exists] /Users/william/Desktop/test_ws/install
DESTDIR:            [unused] None
-------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        merged
-------------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-------------------------------------------------------------------


-------------------------------------------------------------------
WARNING: Your workspace is not extending any other result space,
but it is set to use a `linked` devel space layout. This requires
the `catkin` CMake package in your source space in order to be
built.
-------------------------------------------------------------------

[build] Found '2' packages in 0.0 seconds.
Starting  >>> catkin
Finished  <<< catkin                [ 0.2 seconds ]
Starting  >>> serial
_________________________________________________________________________________________________________________________________________________________________________________
Errors     << serial:make /Users/william/Desktop/test_ws/logs/serial/build.make.015.log
/Users/william/Desktop/test_ws/src/serial/src/impl/unix.cc:85:8: error: no member named 'bar' in 'timespec'
  time.bar = 2;
  ~~~~ ^
1 error generated.
make[2]: *** [CMakeFiles/serial.dir/src/impl/unix.cc.o] Error 1
make[1]: *** [CMakeFiles/serial.dir/all] Error 2
make: *** [all] Error 2
cd /Users/william/Desktop/test_ws/build/serial; catkin build --get-env serial | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
.................................................................................................................................................................................
Failed     << serial:make           [ Exited with code 2 ]
Failed    <<< serial                [ 0.6 seconds ]
[build] Summary: 1 of 2 packages succeeded.
[build]   Ignored:   None.
[build]   Warnings:  None.
[build]   Abandoned: None.
[build]   Failed:    1 packages failed.
[build] Runtime: 1.1 seconds total.

Without this patch, redirecting stdout to /dev/null looked like this:

% catkin b > /dev/null

With this patch, it works like this:

% catkin b > /dev/null
_________________________________________________________________________________________________________________________________________________________________________________
Errors << serial:make /Users/william/Desktop/test_ws/logs/serial/build.make.016.log
/Users/william/Desktop/test_ws/src/serial/src/impl/unix.cc:85:8: error: no member named 'bar' in 'timespec'
  time.bar = 2;
  ~~~~ ^
1 error generated.
make[2]: *** [CMakeFiles/serial.dir/src/impl/unix.cc.o] Error 1
make[1]: *** [CMakeFiles/serial.dir/all] Error 2
make: *** [all] Error 2
cd /Users/william/Desktop/test_ws/build/serial; catkin build --get-env serial | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
.................................................................................................................................................................................
Failed << serial:make            [ Exited with code 2 ]

@wjwwood
Copy link
Member Author

wjwwood commented Jan 12, 2017

Switching to a warning in the test package also works:

% catkin b > /dev/null
_________________________________________________________________________________________________________________________________________________________________________________
Warnings << serial:make /Users/william/Desktop/test_ws/logs/serial/build.make.017.log
/Users/william/Desktop/test_ws/src/serial/src/impl/unix.cc:86:13: warning: implicit conversion from 'float' to 'int' changes value from 1.3 to 1 [-Wliteral-conversion]
  int foo = 1.3f;
      ~~~   ^~~~
1 warning generated.
cd /Users/william/Desktop/test_ws/build/serial; catkin build --get-env serial | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
.................................................................................................................................................................................

@wjwwood wjwwood merged commit 426af25 into master Jan 13, 2017
@wjwwood wjwwood deleted the wjwwood-fix-#396 branch January 13, 2017 01:51
@wjwwood
Copy link
Member Author

wjwwood commented Jan 13, 2017

Thanks again @rhaschke.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants