Catkin plugin: Enforce C.UTF-8 locale. #497

Merged
merged 2 commits into from Aug 3, 2016

Conversation

Projects
None yet
3 participants
Member

kyrofa commented May 3, 2016

ROS apps run fine on Ubuntu Core, but throw boost locale errors on Xenial desktop. This is due to LP: #1576411, where the desktop locales aren't available to snaps even though the locale environment is set for the snaps. This PR is a quick and dirty fix for LP: #1577557 that simply sets LC_ALL=C.UTF-8 for snaps with Catkin parts. This PR can be reverted once LP: #1576411 is actually fixed.

Collaborator

sergiusens commented May 3, 2016

Question, if a part, another part adds support to the snap for locales, will we be able to get out of the C locale?

Member

kyrofa commented May 3, 2016

Good question... I guess it depends on who sets the environment last huh? So yeah, other parts that set a locale can bust ROS, and Catkin parts can bust other parts that want a locale. What's the best way forward here?

snapcraft/plugins/catkin.py
@@ -139,6 +139,11 @@ def env(self, root):
# and use $ROS_HOME to determine where to put them.
'ROS_HOME=$SNAP_USER_DATA/ros',
+ # ROS seems to bust with locale errors if used on anything other
+ # than C or C.UTF-8, so we'll set that here for a consistent
+ # experience across Ubuntu Core and Desktop environments.
@elopio

elopio May 3, 2016

Member

is there a ROS bug for this?

@kyrofa

kyrofa May 3, 2016

Member

A boost one actually. They claim it should be fixed in a newer version, but of course, that doesn't help us here.

Member

elopio commented May 3, 2016

seems ugly, but the comment states that already. We are not dealing with locales yet, and we can come back to this change in case of problem, So if this makes it work, I'm ok with the change.

@kyrofa kyrofa closed this May 12, 2016

@kyrofa kyrofa reopened this Jul 16, 2016

Member

kyrofa commented Jul 16, 2016

I've re-opened this PR. The bug which is the root cause of this issue (LP: #1576411) has sat idle for some time, and we're now getting questions from people hitting this, so we need to work around it until the bug is fixed in snapd.

kyrofa added some commits May 3, 2016

Catkin plugin: Enforce C.UTF-8 locale.
ROS apps run fine on Ubuntu Core, but throw boost locale errors on
Xenial desktop. This is due to LP: #157641 where the desktop locales
aren't available to snaps even though the locale environment is set for
the snaps. This PR is a quick and dirty fix for LP: #1577557 that simply
sets `LC_ALL=C.UTF-8` for snaps with Catkin parts. This PR can be
reverted once LP: #1576411 is actually fixed.

LP: #1577557

Signed-off-by: Kyle Fazzari <kyle@canonical.com>

@sergiusens sergiusens merged commit 47c9a87 into snapcore:master Aug 3, 2016

4 checks passed

autopkgtest integration Success
Details
autopkgtest snaps Success
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.0002%) to 97.087%
Details
Member

kyrofa commented Aug 3, 2016

Thanks for babysitting @sergiusens 😄 .

@kyrofa kyrofa deleted the kyrofa:bugfix/1577557/ros_locale branch Aug 3, 2016

kalikiana pushed a commit to kalikiana/snapcraft that referenced this pull request Apr 6, 2017

Catkin plugin: Enforce C.UTF-8 locale. (#497)
ROS apps run fine on Ubuntu Core, but throw boost locale errors on
Xenial desktop. This is due to LP: #157641 where the desktop locales
aren't available to snaps even though the locale environment is set for
the snaps. This PR is a quick and dirty fix for LP: #1577557 that simply
sets `LC_ALL=C.UTF-8` for snaps with Catkin parts. This PR can be
reverted once LP: #1576411 is actually fixed.

LP: #1577557

Signed-off-by: Kyle Fazzari <kyle@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment