Bug#783919: news on ocaml-llvm bindings ?

Gianfranco Costamagna locutusofborg at debian.org
Mon Mar 7 08:48:58 UTC 2016


Hi, after checking all the weekend, I got ocaml bindings to build, but the testsuite is failing
(talking about llvm-toolchain-3.7)

the debdiff is trivial, and based on what is written on this bug report.
+               --with-ocaml-libdir=/usr/lib/ocaml/llvm-$(LLVM_VERSION) \
-               --disable-bindings \

added
ocaml-findlib, libctypes-ocaml-dev, libounit-ocaml-dev,
to build-dependencies (not sure if they are all needed, but seems so)

and the failure is following:
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   debian/rules override_dh_auto_test
make[1]: Entering directory '/<<PKGBUILDDIR>>'
NJOBS="" LD_LIBRARY_PATH=/<<PKGBUILDDIR>>/build-llvm/Release/lib/ /usr/bin/make -C build-llvm check
make[2]: Entering directory '/<<PKGBUILDDIR>>/build-llvm'
llvm[2]: Running test suite
make[3]: Entering directory '/<<PKGBUILDDIR>>/build-llvm/test'
Making LLVM 'lit.site.cfg' file...
Making LLVM unittest 'lit.site.cfg' file...
( ulimit -t 1200 ; ulimit -d 512000 ; ulimit -m 512000 ; ulimit -s 8192 ; \
  /usr/bin/python /<<PKGBUILDDIR>>/utils/lit/lit.py -s -v . )
lit.py: lit.cfg:279: note: Did not find llvm-go in /<<PKGBUILDDIR>>/build-llvm/Release/bin
GNU ld (GNU Binutils for Debian) 2.26
-- Testing: 14188 tests, 8 threads --
Testing: 0 
FAIL: LLVM :: Bindings/OCaml/ext_exc.ml (673 of 14188)
******************** TEST 'LLVM :: Bindings/OCaml/ext_exc.ml' FAILED ********************
Script:
--
cp /<<PKGBUILDDIR>>/test/Bindings/OCaml/ext_exc.ml /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/ext_exc.ml
/usr/bin/ocamlfind ocamlc -cclib -L/<<PKGBUILDDIR>>/build-llvm/Release/lib -cclib -Wl,-z,relro -cclib -Wl,-z,relro -cclib -Wl,-z,relro -g -warn-error A -package llvm.bitreader -linkpkg /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/ext_exc.ml -o /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/ext_exc.ml.tmp
/<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/ext_exc.ml.tmp
/usr/bin/ocamlfind ocamlopt -cclib -L/<<PKGBUILDDIR>>/build-llvm/Release/lib -cclib -Wl,-rpath,/<<PKGBUILDDIR>>/build-llvm/Release/lib -cclib -Wl,-z,relro -cclib -Wl,-z,relro -cclib -Wl,-z,relro -g -warn-error A -package llvm.bitreader -linkpkg /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/ext_exc.ml -o /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/ext_exc.ml.tmp
/<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/ext_exc.ml.tmp
--
Exit Code: 1

Command Output (stderr):
--
error: Invalid bitcode signature

--

********************
Testing: 0 
FAIL: LLVM :: Bindings/OCaml/bitreader.ml (674 of 14188)
******************** TEST 'LLVM :: Bindings/OCaml/bitreader.ml' FAILED ********************
Script:
--
cp /<<PKGBUILDDIR>>/test/Bindings/OCaml/bitreader.ml /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/bitreader.ml
/usr/bin/ocamlfind ocamlc -cclib -L/<<PKGBUILDDIR>>/build-llvm/Release/lib -cclib -Wl,-z,relro -cclib -Wl,-z,relro -cclib -Wl,-z,relro -g -warn-error A -package llvm.bitreader -package llvm.bitwriter -linkpkg /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/bitreader.ml -o /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/bitreader.ml.tmp
/<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/bitreader.ml.tmp /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/bitreader.ml.tmp.bc
/usr/bin/ocamlfind ocamlopt -cclib -L/<<PKGBUILDDIR>>/build-llvm/Release/lib -cclib -Wl,-rpath,/<<PKGBUILDDIR>>/build-llvm/Release/lib -cclib -Wl,-z,relro -cclib -Wl,-z,relro -cclib -Wl,-z,relro -g -warn-error A -package llvm.bitreader -package llvm.bitwriter -linkpkg /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/bitreader.ml -o /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/bitreader.ml.tmp
/<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/bitreader.ml.tmp /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/bitreader.ml.tmp.bc
/<<PKGBUILDDIR>>/build-llvm/Release/bin/llvm-dis < /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/bitreader.ml.tmp.bc
--
Exit Code: 1

