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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d481d546f914128d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit From: James Alan Farrell Newsgroups: comp.lang.ada Subject: Re: Strange error in mixed language program (incompatible libraries?) Date: Tue, 10 Aug 2004 17:36:33 -0400 Message-ID: <7hfih01clkshqbo2s03ffv1vp5ik0j1i00@4ax.com> References: X-Newsreader: Forte Free Agent 2.0/32.652 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: fw.grammatech.com X-Trace: newsfeed.slurp.net 1092173857 209.4.89.67 (10 Aug 2004 16:37:37 -0500) X-Original-NNTP-Posting-Host: 209.4.89.67 Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.esat.net!zen.net.uk!dedekind.zen.co.uk!usenet.ath.cx!209.242.86.15.MISMATCH!newsfeed.slurp.net!not-for-mail Xref: g2news1.google.com comp.lang.ada:2657 Date: 2004-08-10T17:36:33-04:00 List-Id: Just some further info: I tried have tried providing all the .o files from all the children of ada_interface to gnatbind. I am still getting the same error. I also attempted to turn the library into a shared dynamic library, and I am still getting the same error. Perhaps I was incorrect when I said that is working on another program - that other program does not link the same C files. Is there anything special I have to do to build the C files I link to the ada files? I compiled b~ada_interface with the -g option, then stepped through the program with gdb. I found the crash is occuring at if not E045 then => System.Exception_Table'Elab_Body; E045 := True; end if; We looked at what this is doing, and it appears that it registers the standard Ada errors, but we cannot be sure which particular error is doing it. However, at least to me this is not shedding any light. Why would this crash when C libraries are linked in, but not otherwise? thanks, James On Tue, 10 Aug 2004 11:31:31 -0400, James Alan Farrell wrote: >Thanx for the help. > >I am calling adainit. I was missing the call to adafinal (my bad) but >that did not solve the problem (did not expect it too - that comes at >the end of the program and should not effect the previous execution.) > >I have found the following in the make file (set up by someone else >before I joined the project): > >b~ada_interface.o: ada_interface.o > gnatbind -n ada_interface.ali > gnatmake -c b~ada_interface.adb > > >Ada_interface has a number of children >(ie, ada_interface-this.ad[bs] and ada_interface-that.ad[bs]) > >Do their .ali files need to be explicitly listed in the above bind >command? > >Also, just to make mention of it, another program creates a .so that >links to this library plus a different C library, and that seems to >work fine. > >James