public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [ada] help debugging acats failure
       [not found] <4A9F1A8D.5080501@redhat.com>
@ 2009-09-03 23:00 ` Richard Henderson
  2009-09-04  1:34   ` Dave Korn
                     ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Richard Henderson @ 2009-09-03 23:00 UTC (permalink / raw)
  To: GCC

Can someone tell me how to debug this:

> splitting /home/rth/work/gcc/bld-sjlj/gcc/testsuite/ada/acats0/tests/c3/c35502i.ada into:
>    c35502i.adb
> BUILD c35502i.adb
> gnatmake --GCC="/home/rth/work/gcc/bld-sjlj/gcc/xgcc -B/home/rth/work/gcc/bld-sjlj/gcc/" -gnatws -O2 -I/home/rth/work/gcc/bld-sjlj/gcc/testsuite/ada/acats0/support c35502i.adb -largs --GCC="/home/rth/work/gcc/bld-sjlj/gcc/xgcc -B/home/rth/work/gcc/bld-sjlj/gcc/"
> /home/rth/work/gcc/bld-sjlj/gcc/xgcc -c -B/home/rth/work/gcc/bld-sjlj/gcc/ -gnatws -O2 -I/home/rth/work/gcc/bld-sjlj/gcc/testsuite/ada/acats0/support c35502i.adb
> gnatbind -I/home/rth/work/gcc/bld-sjlj/gcc/testsuite/ada/acats0/support -x c35502i.ali
> gnatlink c35502i.ali --GCC=/home/rth/work/gcc/bld-sjlj/gcc/xgcc -B/home/rth/work/gcc/bld-sjlj/gcc/
> ./c35502i.o: In function `_ada_c35502i':
> c35502i.adb:(.text+0x156): undefined reference to `.L47'
> collect2: ld returned 1 exit status
> gnatlink: error when calling /home/rth/work/gcc/bld-sjlj/gcc/xgcc
> gnatmake: *** link failed.
> FAIL:   c35502i

I haven't been able to figure out what command to issue from the command 
line to reproduce this.  Cut and paste from the dejagnu log doesn't 
work, which is more than annoying...


