Panda3D includes GPL code on Windows

Bug #726736 reported by rdb
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Panda3D
Fix Released
Critical
David Rose

Bug Description

GPL-licensed code is included as part of Panda3D, and built as part of libp3dtoolutil on Windows. This issue concerns the gnu_getopt files in dtoolutil.

This is unacceptable. This functionality needs to be rewritten and the GPL-licensed files must be removed from the codebase.

rdb (rdb)
description: updated
Revision history for this message
Treeform (starplant) wrote :

http://freegetopt.sourceforge.net/
^ i wander how compatible this is

Revision history for this message
OvermindDL1 (overminddl1) wrote :

Or better yet, use Boost.Program_Options[0], works on all platforms and the license lets you include the source inside Panda3D (and the boost tool bcp will automatically pull all the files you need, even renaming the boost namespace to whatever you want to make it dead simple).

[0]: Documentation for Boost.Program_Options: http://www.boost.org/doc/libs/1_46_1/doc/html/program_options.html

Revision history for this message
rdb (rdb) wrote :

That sounds like an excellent idea. Thanks!

Changed in panda3d:
milestone: none → 1.8.0
status: New → Triaged
Revision history for this message
David Rose (droklaunchpad) wrote :

Actually, I'm skeptical. My recent experience with Boost is that "dead simple" is a bit of a hyperbole. In fact, Boost is large and heavy, and difficult and slow to install; it's rather on the same scale as Panda3D itself. This is not altogether bad, but we have enough difficulties with naive C++ developers attempting to compile Panda today; I'd hate to imagine how much worse it would get if we added Boost into the dependency list.

Boost is a powerful suite of tools, and it can be fun to develop with; but it also imposes a heavy burden on a new developer. I'm not altogether opposed to integrating with Boost for future Panda development, but it would be a hard sell: we'd have to gain a *lot* of benefit from using Boost to justify its additional burden. This tiny bit of code seems nowhere near worthwhile. I think we'd be much better served in this case to spend the couple of hours it would take to write a clean implementation of getopt() and call it done.

Maybe I'll be able to do that this weekend.

Revision history for this message
rdb (rdb) wrote :

I understand your concerns, and I have shared them to some extent. However, keep in mind that Boost is mostly a large collection of preprocessor macros and inline templates, and only very few modules have code that is compiled into a library. Using header-only parts of Boost would keep it a compile-time dependency, and not a runtime one.
Furthermore, it seems to be possible to pull out a small part of the Boost headers to include these into a project that uses them, for instance using the bcp tool as OvermindDL1 suggested. This would allow us to take only the relevant headers from boost and include them into the Panda3D source.

That said, I have nothing against a permissively licensed implementation of the getopt interface, perhaps based on freegetopt. Freegetopt seems to be lacking a getopt_long function, though.

Revision history for this message
David Rose (droklaunchpad) wrote :

Ah, I misunderstood Overmind's suggestion. You're absolutely right: I can see that integrating a handful of relevant Boost header files directly and permanently into the Panda source code would be a fine solution to this problem, and presumably wouldn't impose a burden to future Panda developers.

Revision history for this message
David Rose (droklaunchpad) wrote :

Just committed a new, clean-room implementation of getopt() and getopt_long_only() that doesn't use any GPL code. It seemed a little easier to write this new implementation than to rework our existing code to use Boost.Program_Options instead of getopt().

Changed in panda3d:
assignee: nobody → David Rose (droklaunchpad)
status: Triaged → Fix Committed
Revision history for this message
rdb (rdb) wrote :

Great! Many thanks! :-)

rdb (rdb)
Changed in panda3d:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.