--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: ocaml-mingw-w64: create bytecode shared objects that makes C programs using it to segfault
- From: Giulio Paci <giuliopaci@gmail.com>
- Date: Fri, 24 Nov 2017 15:36:13 +0100
- Message-id: <151153417319.26588.11351289562998113555.reportbug@odino.mivoq.it>
Package: ocaml-mingw-w64
Version: 4.01.0~20140328-1+b2
Severity: normal
I am trying to produce libraries usable from C with OCaml and to compile them
using CMake, for which I created a module that tries to simplify this process
[1].
As part of the CMake module for building C libraries with OCaml, I have
automated the building of a few combinations of options [2].
Among those combinations, cross-compiling for Windows with currently packaged
x86_64-w64-mingw32-ocamlopt and i686-w64-mingw32-ocamlopt is producing some
unusable binaries [3] [4].
Using opam-cross-windows [5], with the same C compiler, does not pose the same
issue [2].
In order to reproduce the issue you can perform the following steps:
git clone https://github.com/giuliopaci/ocaml-cmake.git
cd ocaml-cmake
mkdir build
cd build
cmake ../examples/hello_world_lib -DCMAKE_VERBOSE_MAKEFILE=on
-DCMAKE_TOOLCHAIN_FILE=../toolchains/Toolchain-mingw32.cmake
make
wine ./main-libhelloworld-bytecode.exe
[1] https://github.com/giuliopaci/ocaml-cmake
[2] https://travis-ci.org/giuliopaci/ocaml-cmake/builds/287518762
[3] https://travis-ci.org/giuliopaci/ocaml-cmake/jobs/287518771#L1580
[4] https://travis-ci.org/giuliopaci/ocaml-cmake/jobs/287518772#L1590
[5] https://github.com/ocaml-cross/opam-cross-windows
-- System Information:
Debian Release: buster/sid
APT prefers testing
APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.13.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
Versions of packages ocaml-mingw-w64 depends on:
ii ocaml-mingw-w64-i686 4.01.0~20140328-1+b2
ii ocaml-mingw-w64-x86-64 4.01.0~20140328-1+b2
ocaml-mingw-w64 recommends no packages.
ocaml-mingw-w64 suggests no packages.
-- no debconf information
--- End Message ---