Command Output (stderr):
--
error: Invalid bitcode signature

--

********************
Testing: 0 
FAIL: LLVM :: Bindings/OCaml/core.ml (675 of 14188)
******************** TEST 'LLVM :: Bindings/OCaml/core.ml' FAILED ********************
Script:
--
cp /<<PKGBUILDDIR>>/test/Bindings/OCaml/core.ml /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/core.ml
/usr/bin/ocamlfind ocamlc -cclib -L/<<PKGBUILDDIR>>/build-llvm/Release/lib -cclib -Wl,-z,relro -cclib -Wl,-z,relro -cclib -Wl,-z,relro -g -warn-error A -package llvm.analysis -package llvm.bitwriter -linkpkg /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/core.ml -o /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/core.ml.tmp
/<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/core.ml.tmp /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/core.ml.tmp.bc
/usr/bin/ocamlfind ocamlopt -cclib -L/<<PKGBUILDDIR>>/build-llvm/Release/lib -cclib -Wl,-rpath,/<<PKGBUILDDIR>>/build-llvm/Release/lib -cclib -Wl,-z,relro -cclib -Wl,-z,relro -cclib -Wl,-z,relro -g -warn-error A -package llvm.analysis -package llvm.bitwriter -linkpkg /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/core.ml -o /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/core.ml.tmp
/<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/core.ml.tmp /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/core.ml.tmp.bc
/<<PKGBUILDDIR>>/build-llvm/Release/bin/llvm-dis < /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/core.ml.tmp.bc > /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/core.ml.tmp.ll
/<<PKGBUILDDIR>>/build-llvm/Release/bin/FileCheck /<<PKGBUILDDIR>>/test/Bindings/OCaml/core.ml < /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/core.ml.tmp.ll
/<<PKGBUILDDIR>>/build-llvm/Release/bin/FileCheck -check-prefix=CHECK-NOWHERE /<<PKGBUILDDIR>>/test/Bindings/OCaml/core.ml < /<<PKGBUILDDIR>>/build-llvm/test/Bindings/OCaml/Output/core.ml.tmp.ll
--
Exit Code: 10

Command Output (stderr):
--
invalid !dbg metadata attachment
  %dbg = add i32 %P1, %P2, !dbg !2
!2 = !{i32 2, i32 3, !3, !3}
FAILED: writer/writer/valid #1

--

********************
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
Testing Time: 164.38s
********************
Unexpected Passing Tests (22):
    LLVM :: ExecutionEngine/MCJIT/cross-module-sm-pic-a.ll
    LLVM :: ExecutionEngine/MCJIT/eh-lg-pic.ll
    LLVM :: ExecutionEngine/MCJIT/eh-sm-pic.ll
    LLVM :: ExecutionEngine/MCJIT/multi-module-sm-pic-a.ll
    LLVM :: ExecutionEngine/MCJIT/remote/cross-module-sm-pic-a.ll
    LLVM :: ExecutionEngine/MCJIT/remote/multi-module-sm-pic-a.ll
    LLVM :: ExecutionEngine/MCJIT/remote/test-global-init-nonzero-sm-pic.ll
    LLVM :: ExecutionEngine/MCJIT/remote/test-ptr-reloc-sm-pic.ll
    LLVM :: ExecutionEngine/MCJIT/stubs-sm-pic.ll
    LLVM :: ExecutionEngine/MCJIT/test-global-init-nonzero-sm-pic.ll
    LLVM :: ExecutionEngine/MCJIT/test-ptr-reloc-sm-pic.ll
    LLVM :: ExecutionEngine/OrcMCJIT/cross-module-sm-pic-a.ll
    LLVM :: ExecutionEngine/OrcMCJIT/eh-lg-pic.ll
    LLVM :: ExecutionEngine/OrcMCJIT/eh-sm-pic.ll
    LLVM :: ExecutionEngine/OrcMCJIT/multi-module-sm-pic-a.ll
    LLVM :: ExecutionEngine/OrcMCJIT/remote/cross-module-sm-pic-a.ll
    LLVM :: ExecutionEngine/OrcMCJIT/remote/multi-module-sm-pic-a.ll
    LLVM :: ExecutionEngine/OrcMCJIT/remote/test-global-init-nonzero-sm-pic.ll
    LLVM :: ExecutionEngine/OrcMCJIT/remote/test-ptr-reloc-sm-pic.ll
    LLVM :: ExecutionEngine/OrcMCJIT/stubs-sm-pic.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-global-init-nonzero-sm-pic.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-ptr-reloc-sm-pic.ll

********************
Failing Tests (3):
    LLVM :: Bindings/OCaml/bitreader.ml
    LLVM :: Bindings/OCaml/core.ml
    LLVM :: Bindings/OCaml/ext_exc.ml

  Expected Passes    : 13871
  Expected Failures  : 97
  Unsupported Tests  : 195
  Unexpected Passes  : 22
  Unexpected Failures: 3
Makefile:103: recipe for target 'check-local' failed
make[3]: *** [check-local] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/build-llvm/test'
/<<PKGBUILDDIR>>/Makefile.rules:1791: recipe for target 'check' failed
make[2]: *** [check] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>/build-llvm'
debian/rules:413: recipe for target 'override_dh_auto_test' failed
make[1]: *** [override_dh_auto_test] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
debian/rules:134: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
--------------------------------------------------------------------------------
Build finished at 20160306-1448

Finished
--------

[1] http://debomatic-amd64.debian.net/distribution#unstable/llvm-toolchain-3.7/3.7.1-2/buildlog


So I guess I'll revert the change, at least for llvm-3.7

cheers,

Gianfranco

On Mon, 18 Jan 2016 09:54:02 +0100 Pierre Chifflier <pollux at debian.org> wrote:
> On Sat, Jan 16, 2016 at 01:56:36PM +0100, Sylvestre Ledru wrote:
> > Le 11/01/2016 20:56, Pierre Chifflier a écrit :
> > > tags 783919 +patch
> > > thanks
> > >
> > > On Thu, Nov 26, 2015 at 01:33:19PM +0100, Sylvestre Ledru wrote:
> > >> I will be happy to apply a patch if you have any.
> > >>
> > > Hi Sylvestre,
> > >
> > > Here is a patch for llvm-toolchain-3.6. It is now possible to build it
> > > with the bindings enabled, since ocaml-ctypes >= 0.4 has transitioned
> > > [1].
> > >
> > I tried to build it for an upload but it failed with:
> > 
> > debian/rules override_dh_install
> > make[1]: Entering directory '/tmp/buildd/llvm-toolchain-3.6-3.6.2'
> > dh_install --fail-missing
> > dh_install: libllvm-3.6-ocaml-dev missing files: /usr/lib/ocaml/llvm-3.6
> > dh_install: missing files, aborting
> > debian/rules:368: recipe for target 'override_dh_install' failed
> > make[1]: *** [override_dh_install] Error 2
> > 
> > Does it ring a bell?
> > 
> > Thanks
> > S
> > 
> 
> Hi Sylvestre,
> 
> I'm not sure of the reason, I have built in a clean chroot. This might
> be caused by something in the build environment.
> 
> Basically this means that the bindings were not built. You should check
> (in order):
> - that you are using the configure version, not the cmake one
> - that you ocaml packages are up to date (especially ocaml-ctypes, we
>   might want to add a versioned build dependency)
> - that the patch was applied, especially the debian/rules part (which
>   removes the --disable-bindings and adds --with-ocaml-libdir=...)
> - that ocaml and libs were correctly detected (this is written at the
>   beginning of config.log)
> 
> Hope that helps.
> 
> Cheers,
> Pierre
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-llvm-team/attachments/20160307/b6f8d4d8/attachment.sig>


More information about the Pkg-llvm-team mailing list