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

Add option to build without curl #830

Closed
julianoes opened this issue Aug 7, 2019 · 5 comments · Fixed by #865 or #1955
Closed

Add option to build without curl #830

julianoes opened this issue Aug 7, 2019 · 5 comments · Fixed by #865 or #1955

Comments

@julianoes
Copy link
Collaborator

For slow compilation (e.g. on embedded boards) it would be nice to be able to build without curl.

@JonasVautherin
Copy link
Collaborator

Isn't it good enough to cross-compile for those boards? If we make it optional in the code, we will also need to make it optional in the superbuild (because I guess we don't expect people to figure out that by themselves), and that adds complexity and corner cases everywhere...

@julianoes
Copy link
Collaborator Author

Sometimes you're in a debugging situation where you just need to rebuild on the device.

@JonasVautherin
Copy link
Collaborator

JonasVautherin commented Aug 9, 2019

Right. But I don't think that adding options in CMakeLists and ifdefs in the code is the right solution for debugging on the device.

If you are debugging curl on the device, then you need to compile it. If you are debugging MAVSDK, then you don't have to recompile curl. Yes, that implies that you may need to not use our superbuild and to learn how to do that (e.g. cross-compile the dependencies separately, copy that on your device and build mavsdk on the device without SUPERBUILD=ON). But that's "basic" dependency management in cmake. I'm happy to write a superbuild to make that easier for most use-cases, but for specific use-cases, I believe that developers should learn how to deal with that.

To me it would be the same as saying "we should make it such that cmake checks if the submodules are correctly synced, because we don't want our developers to have to know about git submodules", and then "cmake should show a warning when people push to their fork without having an 'upstream' branch, because not everyone knows how to work with a fork".

We can do all that, but it results in more code that we need to maintain, and it forces devs to learn about our custom wrappers instead of learning to use the actual tools.

Am I too much of a purist? 😆

@julianoes
Copy link
Collaborator Author

I agree with your examples but this is more a request that the MAVSDK should be able to build and run with minimal dependencies if required.

@julianoes
Copy link
Collaborator Author

For the record: it still requires curl but you can now also use libcurl from the system instead of getting it via git and building it. The way to do so is to use the configure option cmake -DSUPERBUILD=OFF for the configure step. Note this is supported as of Ubuntu 18.04 but not 16.04.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants