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

Arch Linux Setup: optionally install gazebo from AUR and fix pip Call #13160

Merged
merged 4 commits into from
Oct 12, 2019

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Oct 11, 2019

Describe problem solved by the proposed pull request
Gazebo is not an official package for Arch Linux but there's a community driven AUR https://aur.archlinux.org/packages/gazebo/ that can be installed with a helper program yay https://github.com/Jguer/yay which is an officially supported package.

Describe your preferred solution
I notices that running pip as sudo on Arch is not a good idea. It installs the python modules in a different location /root/.local/lib/python3.7/site-packages which depending on your environment can be inaccessible later on.

I made an --gazebo option to the arch setup script that is disabled by default. If it's passed as parameter I install all the official libraries that PX4 needs to simulate with gazebo e.g. protobug, eigen... also yay which automatically builds gazebo from source using the AUR description. There's a small workaround necessary because apparently the AUR description contains one single error.

Test data / coverage
Tested on fresh install Manjaro VM:
gazebo_arch
Disadvantage: It takes a couple of minutes to compile gazebo and all its dependencies.

Additional context
#13111

;

# enable multicore gazebo compilation
sudo sed -i '/MAKEFLAGS=/c\MAKEFLAGS="-j'$(($(grep -c processor /proc/cpuinfo)+2))'"' /etc/makepkg.conf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, and that's why I don't run these scripts 😖.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well now you can 😄

Copy link
Member Author

@MaEtUgR MaEtUgR Oct 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be a better way to get reasonable compilation times? If you run it on default you can come back next working day to see the compilation result.

Copy link
Contributor

@julianoes julianoes Oct 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so my opinion is that if you're using Arch that's probably something you should figure out yourself (by googling and looking at the Arch Wiki).

Copy link
Member Author

@MaEtUgR MaEtUgR Oct 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arch == no convenience allowed? 😝
At least Manjaor I actually find even more convenient than Ubuntu, it does similar stuff but right.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# fix incompatible compile flag to disable default testing that leads to build error
# see https://bitbucket.org/ignitionrobotics/ign-cmake/issues/62/compilation-failing-when-performing
pushd ~/.cache/yay/ignition-cmake/
sed -i 's/-DENABLE_TESTS_COMPILATION:BOOL=False/-DBUILD_TESTING=OFF/g' PKGBUILD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange, I didn't have this problem.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package maintainer screwed up something in the meantime. I didn't understand the process of how to contribute but I'll send him a message and we can take it out as soon as he fixed it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: I commented on the AUR to hopefully get the ignition-cmake fix in such that we can skip the workaround in the future: https://aur.archlinux.org/packages/gazebo/#comment-711597

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin: Enhancement (improvement) 💡 Tools Sub-tools used within PX4 ecosystem (scripts, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants