comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Licensing Paranoia and Manual Compilation Issues
Date: Tue, 11 Dec 2018 23:45:48 +0000
Date: 2018-12-11T23:45:48+00:00	[thread overview]
Message-ID: <lyk1kflj9v.fsf@pushface.org> (raw)
In-Reply-To: 96f1ef1d-9cc6-4b11-af0c-9eeda2120d95@googlegroups.com

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<whereever> -lgnat -lgnarl

(<whereever>: 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.

  reply	other threads:[~2018-12-11 23:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11 11:46 Licensing Paranoia and Manual Compilation Issues alexander
2018-12-11 16:11 ` Simon Wright
2018-12-11 16:31   ` Lucretia
2018-12-11 19:21     ` Simon Wright
2018-12-11 20:50       ` alexander
2018-12-11 23:45         ` Simon Wright [this message]
2018-12-12  9:34           ` alexander
2018-12-12 17:44             ` Simon Wright
2018-12-13  9:21             ` Björn Lundin
2018-12-13 10:30               ` alexander
2018-12-13 10:32                 ` alexander
2018-12-11 18:50 ` G. B.
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox