Circumvent _vendor projects

asked 2022-02-03 08:52:34 -0500

renob321 gravatar image

all _vendor projects have been the single most annoying thing with trying to build ROS2 from source. They constantly brake the build sequence, with varying issues. Is there any way to just get the dependencies download/build them myself? that would be for example with projects such as libyaml_vendor, tinyxml_vendor to name a few. Relying on vendor projects to install software seems like hack, the versions get old fast and I bet updating the vendor projects are an even bigger pain in the ass. A package-manager of some sort would be great here, or provide the dependencies so a user can install them with their own package manager.

edit retag flag offensive close merge delete

Comments

A package-manager of some sort would be great here

Just an observation, but one of the main reasons the "vendor projects" exist is exactly because there are/were no suitable versions available through package managers -- on the platforms targetted by the various ROS releases.

Vendor-ed dependencies are used as a last resort, and almost all of them have checks to avoid building from source if the dependency is already satisfied in some other way. See here for instance for tinyxml_vendor which you mention.

Relying on vendor projects to install software seems like hack, the versions get old fast

most vendor-ed dependencies are pinned to known-working versions on purpose.


Perhaps you could explain what you mean by "they constantly break the build sequence"?

Your current question seems to be an xy-problem.

gvdhoorn gravatar image gvdhoorn  ( 2022-02-03 09:36:16 -0500 )edit

I see the reason for their existence, a last resort, or a hack. If you took the time to actually dissect my question, like literately look at the sentence with a question mark. I can state it once more. Is there anyway to extract the dependencies of a given project to circumvent using _vendor projects? Because I am aware of that they do have checks for if the software is already downloaded, I would like to not have to download them of some scattered links to sourceforge or github or wherever, I would like to provide them myself. As for the xy-problem, I believe my question was quite clear. The rest of the post was more of a, "I am looking for a solution that might fit this description". But nice website for xy-problem, did you make it yourself?

Issues like this:

https://github.com/ros2/rosbag2/issue...

renob321 gravatar image renob321  ( 2022-02-03 09:47:38 -0500 )edit
1

Because I am aware of that they do have checks for if the software is already downloaded, I would like to not have to download them of some scattered links to sourceforge or github or wherever, I would like to provide them myself.

I believe you're misunderstanding how the checks work.

They're not custom checks, it's all standard CMake. And they check whether the dependencies have been installed, not whether they've been downloaded.

If you install those dependencies on your system in such a way that CMake can find them (using find_package(..), or whatever the specific _vendor package is using), then nothing will be downloaded or built from source.

If your target platform can provide TinyXML -- at the correct version -- by downloading and installing some binary package, and it's findable by CMake -> it should just work.

But nice website for xy-problem, did you make ...

(more)
gvdhoorn gravatar image gvdhoorn  ( 2022-02-03 09:55:23 -0500 )edit
1

If you took the time to actually dissect my question, like literately look at the sentence with a question mark.

if you want to be snarky, I'll stop commenting.

I just wanted to point out the fact that it's all basic CMake and there are checks which make sure to not download anything unless absolutely necessary.

gvdhoorn gravatar image gvdhoorn  ( 2022-02-03 09:57:50 -0500 )edit

Where did i say that it was custom checks? You're really trying hard here to not help me with my actual question. But i'll bite. Here are two examples.

https://github.com/ros2/libyaml_vendo...

https://github.com/ros2/rosbag2/blob/...

The first one actually looks for the specified version the other one does not, most of the vendor projects are inconsistent and poorly implemented.

renob321 gravatar image renob321  ( 2022-02-03 10:07:10 -0500 )edit
1

You're really trying hard here to not help me with my actual question

You seem to already know the answer:

  • if a _vendor package checks for a dependency: install that dependency prior to building your workspace -> no downloads
  • if a _vendor package does not check: fix it to first check

that's why I believe this is an xy-problem. You're trying to work-around the symptoms, not address the cause.

Is the/another question actually which versions you would need?

gvdhoorn gravatar image gvdhoorn  ( 2022-02-03 10:11:58 -0500 )edit
1

xy-problems are about questions, not answers or solutions.

But let me apologise, it seems we got off on the wrong foot.

I still believe it's better to address the cause of the issue (ie: make all _vendor packages check before downloading) -- which would seem to solve your problems as well.

As a final comment: I also still believe you should be able to install the dependencies before building your workspace, and the _vendor packages which do check will not try to download & build anything.

For the ones that don't check it seems the only way to avoid them would be to not place them in your workspace. If you provide the dependency some other way dependents should be able to find them.

gvdhoorn gravatar image gvdhoorn  ( 2022-02-03 10:33:04 -0500 )edit

Just to be clear: I did not downvote your question.

It seems like a legitimate question to me (the "how do I address _vendor packages not working when there is no internet / the downloads are corrupt?" question).

gvdhoorn gravatar image gvdhoorn  ( 2022-02-05 01:26:33 -0500 )edit