CelestiaProject / Celestia

Real-time 3D visualization of space.
https://celestiaproject.space
GNU General Public License v2.0
1.85k stars 310 forks source link

Make spice support dynamically loadable #410

Open 375gnu opened 5 years ago

375gnu commented 5 years ago

NASA's spice library has proprietary obscure licence which prevents its inclusion into GNU/Linux distributions and BSD ports. I.e. see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=841104.

Excerpt from https://naif.jpl.nasa.gov/naif/rules.html:

Obtaining the SPICE Toolkit To meet NASA/JPL requirements and to better ensure getting the correct products, persons wishing a copy of the SPICE Toolkit should obtain it from this web site or from an official NASA flight project distribution. (Also see "Toolkit Redistribution" below.)

Toolkit Redistribution Simple redistribution of the complete Toolkit, such as from a mirror site, is prohibited without prior clearance from NAIF. However, including the SPICE Toolkit library modules and relevant SPICE Toolkit programs and allied User Guides as part of a package supporting a customer-built SPICE-based tool is entirely appropriate.

So while we can provide spice-enabled packages, users of e.g. Debian will not have spice enabled. So the alternative approach is to make spice-enabled code dynamically loadable.

ajtribick commented 9 months ago

Looking at this further - the SPICE toolkit as distributed by NAIF only provides static libraries, similarly the version on homebrew also only builds the static library.

In principle we could define a plugin that statically links to the toolkit and code to call it from the Celestia side, but we probably wouldn't be able to distribute the compiled plugin itself.