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

Bug#967005: dh_ocaml: produces binaries with corrupt DWARF information (causes many FTBFS)



Package: dh-ocaml
Version: 1.1.1
Severity: serious
Tags: bullseye sid ftbfs
Usertags: ftbfs-20200802 ftbfs-bullseye
Control: affects -1 advi alt-ergo belenios biniou caml2html camlmix camomile cmdliner coccinelle cryptokit easy-format freetennis headache hevea kalzium lablgtk3 laby liquidsoap menhir ocaml-atd ocamlbuild ocaml-cairo2 ocaml-cry ocaml-csv ocaml-ctypes ocamldsort ocaml-dtools ocaml-dune ocaml-fmt ocaml-integers ocaml-mccs ocaml-mmap ocaml-qtest ocaml-re ocaml-res ocaml-sqlite3 ocaml-ssl ocaml-topkg ocp-indent ocplib-endian parmap pcre-ocaml postgresql-ocaml pplacer ppx-derivers react spamoracle supermin tyxml uuidm uutf why3 wyrd yojson

Hi,

During an archive rebuild in unstable/amd64, I ran into many similar
failures, affecting only ocaml packages (see the list in Affects). An
example is yojson:

> make[1]: Leaving directory '/tmp/yojson-1.7.0'
>    dh_dwz
> 	dwz -- debian/libyojson-ocaml-dev/usr/bin/ydump
> dwz: debian/libyojson-ocaml-dev/usr/bin/ydump: DWARF version 0 unhandled
> dh_dwz: error: dwz -- debian/libyojson-ocaml-dev/usr/bin/ydump returned exit code 1
> make: *** [debian/rules:19: binary] Error 1
> dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

I don't understand what happens here.

The produced binary seems to be a valid ELF binary:
> # file debian/libyojson-ocaml-dev/usr/bin/ydump
> debian/libyojson-ocaml-dev/usr/bin/ydump: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=eef3c12415e20f123d1c5432747bea6b33c015cd, for GNU/Linux 3.2.0, with debug_info, not stripped

But its debugging info seems to be corrupt, as also shown by dwarfdump:
> # dwarfdump debian/libyojson-ocaml-dev/usr/bin/ydump
> 
> .debug_info
> 
> dwarfdump ERROR:  Failure reading CU header or DIE, corrupt DWARF:  DW_DLE_VERSION_STAMP_ERROR (48). Attempting to continue.
> dwarfdump ERROR:  attempting to print .debug_info:  DW_DLE_VERSION_STAMP_ERROR (48) (48)
> attempting to continue.
> 
> .debug_str
> name at offset 0x00000000, length   11 is 'std_exit.ml'
> name at offset 0x0000000c, length    8 is './stdlib'
> name at offset 0x00000015, length   11 is 'GNU AS 2.35'
> name at offset 0x00000021, length   12 is 'bin/ydump.ml'
> [...]

Note: I filed this against dh-ocaml, but another package might be at
fault here.

Lucas


Reply to: