5

I'm planning to use PCRE2 in my program, which is written in C (Licensed under GPLv3). PCRE2 is licensed under BSD license, with a few changes. Go to this page to see the license: https://github.com/PCRE2Project/pcre2/blob/master/LICENCE

At the bottom of the license, I see this:

EXEMPTION FOR BINARY LIBRARY-LIKE PACKAGES

The second condition in the BSD licence (covering binary redistributions) does not apply all the way down a chain of software. If binary package A includes PCRE2, it must respect the condition, but if package B is software that includes package A, the condition is not imposed on package B unless it uses PCRE2 independently.

Condition 2 is the following:

  • Redistributions in binary form must reproduce the above copyright notices, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Now, it says that I will have to attribute if I "include" the PCRE2 library. What if I link (use) the shared library of PCRE2 in my program? Technically, no code of PCRE2 is "included" in my program, the shared library contains their code, which is separate.

Do I still need to attribute them if I do this?

1 Answer 1

8

You need to honour the licence obligations on the PCRE2 library if your program is, in copyright terms, a derivative work of that library. I note the exception that you have provided, but as I read it, it's designed to except (for example) the users of libraries which in turn use PCRE2. Your work is directly linking to PCRE2, so the exception doesn't, to my mind, apply.

So we turn our attention to the status of "derivative work", and whether your program acquires it by virtue of linking to the PCRE2 library. Sadly, this isn't a settled question. We have a couple of good summaries, one of why your work is a derivative, and one of why it isn't, and we can't give you a definitive answer either way.

Me, I tend to favour the FSF's view that dynamic linking makes a derivative. I also note that the obligations of the BSD licence are so slight that you might as well honour them anyway: it's small loss if it later turns out it wasn't really necessary, and a big win in avoiding copyright infringement if it turns out it was.

2
  • Boo. I was just writing a worse version of this answer so now I'm going to have to abandon my draft :p Commented Mar 25, 2023 at 8:36
  • 1
    @PhilipKendall <large but slightly apologetic grin>
    – MadHatter
    Commented Mar 25, 2023 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.