r~

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ada] help debugging acats failure
  2009-09-03 23:00 ` [ada] help debugging acats failure Richard Henderson
@ 2009-09-04  1:34   ` Dave Korn
  2009-09-04  2:24   ` Geert Bosch
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Dave Korn @ 2009-09-04  1:34 UTC (permalink / raw)
  To: Richard Henderson; +Cc: GCC

Richard Henderson wrote:
> Can someone tell me how to debug this:
> 
>> splitting
>> /home/rth/work/gcc/bld-sjlj/gcc/testsuite/ada/acats0/tests/c3/c35502i.ada
>> into:
>>    c35502i.adb
>> BUILD c35502i.adb
>> gnatmake --GCC="/home/rth/work/gcc/bld-sjlj/gcc/xgcc
>> -B/home/rth/work/gcc/bld-sjlj/gcc/" -gnatws -O2
>> -I/home/rth/work/gcc/bld-sjlj/gcc/testsuite/ada/acats0/support
>> c35502i.adb -largs --GCC="/home/rth/work/gcc/bld-sjlj/gcc/xgcc
>> -B/home/rth/work/gcc/bld-sjlj/gcc/"
>> /home/rth/work/gcc/bld-sjlj/gcc/xgcc -c
>> -B/home/rth/work/gcc/bld-sjlj/gcc/ -gnatws -O2
>> -I/home/rth/work/gcc/bld-sjlj/gcc/testsuite/ada/acats0/support
>> c35502i.adb
>> gnatbind
>> -I/home/rth/work/gcc/bld-sjlj/gcc/testsuite/ada/acats0/support -x
>> c35502i.ali
>> gnatlink c35502i.ali --GCC=/home/rth/work/gcc/bld-sjlj/gcc/xgcc
>> -B/home/rth/work/gcc/bld-sjlj/gcc/
>> ./c35502i.o: In function `_ada_c35502i':
>> c35502i.adb:(.text+0x156): undefined reference to `.L47'
>> collect2: ld returned 1 exit status
>> gnatlink: error when calling /home/rth/work/gcc/bld-sjlj/gcc/xgcc
>> gnatmake: *** link failed.
>> FAIL:   c35502i
> 
> I haven't been able to figure out what command to issue from the command
> line to reproduce this.  Cut and paste from the dejagnu log doesn't
> work, which is more than annoying...

  If you hack the last line ("exec $testdir/run_all.sh ....") off of a copy of
gcc/testsuite/ada/acats/run_acats, you could probably source it into a shell
to get all the variables set right.  You might also want to hack run_all.sh
(or a copy thereof) to add some "--save-temps" flags in strategic locations.

    cheers,
      DaveK


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ada] help debugging acats failure
  2009-09-03 23:00 ` [ada] help debugging acats failure Richard Henderson
  2009-09-04  1:34   ` Dave Korn
@ 2009-09-04  2:24   ` Geert Bosch
  2009-09-04  6:44   ` Arnaud Charlet
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Geert Bosch @ 2009-09-04  2:24 UTC (permalink / raw)
  To: Richard Henderson; +Cc: GCC

If you pass -v to gnatmake, it will output the gcc invocations.
This should be sufficient to find the problem.

Basically, just go to the directory containing c35502i.adb, and
execute the gnatmake command as listed below, with -v added in.
If you only have the 35502i.ada file available, use "gnatchop  
35502i.ada"
to get the various units split out in their own files.
You might need to specifically include the "support" directory,
which appears to be /home/rth/work/gcc/bld-sjlj/gcc/testsuite/ada/acats0
from your report.

Hope this helps.

   -Geert

On Sep 3, 2009, at 19:00, Richard Henderson wrote:

> Can someone tell me how to debug this:
>
>> splitting /home/rth/work/gcc/bld-sjlj/gcc/testsuite/ada/acats0/ 
>> tests/c3/c35502i.ada into:
>>   c35502i.adb
>> BUILD c35502i.adb
>> gnatmake --GCC="/home/rth/work/gcc/bld-sjlj/gcc/xgcc -B/home/rth/ 
>> work/gcc/bld-sjlj/gcc/" -gnatws -O2 -I/home/rth/work/gcc/bld-sjlj/ 
>> gcc/testsuite/ada/acats0/support c35502i.adb -largs --GCC="/home/ 
>> rth/work/gcc/bld-sjlj/gcc/xgcc -B/home/rth/work/gcc/bld-sjlj/gcc/"
>> /home/rth/work/gcc/bld-sjlj/gcc/xgcc -c -B/home/rth/work/gcc/bld- 
>> sjlj/gcc/ -gnatws -O2 -I/home/rth/work/gcc/bld-sjlj/gcc/testsuite/ 
>> ada/acats0/support c35502i.adb
>> gnatbind -I/home/rth/work/gcc/bld-sjlj/gcc/testsuite/ada/acats0/ 
>> support -x c35502i.ali
>> gnatlink c35502i.ali --GCC=/home/rth/work/gcc/bld-sjlj/gcc/xgcc -B/ 
>> home/rth/work/gcc/bld-sjlj/gcc/
>> ./c35502i.o: In function `_ada_c35502i':
>> c35502i.adb:(.text+0x156): undefined reference to `.L47'
>> collect2: ld returned 1 exit status
>> gnatlink: error when calling /home/rth/work/gcc/bld-sjlj/gcc/xgcc
>> gnatmake: *** link failed.
>> FAIL:   c35502i
>
> I haven't been able to figure out what command to issue from the  
> command line to reproduce this.  Cut and paste from the dejagnu log  
> doesn't work, which is more than annoying...
>
>
> r~

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ada] help debugging acats failure
  2009-09-03 23:00 ` [ada] help debugging acats failure Richard Henderson
  2009-09-04  1:34   ` Dave Korn
  2009-09-04  2:24   ` Geert Bosch
@ 2009-09-04  6:44   ` Arnaud Charlet
  2009-09-04  9:47   ` Richard Guenther
  2009-09-04  9:51   ` Eric Botcazou
  4 siblings, 0 replies; 8+ messages in thread
From: Arnaud Charlet @ 2009-09-04  6:44 UTC (permalink / raw)
  To: Richard Henderson; +Cc: GCC

>> ./c35502i.o: In function `_ada_c35502i':
>> c35502i.adb:(.text+0x156): undefined reference to `.L47'
>> collect2: ld returned 1 exit status
>> gnatlink: error when calling /home/rth/work/gcc/bld-sjlj/gcc/xgcc
>> gnatmake: *** link failed.
>> FAIL:   c35502i
> 
> I haven't been able to figure out what command to issue from the command 
> line to reproduce this.  Cut and paste from the dejagnu log doesn't work, 
> which is more than annoying...

After a make install, you can use something like

cd /home/rth/work/gcc/bld-sjlj/gcc/testsuite/tests/c3
gnatmake c35502i.adb -I/home/rth/work/gcc/bld-sjlj/gcc/testsuite/ada/acats0/support

The command line used by the test suite is very complex and requires
env vars just because it needs to use the uninstalled compiler.

Once your compiler is installed, using it is a simple matter of doing
gnatmake with appropriate -I switches if needed.

Arno

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ada] help debugging acats failure
  2009-09-03 23:00 ` [ada] help debugging acats failure Richard Henderson
                     ` (2 preceding siblings ...)
  2009-09-04  6:44   ` Arnaud Charlet
