Skip to content

Commit 2277ecf

Browse files
committed
Allow using catkin_virtualenv
- Redirect ROS_HOME, PIP_CACHE_DIR, PIP_TOOLS_CACHE_DIR - Ignore dh_strip error for sound_classification
1 parent f0636ef commit 2277ecf

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,13 @@ function build_pkg {
208208
# Configure ament python packages to install into lib/python3/dist-packages (instead of lib/python3.x/site-packages)
209209
sed -i 's@lib/{interpreter}/site-packages@lib/python3/dist-packages@' debian/rules
210210

211+
if [[ "$pkg_name" =~ "sound_classification"|"ros_speech_recognition"|"respeaker_ros"|"lpg_planner" ]]; then
212+
# skip dh_shlibdeps, because some pip modules contain x86/x86_64/win32/mac binaries
213+
sed -i '/dh_shlibdeps / s@$@ || echo "Skip dh_shlibdeps error!!!"@' debian/rules
214+
# ignore dh_strip error 'numpy/core/_multiarray_umath.cpython-310-x86_64-linux-gnu.so has a corrupt string table index'
215+
echo -e 'override_dh_strip:\n dh_strip || true\n' >> debian/rules
216+
fi
217+
211218
# https://github.com/ros-infrastructure/bloom/pull/643
212219
echo 11 > debian/compat
213220

src/prepare.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,13 @@ EOF
127127
sed -e 's#\(union-type\)=overlay#\1=none#' -e 's#\[sbuild\]#[sbuild-rw]#'\
128128
/etc/schroot/chroot.d/sbuild | ici_asroot tee /etc/schroot/chroot.d/sbuild-rw
129129

130+
mkdir /tmp/cache
130131
ici_log
131132
ici_color_output BOLD "Add mount points to sbuild's fstab"
132133
cat <<- EOF | ici_asroot tee -a /etc/schroot/sbuild/fstab
133134
$CCACHE_DIR /build/ccache none rw,bind 0 0
134135
$DEBS_PATH /build/repo none rw,bind 0 0
136+
/tmp/cache /build/cache none rw,bind 0 0
135137
EOF
136138

137139
ici_log
@@ -142,7 +144,12 @@ EOF
142144
function configure_sbuildrc {
143145
# https://wiki.ubuntu.com/SimpleSbuild
144146
cat << EOF | tee ~/.sbuildrc
145-
\$build_environment = { 'CCACHE_DIR' => '/build/ccache' };
147+
\$build_environment = {
148+
'CCACHE_DIR' => '/build/ccache',
149+
'ROS_HOME' => '/build/cache/ros',
150+
'PIP_CACHE_DIR' => '/build/cache/pip',
151+
'PIP_TOOLS_CACHE_DIR' => '/build/cache/pip'
152+
};
146153
\$path = '/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games';
147154
\$dsc_dir = "package";
148155
\$build_path = "/build/package/";

0 commit comments

Comments
 (0)