On 12 Sep 2013, at 03:20, Stephen Leake <[email protected]> wrote:

> Georg Bauhaus <[email protected]> writes:
> 
>> (The only thing left, for full Mac support, is, I think, to select
>> the proper tools for making the dynamic library. (It is built as
>> a file ending with ".so"))
> 
> This _should_ be handled by declaring the library project properly; did
> you check that I have everything necessary according to the GNAT user
> guide?
> 
> On Windows, the library defaults to static (not sure why), but on linux,
> it is set by build/common.gpr to the LIBTYPE env var, which defaults to
> dynamic.
> 
> It may be that GNAT 2012 on OS X doesn't support dynamic libraries.

GNAT GPL 2013 certainly does, as does GCC 4.8.

The reason why the dynamic libraries build with ".so" in the name is in 
opentoken_lib.gpr:

  for Library_Version use "libopentoken.so." & Version;

On Darwin that should be

  for Library_Version use "libopentoken.dylib." & Version;

and it *may* be that AdaCore have a fix for this problem, but I can't see it in 
GPRBUILD GPL 2013. Perhaps there should be a bug report.


On Mac OS X it's important to build shared libraries with gprbuild, not 
gnatmake, because only gprbuild knows how to do it properly. Is there a reason 
you use gnatmake for this?


I see you use LIBTYPE with values "static", "dynamic". AdaCore's "standard" 
appears to be LIBRARY_TYPE with values "static", "relocatable".


If I make both static and dynamic libraries and install, I end up with only one 
set of .ali's. AdaCore tend to deal with this using

   for Library_Dir use "lib-" & Library_Type;         (or Libtype using your 
convention)


I think that opentoken_lib.gpr shouldn't specify -fPIC, because gprbuild knows 
when to do this (specifically, not when LIBTYPE is "static"!)


How do you pronounce "Stephe"? (off-topic, I know, but I like to hear the voice 
in my head …)


Thanks for all the great work …


--S






_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org

Reply via email to