-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Running ign gazebo fails on Linux #4
Running ign gazebo fails on Linux #4
Comments
Probably something strange is going on at https://github.com/ignitionrobotics/ign-common/blob/33bde9a916a578566288584d05033eec8e3015b5/src/SystemPaths.cc#L163 . |
Is it possible that the OS dependent logic used in Ignition (likely ign-plugin or ign-common) to form the shared library name is broken in conda? From the error, it searches for:
when, on Linux, it should search instead:
|
Yes, it seems something like that, I wonder if the binary relocation logic in conda is doing some dark magic. |
I had a look to this problem. It seems that the default plugin path added in SystemLoader.cc#L58: std::string homePath;
ignition::common::env(IGN_HOMEDIR, homePath);
systemPaths.AddPluginPaths(homePath + "/.ignition/gazebo/plugins");
systemPaths.AddPluginPaths(IGN_GAZEBO_PLUGIN_INSTALL_DIR); // <-- This line uses the macro I didn't get the origin of the problem, but the following provides a quick fix: diff --git a/src/SystemPaths.cc b/src/SystemPaths.cc
index ff9c0c2..d87c9ed 100644
--- a/src/SystemPaths.cc
+++ b/src/SystemPaths.cc
@@ -235,7 +235,9 @@ void SystemPaths::AddFilePaths(const std::string &_path)
std::string SystemPaths::NormalizeDirectoryPath(const std::string &_path)
{
std::string path = _path;
- // Use '/' because it works on Linux, OSX, and Windows
+ path.erase(std::find(path.begin(), path.end(), '\0'), path.end());
+
+ // Use '/' because it works on Linux, OSX, and Windows
std::replace(path.begin(), path.end(), '\\', '/');
// Make last character '/'
if (!EndsWith(path, "/")) |
Thanks @diegoferigo . This is probably due to some interaction of the text/binary relocation feature of conda (see https://docs.conda.io/projects/conda-build/en/latest/resources/make-relocatable.html) and the line |
Ow ok I had no idea that such workaround was in place in conda, good to know! Thinking about it, it makes totally sense. Though, if this is true as it seems, also other macros could be affected.
I worked on the same environment described in #6. On top of it, I compiled
I didn't try it on the environment just described, but the development environment I'm using daily in the past month is conda-based. In particular, I install all the dependencies I need in a conda environment, and then I build against them a complete colcon environment with either Dome or Edifice. This setup is not affected by the problem, so I can confirm that it only occurs when using the binaries distributed through conda-forge. |
I see, so you continue to use the Ignition Gazebo binaries from conda? I see, that make sense.
Note that are not the macros that are corrupted (I just checked the |
Actually, no :) My daily setup is and remains based on colcon using conda for the dependencies. I'd like to switch to conda binaries when deploying to HPC since it would allow me to bypass the need of using docker / singularity, but the quick workarounds I mentioned is too dirty and I need also other workarounds for other projects not listed here. I'm following the status of conda-forge distribution, but I'm not blocked thanks to the existing containerization setup I'm currently using.
Yep thanks for clarifying, it is what I meant. |
I meant for this specific test. Because if you do not install ignition-gazebo from conda-forge and instead you compile it from source, it will work even without this fix. |
Now I got your point. Yes, for those reading this issue up to here, if you install from conda-forge all the Disclaimer: I only tested Ubuntu, no idea about the other platforms. Edit: I want also to add that this setup does not match what you get from the official Ubuntu binaries, since conda-forge uses upstream dart that does not have all the fixes that the Open Robotic's fork has. However, excluding particular cases, your simulation will be ok. Check ignition-forks/dart for more details. |
Ok, so the patch #4 (comment) was never tested with a Ignition Gazebo installed via conda binaries? |
Yes yes I tested it and it works. However, I would not recommend users to override files of |
Issue:
Running
ign gazebo -s
fails with the following error:Environment (
conda list
):Details about
conda
and system (conda info
):The text was updated successfully, but these errors were encountered: