[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian bug #673015 gprbuild: [hurd-i386] could not create $DIRECTORY//auto.cgpr



On Sat, 2012-05-26 at 07:56 -0400, Stephen Leake wrote:
> Ludovic Brenta <ludovic@ludovic-brenta.org> writes:
> 
> > Svante Signell wrote:
> >> Correction: It is gprconfig that segfaults:

> > So maybe the problem lies in the XML file.  I don't know which file
> > is being parsed, or which XML entity, but from gdb you should be able
> > to find out. 

The file being parsed is compilers.xml. Reducing that file to a minimum
see below, the problem now becomes an illegal instruction, not a
segfault, see the inlined backtrace.

# cat /usr/share/gprconfig/compilers.xml
<?xml version="1.0" ?>
<gprconfig>
  <!--  Languages that require no compiler, but can be selected through
        -config -->
  <compiler_description>
    <languages>Project File</languages>
  </compiler_description>

  <!--    GCC 3.x & 4.x -->
  <compiler_description>
    <name>GCC</name>
    <executable prefix="1">(.*(-wrs-|-elf-|-eabispe-|
avr-|-elinos-linux|-pc).*)?gcc-4.6</executable>
    <version>
      <external>${PREFIX}gcc-4.6 -dumpversion</external>
      <grep regexp=".+"></grep>
    </version>
    <languages>C</languages>
    <target>
      <external>${PREFIX}gcc-4.6 -dumpmachine</external>
      <grep regexp="[^\r\n]+"></grep>
    </target>
  </compiler_description>
</gprconfig>

gdb /usr/bin/gprconfig
(gdb) run -v -v
Starting program: /usr/bin/gprconfig -v -v
Parsing knowledge base at /usr/share/gprconfig
Parsing file /usr/share/gprconfig/c.xml
Parsing file /usr/share/gprconfig/compilers.xml
languages: constant := Project File
Parsing file /usr/share/gprconfig/cpp.xml
Parsing file /usr/share/gprconfig/cross.xml
Parsing file /usr/share/gprconfig/fortran.xml
Parsing file /usr/share/gprconfig/gnat.xml
Parsing file /usr/share/gprconfig/linker.xml
Parsing file /usr/share/gprconfig/nocompiler.xml
Parsing file /usr/share/gprconfig/targetset.xml
Parsing file /usr/share/gprconfig/asm.xml
Only compilers matching target i486-gnu will be preserved
create a new target set for i486-gnu
Will examine P /sbin
Will examine P /usr/sbin
Will examine P /usr/local/bin
Will examine P /usr/bin
Will examine P /bin
Will examine P /usr/local/games
Will examine P /usr/games
Foreach compiler in /sbin regexp=TRUE extra_dir=FALSE
Foreach compiler in /usr/sbin regexp=TRUE extra_dir=FALSE
Foreach compiler in /usr/local/bin regexp=TRUE extra_dir=FALSE
Foreach compiler in /usr/bin regexp=TRUE extra_dir=FALSE
  GCC is candidate: filename=gcc-4.6
[New Thread 23587.5]

Program received signal SIGILL, Illegal instruction.
0x015034a9 in __gnat_backtrace (array=0x15a2350, size=50,
exclude_min=0x1384df4, exclude_max=0x1387079, 
    skip_frames=<optimized out>) at tracebak.c:494
494           if (STOP_FRAME (current, top_stack) ||
(gdb) bt
#0  0x015034a9 in __gnat_backtrace (array=0x15a2350, size=50,
exclude_min=0x1384df4, exclude_max=0x1387079, 
    skip_frames=<optimized out>) at tracebak.c:494
#1  0x014f388e in system.traceback.call_chain (traceback=(const
system__address) 0x15a2350, max_len=50, 
    exclude_min=(const system__address) 0x1384df4, exclude_max=(const
system__address) 0x1387079, 
    skip_frames=3) at s-traceb.adb:86
#2  0x01384e61 in ada.exceptions.call_chain (excep=0x15a2274) at
a-excach.adb:65
#3  0x013845c1 in
ada.exceptions.exception_propagation.propagate_exception (e=0x159abbc, 
    from_signal_handler=false) at a-exexpr.adb:579
#4  0x013852f5 in <__gnat_raise_nodefer_with_msg> (e=0x159abbc) at
a-except.adb:859
#5  0x01385383 in <__gnat_raise_exception> (e=0x159abbc, message=...) at
a-except.adb:898
#6  0x0146b04f in gnat.expect.expect (descriptor=..., regexp=...,
matched=..., timeout=10000, 
    full_buffer=false) at g-expect.adb:359
#7  0x0146b0f6 in gnat.expect.expect (descriptor=..., regexp=...,
timeout=10000, full_buffer=false)
    at g-expect.adb:316
#8  0x0146b1aa in gnat.expect.expect (descriptor=..., regexp=...,
timeout=10000, full_buffer=false)
    at g-expect.adb:282
#9  0x0146ce8f in gnat.expect.get_command_output (command=...,
arguments=..., input=..., status=0x10241cc, 
    err_to_out=true, <statusL>=0) at g-expect.adb:915
#10 0x080c2515 in gprconfig.knowledge.get_external_value (attribute=...,
value=..., comp=..., 
    split_into_words=false, processed_value=...)

at /home/srs/DEBs/gnat-4.6/gprbuild/gprbuild-2011/src/gprconfig-knowledge.adb:1527
#11 0x080c40a1 in gprconfig.knowledge.foreach_language_runtime
(iterator=..., base=..., name=300000259, 
---Type <return> to continue, or q <return> to quit---
    executable=300000456, directory=..., prefix=300000000,
from_extra_dir=false, on_target=40, descr=..., 
    path_order=4)
at /home/srs/DEBs/gnat-4.6/gprbuild/gprbuild-2011/src/gprconfig-knowledge.adb:1812
#12 0x080c52cd in gprconfig.knowledge.foreach_compiler_in_dir
(iterator=..., base=..., directory=..., 
    from_extra_dir=false, on_target=40, path_order=4)

at /home/srs/DEBs/gnat-4.6/gprbuild/gprbuild-2011/src/gprconfig-knowledge.adb:2279
#13 0x080c670b in gprconfig.knowledge.foreach_compiler_in_path
(iterator=..., base=..., on_target=40, 
    extra_dirs=...)
at /home/srs/DEBs/gnat-4.6/gprbuild/gprbuild-2011/src/gprconfig-knowledge.adb:2492
#14 0x08082c63 in gprconfig.main ()

at /home/srs/DEBs/gnat-4.6/gprbuild/gprbuild-2011/src/gprconfig-main.adb:503


> Run 'gprconfig -v -v', that gives lots of detail on the parsing process.
> 
> Also run 'gprbuild -v'; that shows the exact gprconfig command that is
> being run.

I've tested some further and the problem is either in the Hurd port
interface or in the libxmlada library. There are test suites available
for xml, but they does not seem to be possible to be run from the
libxmlada-4.1 Debian Package. Any ideas?




Reply to: