[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ada shared libs issue.
From: |
Pascal |
Subject: |
Re: Ada shared libs issue. |
Date: |
Sun, 5 Jul 2020 11:07:49 +0200 |
> Le 5 juil. 2020 à 02:34, Thomas Dickey <dickey@his.com> a écrit :
>
> On Sat, Jul 04, 2020 at 03:16:00PM -0400, Thomas Dickey wrote:
>> On Sat, Jul 04, 2020 at 07:04:18PM +0200, Pascal wrote:
>>> Hello,
>>>
>>> My configuration: GNAT Community 2020 on macOS Catalina.
>>>
>>> I've an error with shared lib:
>>> % ./configure CC='gcc -g -O0' --enable-pc-files --with-ada-sharedlib
>>> --enable-symlinks --prefix=$instxada
>
> I think your problem is that you left out "--with-shared", as noted in INSTALL
>
> --with-ada-sharedlib
> Build a shared library for Ada95 binding, if the compiler permits.
>
> NOTE: You must also set the --with-shared option on some platforms
> for a successful build. You need not use this option when you set
> --with-shared, unless you want to use the Ada shared library.
Thanks Thomas for you quick answer,
I did use "--with-shared" but as nothing happened I replaced it by
"--with-ada-sharedlib".
With both of them the issue is still present.
Well, I remember an old GNAT issue with dynamic linking
(https://github.com/AdaCore/gprbuild/issues/69), thus the following command
does the job:
% LIBRARY_PATH=../../lib gnatmake -Padacurses.gpr -XBUILD_DIR=`cd ..;pwd`
-XSOURCE_DIR=`cd ..;pwd` -XSOURCE_DIR2=`cd .;pwd` -XLIB_NAME=adacurses
-XSONAME=libadacurses.so.1 -XLIB_KIND=dynamic -largs -lform -lmenu -lpanel
-lncurses
Build Libraries
[gprlib] adacurses.lexch
[link library] libadacurses.dylib
I made the following changes:
diff --git a/Ada95/src/Makefile.in b/Ada95/src/Makefile.in
index db7100de..fee36483 100644
--- a/Ada95/src/Makefile.in
--- a/Ada95/src/Makefile.in
+++ b/Ada95/src/Makefile.in
@@ -362,7 +362,7 @@ SHARED_DIRS = \
@MAKE_ADA_SHAREDLIB@ $(SHELL) $(srcdir)/library-cfg.sh dynamic library.gpr
$(CFLAGS_SHARED) >$(GNAT_PROJECT)
@MAKE_ADA_SHAREDLIB@ @echo "Making Ada shared-lib:"
@MAKE_ADA_SHAREDLIB@ @-$(SHELL) -c "diff -c library.gpr $(GNAT_PROJECT);
exit 0"
-@MAKE_ADA_SHAREDLIB@ $(ADAMAKE) $(ADAMAKEFLAGS) -XLIB_KIND=dynamic
+@MAKE_ADA_SHAREDLIB@ LIBRARY_PATH=../../lib $(ADAMAKE) $(ADAMAKEFLAGS)
-XLIB_KIND=dynamic -largs -lform -lmenu -lpanel -lncurses
@MAKE_ADA_SHAREDLIB@ -rm -f $(GNAT_PROJECT)
install \
By he way, I was wondering why there are these warnings:
/bin/sh ./library-cfg.sh dynamic library.gpr -I. -I../include -I../../include
-I/opt/xnadalib-2020/include -I. -I../include -D_DARWIN_C_SOURCE -DNDEBUG
-DHAVE_CONFIG_H -I. -O2 -g -O0 --param max-inline-insns-single=1200 -dynamic
>AdaCurses.gpr
library-cfg.sh: ignored option --param
library-cfg.sh: ignored option max-inline-insns-single=1200
library-cfg.sh: ignored option -dynamic
Regards, Pascal.
https://blady.pagesperso-orange.fr