Ludovic Brenta wrote:
The problems are:
- You must pass -static to the *binder*, not the *linker*. As per the
GAT documentation, you do not need to pass libgnata or libgnarl.a
explicitly; the binder's job is to figure out these things for you.
Ahhhh.....*now* I understand.
This is what happens when you take someone (me) whose development
expertise is in the world of C and stick them in the world of Ada. :-)
It would probably be in our best interests to make the static switches
conditional, and put them into the source distribution's gps.gpr so that
anyone who wants to build a static version can do so trivially. The
same is true for debugging ("-g" and other relevant switches).
- Like I said, you should be linking statically with all Ada
libraries. Consequently, you should have removed the
*.Linker_Switches, since they're the ones bringing in the shared
libraries.
OK, that makes sense.
- libgps.a is not an Ada library, and it does not require any shared
library, so it is not the cause for your problem. Same with
libdb.a.
Oh, I was just referring to the dependency between libgps and python,
and showing why I had to include it in the linker switches. I think I
must have misunderstood something you had said earlier.
Here is a correct project file snippet:
package Binder is
for Default_Switches ("Ada") use ("-static");
end Binder;
package Linker is
for Default_Switches ("Ada") use
("/usr/lib/libgnatprj.a",
"/usr/lib/libgnatvsn.a",
"/usr/lib/libtemplates_parser.a",
"/usr/lib/libgtkada2.a",
"-lgtk-x11-2.0",
-- Some C libraries which we build from debian/rules:
"obj/libgps.a", "obj/libdb.a",
-- The python shared library from python-dev comes
-- last, because libgps.a needs it.
"-lpython2.4");
end Linker;
Excellent. This works for me as well.
Now the fun begins. :-)
I still think it would be useful to add a -dbg package for the libraries
we build. Turns out there's a very easy way to do that (such that you
don't even need to add /usr/lib/debug to LD_LIBRARY_PATH). I'll put the
details into the new bug I filed (#401385) and try building libgnat
using that method. If it works I'll post a patch to that bug.
--
Kevin Brown [EMAIL PROTECTED]
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]