Failure passing MAKEFLAGS to catkin_make_isolated on FreeBSD
See original GitHub issueI’m attempting to install ROS Kinetic on FreeBSD 12.1 (at my peril).
I’m following the ‘from source’ instructions at: http://wiki.ros.org/kinetic/Installation/Source
I am performing step 2.1.3 (Building the catkin workspace), which directs invoking catkin_make_isolated
as follows:
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
I get the following output:
==> Processing catkin package: 'catkin'
...
==> make -j4 -l4 in '$PATH/ros_catkin_ws/build_isolated/catkin'
...
<== Failed to process package 'catkin':
Command '['make', '-j4', '-l4']' returned non-zero exit status 2
This seems to be due to FreeBSD make
not having the loading average flag -l
.
I have tried both setting the MAKEFLAGS
and ROS_PARALLEL_JOBS
environment variables to avoid setting the -l
flag. E.g., set ROS_PARALLEL_JOBS='-j4'
.
The result is that it sends a flag -pn
to make
, as follows:
==> Processing catkin package: 'catkin'
...
==> make -j4 in '$PATH/ros_catkin_ws/build_isolated/catkin'
...
<== Failed to process package 'catkin':
Command '['make', '-pn']' returned non-zero exit status 2
Interestingly, it appears that it’s invoking make -j4
, but then says that the actual flag sent to make
is -pn
.
I have also attempted to set the flags when invoking catkin_make_isolated
, but get the same result (with -pn
). For example:
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release -j4
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (9 by maintainers)
Top GitHub Comments
The make flags
-j
and-j
are only added conditionally, see https://github.com/ros/catkin/blob/4d4467502337a76b23a14372cc6659f12ee68d5b/python/catkin/builder.py#L323-L325. If you pass job flags in any other way the logic won’t be triggered (and doesn’t add the-l
flag which isn’t supported on your platform).Possible options:
--make-args -j4
MAKEFLAGS=-j4
(the command won’t show these since they are set as an environment variable)ROS_PARALLEL_JOBS=-j4
The
-pn
argument is likely coming from this invocation: https://github.com/ros/catkin/blob/4d4467502337a76b23a14372cc6659f12ee68d5b/python/catkin/builder.py#L458 which is trying to determine the available targets. Maybe that option is not supported bymake
on your platform either? If that is the case can you please post the version ofmake
you are using. Are there any alternative options in yourmake
version to enumerate the available targets?The existing options are in the form of
--use-*
since they also pass different arguments to CMake to change the generator.I don’t mind either or. Naming the new option
--use-gmake
sounds good to me too.