2

Thanks to How to retrieve the GCC version used to compile a given ELF executable? I can check the GCC compilation version for my newly built C++ library, which gives me the following information:

GCC: (Ubuntu/Linaro 4.4.7-1ubuntu2) 4.4.7
GCC: (Debian 4.4.5-8) 4.4.5

It seems that the C++ libraries contains different GCC compilation version. I know the reason, and it is because one library that is needed to create the final library comes from a third-party library, which is binary and no source codes are provided. So my question is: in this situation can I safely release the library? Or should I obtain the source codes of the third parties and build all the codes with one single GCC compiler? Thanks.

Community
  • 1
  • 1
feelfree
  • 11,175
  • 20
  • 96
  • 167

1 Answers1

2

If you have successfully made use of the library binary in compiling your code, there is no technical reason that you need the source to build it again. If the library isn't compatible with your current build environment, your code relying on the binary would not compile. (or should not compile without warning if proper soname/version checks are included)

That said, there is probably a reason that the library is a binary and not distributed with the source. This is where you need to check if there is a legal requirement associated with the use of the library binary that you need to comply with before you release your library. Note this is a legal issue, not a technical issue. Look for a Readme or License file that accompanies the binary and determine what if any license is associated with it. It may provide a link to it's specific end user license agreement (EULA) or it may direct you to a standard software licensing agreement (i.e. Creative-Commons, GPLv3, etc...)

If your project is a commercial project, it is worth getting compliance right before you release your library. (IP lawsuits are very expensive...)

David C. Rankin
  • 81,885
  • 6
  • 58
  • 85
  • 1
    "If the library isn't compatible with your current build environment, your code relying on the binary would not compile": that's not true: ABI incompatibilities (that aren't properly handled by e.g. symbol versioning) can lead to runtime crashes, which cannot be detected at compile/link time. – rubenvb Nov 19 '14 at 09:01
  • OK, if there is no soname/version checks, etc.., then you can end up with problems. That is a corner-case or a crappy lib case. I'll qualify it. – David C. Rankin Nov 19 '14 at 09:04