I am in the midst of writing software using LGPL libraries, which will be part of an image for a device. Am I obliged to provide object files for different (micro)architectures than the device the software will be distributed with? Or is it enough to offer the object files compiled for the particular device the customer acquired?


Nothing in the GPL or LGPL, whether version 2 or 3, requires you to offer object files of any kind whatsoever. Instead, both versions of both licenses impose conditions on distributing object files, under the assumption that you already wanted to distribute object files in the first place.

When distributing object files, you are expected to provide the following:

  1. For each binary or object file, the corresponding source code.
  2. For the program as a whole, any other files or scripts which are required to compile, modify, and/or execute the program. As an exception, you (usually) don't need to provide the "major components" or system libraries for the underlying operating system or programming language (the actual language is rather more complex; consult the text of the license which applies to you for the full details).
  3. All of the above must be in "the preferred form of the work for making modifications to it." In other words, no obfuscated or minified code (unless you also supply the unobfuscated original), no generated code (unless you also supply whatever you used to generate it), and so on. Object code doesn't qualify as "preferred," unless your (the developer's) entire process for creating it consists of firing up a hex editor and doing everything by hand.
  4. Under the (L)GPL version 3, you must also provide anything that is required to run modified versions on a given piece of consumer hardware, but only when such hardware is sold or leased alongside the GPL'd software in the same transaction. You are not expected to port your software to every system that could conceivably run it. This is mostly intended to cover cases where a manufacturer creates nonstandard hardware and software and sells them as a unit (e.g. a gaming console, a smartphone, etc.); if the software is GPL'd, then that manufacturer is required to make it reasonably straightforward for its consumers to create and use modified software on that hardware.

The LGPL carves out some exceptions to requirement #1, allowing you to distribute object files which would (under the GPL) need to be accompanied with their source code, but it does not say that you must provide any additional object files which would otherwise not be present.* Version 3 of the GPL (and therefore the LGPL, which incorporates it by reference) does require you to provide "installation information" for user products when you distribute software and hardware simultaneously, but only with respect to the particular hardware that you distributed. So if your object files are somehow required for the hardware to function, and you sold or leased that hardware alongside the software, then you might need to provide those object files, or their source code if they do not fall under the LGPL's application exception. But that would be quite an unusual situation, because if those object files are required for the software to function, then you probably would have included them anyway (because you wanted the software to function, right?).

* Caveat: As pointed out in the comments, if you are statically linking everything, you may be required to provide object files to allow re-linking with a modified LGPL'd library. This is an unusual way of distributing software, but it could come up. Regardless, you still only need to provide object files that directly correspond to the contents of the statically linked binary, not random other object files for unrelated pieces of software.

  • This is proprietary software, linked to an LGPL library, so most definitely no source distribution here is intended. But you are right, with dynamic linking there is no need for object files. And yes, this is hardware with software sold as a unit, although it's not consumer. – Jan Dorniak Mar 10 at 23:30
  • @JanDorniak: If it's non-consumer then it might be totally exempt from the installation information requirements altogether. See GPL v3 section 6, where it lays out the definition of a "User Product." – Kevin Mar 10 at 23:33
  • 2
    Actually in some cases (which do not apply to most people) LGPL does require you to distribute object files. That is if you statically link an LGPL library with a proprietary program. In this case, you must provide the object files for the proprietary program so it can be re-linked. – user253751 Mar 11 at 13:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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