From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Licensing Paranoia and Manual Compilation Issues Date: Tue, 11 Dec 2018 23:45:48 +0000 Organization: A noiseless patient Spider Message-ID: References: <6bee0ed3-c298-45c9-81b0-92cc90a1f2c6@googlegroups.com> <4fc537e9-e6f2-4fce-a7be-b5230c7f2d83@googlegroups.com> <96f1ef1d-9cc6-4b11-af0c-9eeda2120d95@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: reader01.eternal-september.org; posting-host="05eaa079e1c1143611911238b80974ac"; logging-data="30304"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+rVholxoLR7I5bbh7Tu0Qn5X7FM2/Bazc=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (darwin) Cancel-Lock: sha1:+zYN9dHdKleTEGuN6QLE9O+mXVM= sha1:aqu3mhrprCNygmq1CFycC9di3xo= Xref: reader01.eternal-september.org comp.lang.ada:55021 Date: 2018-12-11T23:45:48+00:00 List-Id: alexander@junivörs.com writes: > I wrote: >> Building a dynamic library (do you mean .so? are you on a Mac or >> Linux? You mention my darwin 8.1.0 release) is more so. > > Yes. According to (this page)[1] it's accomplishable using the > following command: > > $ gcc -shared -o libmy_lib.so *.o > > but that causes an error mentioning how there are "Undefined symbols > for architecture x86_64:". > [1] http://beru.univ-brest.fr/~singhoff/DOC/LANG/ADA/gnat_ugn_20.html Because that page (and even the latest one at [2]) is wrong. Almost all Ada code requires the services of the Ada runtime, and you need to reference the runtime at the link stage. $ gcc -shared -o libmy_lib.dylib *.o -L -lgnat -lgnarl (: e.g. /opt/gcc-8.1.0/lib/gcc/x86_64-apple-darwin15/8.1.0/adalib) This is why it is *so* much easier to use gprbuild (I see that that reference talks about using gnatmake; that's because gnatmake is part of GCC Ada, and gprbuild isn't. But modern gnatmakes will delegate to gprbuild if they find one, at any rate if libraries are involved; they can't generate libraries, because it's too complicated for Adacore to maintain in two places, the GCC tree and the gprbuild tree). If you want to see what's going on you can use -v. [2] http://docs.adacore.com/gnat_ugn-docs/html/gnat_ugn/gnat_ugn/the_gnat_compilation_model.html#general-ada-libraries > Someone else wrote: >> For licensing in arbitrary ways, the aforementioned Ada distribution >> is not the suitable one. Another compiler distribution might meet >> your needs, including some FSF GNAT. GPL means tit-for-tat and thus >> intentionally puts restrictions on licensing, no back doors. > > GPL on its own, I must say, does serve a purpose. It's nice for the > author to be able to share their source or works and still be certain > nobody can (legally anyway) steal their work and distribute it for a > fee themselves. > > When it comes to source code licensed under GPL lacking the runtime > library exception, on the other hand, I can't say I'm too fond of > it. Compilers on their own, featuring a standard library, should > always be free to use; whereupon the user may licence their executable > in any way they want. I don't understand. The first para says it's good, the second says it's bad.