@ 2009-09-04  9:47   ` Richard Guenther
  2009-09-07  1:15     ` Dave Korn
  2009-09-04  9:51   ` Eric Botcazou
  4 siblings, 1 reply; 8+ messages in thread
From: Richard Guenther @ 2009-09-04  9:47 UTC (permalink / raw)
  To: Richard Henderson; +Cc: GCC

On Fri, Sep 4, 2009 at 1:00 AM, Richard Henderson<rth@redhat.com> wrote:
> Can someone tell me how to debug this:
>
>> splitting
>> /home/rth/work/gcc/bld-sjlj/gcc/testsuite/ada/acats0/tests/c3/c35502i.ada
>> into:
>>   c35502i.adb
>> BUILD c35502i.adb
>> gnatmake --GCC="/home/rth/work/gcc/bld-sjlj/gcc/xgcc
>> -B/home/rth/work/gcc/bld-sjlj/gcc/" -gnatws -O2
>> -I/home/rth/work/gcc/bld-sjlj/gcc/testsuite/ada/acats0/support c35502i.adb
>> -largs --GCC="/home/rth/work/gcc/bld-sjlj/gcc/xgcc
>> -B/home/rth/work/gcc/bld-sjlj/gcc/"
>> /home/rth/work/gcc/bld-sjlj/gcc/xgcc -c -B/home/rth/work/gcc/bld-sjlj/gcc/
>> -gnatws -O2 -I/home/rth/work/gcc/bld-sjlj/gcc/testsuite/ada/acats0/support
>> c35502i.adb
>> gnatbind -I/home/rth/work/gcc/bld-sjlj/gcc/testsuite/ada/acats0/support -x
>> c35502i.ali
>> gnatlink c35502i.ali --GCC=/home/rth/work/gcc/bld-sjlj/gcc/xgcc
>> -B/home/rth/work/gcc/bld-sjlj/gcc/
>> ./c35502i.o: In function `_ada_c35502i':
>> c35502i.adb:(.text+0x156): undefined reference to `.L47'
>> collect2: ld returned 1 exit status
>> gnatlink: error when calling /home/rth/work/gcc/bld-sjlj/gcc/xgcc
>> gnatmake: *** link failed.
>> FAIL:   c35502i
>
> I haven't been able to figure out what command to issue from the command
> line to reproduce this.  Cut and paste from the dejagnu log doesn't work,
> which is more than annoying...

Same for libjava ...

What works for me is in the appropriate directory where the test.adb resides
use the xgcc command line and add -I/home/..../gcc/ada/rts

Richard.

>
> r~
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ada] help debugging acats failure
  2009-09-03 23:00 ` [ada] help debugging acats failure Richard Henderson
                     ` (3 preceding siblings ...)
  2009-09-04  9:47   ` Richard Guenther
@ 2009-09-04  9:51   ` Eric Botcazou
  2009-09-05 16:11     ` Richard Henderson
  4 siblings, 1 reply; 8+ messages in thread
From: Eric Botcazou @ 2009-09-04  9:51 UTC (permalink / raw)
  To: Richard Henderson; +Cc: gcc

> I haven't been able to figure out what command to issue from the command
> line to reproduce this.  Cut and paste from the dejagnu log doesn't
> work, which is more than annoying...

There is a blurb about this on http://gcc.gnu.org/wiki/DebuggingGCC

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ada] help debugging acats failure
  2009-09-04  9:51   ` Eric Botcazou
@ 2009-09-05 16:11     ` Richard Henderson
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2009-09-05 16:11 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: gcc

On 09/04/2009 02:51 AM, Eric Botcazou wrote:
>> I haven't been able to figure out what command to issue from the command
>> line to reproduce this.  Cut and paste from the dejagnu log doesn't
>> work, which is more than annoying...
>
> There is a blurb about this on http://gcc.gnu.org/wiki/DebuggingGCC

