Wikipedia seems to suggest that CDDL and GPL are incompatible, yet no one knows for sure why or how.
Why and how are the CDDL and GPL are incompatible?
Be careful with the claims about the CDDL on the FSF website, they are wrong. Some years ago, Eben Moglen confirmed to me in a private mail that the claims about the CDDL on the FSF website are based on a false assumption on how BSD / GPL compatibility may be avowed. So the BSD text and the CDDL text on the same website both do not apply. I asked Moglen to try to encourage Richard Stallman to change this, but it seems that the attempt from Moglen to do this resulted in discord.
The CDDL is a license that does not try to enforce restrictions that would not stand in court but disallows relicensing of code. The fact that on the other side, the CDDL explicitly limits its scope to the files that contain CDDL'd code, allows us make our first conclusion:
The GPL is a license that limits its scope to the so called "work" limit and forbids relicensing of code. This allows us to make the next conclusion:
Now we have to understand what the CDDL allows, what the GPL allows and which claims from the GPL are void because they are in conflict with the law...
In the EU, we have some consumer protection laws that cause rules for "terms of business" that forbid some rules in contracts that cannot be set up by both parties but are dictated by one of the party. In case of the GPL, this allows licensees of GPL'd code to interpret some of the ambiguous claims in the way that gives most convenience to the licensee.
In the US, consumer protection laws are based on the construct that such unilateral contracts are not called contracts but "Licenses" and such a license may not enforce anything that is not explicitly listed in the US Copyright law.
As a result, both jurisdictions make the claims in GPL section 0 (where the GPL tries to defined what a derivative work is) void claims.
In particular: the claim from the GPL that tries to define that a so-called "collective work" is rather a "derivative work" is void. This is fine, as it permits to create collective works with GPL'd code being used.
Please first read:
These all explain that you may use the GPL in collective works because GPL section 0 is void.
Now that we know that GPL section 0 is void and we know that CDDL and GPL cannot appear simultaneously in a single work, are there other possible methods to combine CDDL and GPL?
Yes, this works because the
work GNU tar cannot be used alone. It needs at least
libc that is a different independent work. The GPL permits a
work under GPL to be combined with other
works that are under a different license if the other work is either typically part of the target platform distribution or if this other work is freely redistributable. Note that this is a statement that has been confirmed by many lawyers and the FSF that explicitly claims "You are allowed to use GNU tar together with a CDDL'd libc".
We now can make the next conclusion:
CDDL and GPL can appear together in a
collective work if the related single
works that are part of the collective work are independent from each other.
A typical method to combine CDDL and GPL is to let a GPL'd program use CDDLd libraries.
While all lawyers agree to permit a GPL'd program to use a CDDL'd library, there is a statement from Lawrence Rosen who claims that he believes that even a GPL'd library may be used by a non-GPL'd program (check his book, it is free).
From the CDDL announcement https://lwn.net/Articles/114840/ :
Like the MPL, the CDDL is not expected to be compatible with the GPL, since it contains requirements that are not in the GPL (for example, the "patent peace" provision in section 6). Thus, it is likely that files released under the CDDL will not be able to be combined with files released under the GPL to create a larger program.
the "patent peace" provision supposedly is a "further restruction" not permitted by the GPL:
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
So according to the creators of the CDDL, the two licenses most likely are incompatible. One license requires you to do A, and the other does not allow adding such requirements; therefore you cannot comply with both at the same time.
The CDDL has a similar requirement:
You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients' rights hereunder.
You may be able to find a term in the GPL license terms that "alters or restricts the recipients' rights" in a way that the CDDL does not, and then the two licenses are likely incompatible.
Licenses are usually only compatible if at least one is a very permissive license, and you are essentially only bound by the other license. E.g. GPL + Public Domain. Since public domain doesn't add restrictions, the combination is good as long as you obey the GPL terms (and the public domain terms).
I do not think it is possible to create copyleft licenses that are combinable without either A) one being a subset of the other, or B) one explicity having an exemption for the other (i.e. it must permit the additional requirements of the other license; or must allow switching to the other license). It is not possible to allow arbitrary restrictions to be added; the licenses need to be "sealed" (e.g. one could add the restriction 'source code must only be made available to Bill Gates').
I'd suspect they are really incompatible. For example, there is a lot of pressure on Linux (GPLv2) to include Sun's (now Oracle's) ZFS filesystem (CDDL license, from Solaris), as it is a more mature, tested alternative to the seemingly forever trapped in development Linux native BTRFS. There are several unofficial modules floating around, meaning the technical obstacles aren't insurmountable. And yet, even with massive legal talent on hand, they refuse on the ground the licenses are incompatible, as for example the official Ubuntu stance states. Wikipedia even claims the CDDL license was engineered to be GPL-incompatible.
Sure, a lawyer will always recommend to err in the side of caution, i.e., assume they are incompatible unless given explicit assurances they aren't. But it still makes a compelling case to me.
The reason given by Gnu.org in their Various Licenses and Comments about them document is
It has a weak per-file copyleft (like version 1 of the Mozilla Public License) which makes it incompatible with the GNU GPL. This means a module covered by the GPL and a module covered by the CDDL cannot legally be linked together. We urge you not to use the CDDL for this reason."
I am not a lawyer but I think that means that CDDL and GPL both require that any derivative work be distributed only under their license. It's impossible to do both, so the licenses are incompatible.
@schily and @apsilly nailed it. If I understand their answers correctly: