Greetings, I would like to know if using the standard ada libraries that have LGPL or GPLV3 would make my entire code have to be open source.
Someone tell me if this is true
No.
GNAT’s library code comes with this exception:
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
Here’s the GCC Runtime Library Exception.
Yes.
The older GMGPL I am using is this:
-- This library is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU General Public License as --
-- published by the Free Software Foundation; either version 2 of --
-- the License, or (at your option) any later version. This library --
-- is distributed in the hope that it will be useful, but WITHOUT --
-- ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. You should have --
-- received a copy of the GNU General Public License along with --
-- this library; if not, write to the Free Software Foundation, --
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from --
-- this unit, or you link this unit with other files to produce an --
-- executable, this unit does not by itself cause the resulting --
-- executable to be covered by the GNU General Public License. This --
-- exception does not however invalidate any other reasons why the --
-- executable file might be covered by the GNU Public License. --
If you are using the FSF version of GNAT (no cost, Alire/GetAda gets it for you pretty easily) or GNAT PRO (costs $$$), then you are safe and your own code does not have to be GPL. If you are trying to use an old GNAT Community release then you have a problem (this is less common but I see people still trying to download it from the Adacore website).
Safe alternatives:
GetAda: https://www.getada.dev/
Alire: https://alire.ada.dev/
Your platform’s package manager (pacman, apt get, etc.)
NOTE: GetAda is a wrapper for more easily setting up alire. Think GetAda=Rustup and Alire=Cargo (not an exact match, but the general idea).
One reason for all my code to be covered by the GPL would be that I want to distribute the software.
and I imagine that if the code remains within the company then it should not release the code.
Obviously if you develop code on the company’s time your contract of employment will/should address the right you have in that code. You’d probably have little personal right, since you’re working for hire.
What you do on your own time should be a different question, but sometimes it isn’t. At one point my then employer wanted to say that they would have rights in any code I developed. AFAICR I crossed out & initialled those sections in the contract; never heard anything further.