Thanks.  I probably should have thought to look on our wiki...


r~

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ada] help debugging acats failure
  2009-09-04  9:47   ` Richard Guenther
@ 2009-09-07  1:15     ` Dave Korn
  0 siblings, 0 replies; 8+ messages in thread
From: Dave Korn @ 2009-09-07  1:15 UTC (permalink / raw)
  To: Richard Guenther; +Cc: Richard Henderson, GCC

Richard Guenther wrote:
> On Fri, Sep 4, 2009 at 1:00 AM, Richard Henderson<rth@redhat.com> wrote:
>> Can someone tell me how to debug this:
>>
>>> splitting
>>> /home/rth/work/gcc/bld-sjlj/gcc/testsuite/ada/acats0/tests/c3/c35502i.ada

>>> FAIL:   c35502i
>> I haven't been able to figure out what command to issue from the command
>> line to reproduce this.  Cut and paste from the dejagnu log doesn't work,
>> which is more than annoying...
> 
> Same for libjava ...

  To debug libjava tests, run the testsuite with about half-a-dozen -v
switches in your RUNTESTFLAGS and look through the output for lines that look
like:

> board is unix, not remote
> set_ld_library_path_env_vars: ld_library_path=.:/gnu/gcc/releases/4.3.4-1/gcc4-4.3.4-1/build/i686-pc-cygwin/./libjava/.libs
> LD_LIBRARY_PATH = .:/gnu/gcc/releases/4.3.4-1/gcc4-4.3.4-1/build/i686-pc-cygwin/./libjava/.libs:/gnu/gcc/releases/4.3.4-1/gcc4-4.3.4-1/build/i686-pc-cygwin/libstdc++-v3/.libs:/gnu/gcc/releases/4.3.4-1/gcc4-4.3.4-1/build/i686-pc-cygwin/libssp/.libs:/gnu/gcc/releases/4.3.4-1/gcc4-4.3.4-1/build/i686-pc-cygwin/libgomp/.libs:/gnu/gcc/releases/4.3.4-1/gcc4-4.3.4-1/build/./gcc:/gnu/gcc/releases/4.3.4-1/gcc4-4.3.4-1/build/./prev-gcc:.:/gnu/gcc/releases/4.3.4-1/gcc4-4.3.4-1/build/i686-pc-cygwin/./libjava/.libs:/gnu/gcc/releases/4.3.4-1/gcc4-4.3.4-1/build/i686-pc-cygwin/libstdc++-v3/.libs:/gnu/gcc/releases/4.3.4-1/gcc4-4.3.4-1/build/i686-pc-cygwin/libssp/.libs:/gnu/gcc/releases/4.3.4-1/gcc4-4.3.4-1/build/i686-pc-cygwin/libgomp/.libs:/gnu/gcc/releases/4.3.4-1/gcc4-4.3.4-1/build/./gcc:/gnu/gcc/releases/4.3.4-1/gcc4-4.3.4-1/build/./prev-gcc
> CLASSPATH is .:/gnu/gcc/releases/4.3.4-1/gcc4-4.3.4-1/src/gcc-4.3.4/libjava/testsuite/libjava.lang:/gnu/gcc/releases/4.3.4-1/gcc4-4.3.4-1/build/i686-pc-cygwin/libjava/testsuite:/gnu/gcc/releases/4.3.4-1/gcc4-4.3.4-1/build/i686-pc-cygwin/libjava/testsuite/../libgcj-4.3.4.jar
> board_info target needs_status_wrapper 

  Copy-paste those assignments to LD_LIBRARY_PATH and CLASSPATH into your
shell, export them both, and you can then cut and paste build commands from
the log and they'll work.

  (Although note that I always install the compiler to a DESTDIR and put the
.../bin dir at the very front of my PATH, and that may be a necessary step, I
haven't tried it without yet.  I do this to make completely sure that the
windows DLL search path algorithms pick up the newly-built DLLs; it might be
superfluous on other platforms.)

    cheers,
      DaveK

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-09-07  1:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4A9F1A8D.5080501@redhat.com>
2009-09-03 23:00 ` [ada] help debugging acats failure Richard Henderson
2009-09-04  1:34   ` Dave Korn
2009-09-04  2:24   ` Geert Bosch
2009-09-04  6:44   ` Arnaud Charlet
2009-09-04  9:47   ` Richard Guenther
2009-09-07  1:15     ` Dave Korn
2009-09-04  9:51   ` Eric Botcazou
2009-09-05 16:11     ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).