You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5613 Reporter: joedralliam Assigned to:@alainfrisch Status: assigned (set by @alainfrisch on 2012-05-15T12:22:27Z) Resolution: open Priority: normal Severity: minor Platform: Visual C++ OS: Windows OS Version: Windows 7 Version: 3.12.1 Target version: later Category: platform support (windows, cross-compilation, etc)
Bug description
Launching a byte-code executable which uses primitives defined in the dll (mixed C/C++) fails with following output:
No master relocation table
Fatal error: unknown C primitive `foo__impl'
Removing '/Ox' compilation option fix the 'bug'.
Replacing the object constructors/destructor behaviour (calling caml_release_runtime_system and caml_acquire_runtime_system) by explicit calls fix also the 'bug'.
There has been some effort to have flexdll support C++ code, but no guarantee is provided. I'll happily integrate patches that fix the mentionned problem, but won't be able to investigate myself.
Anyway, this is an old problem, which would most likely be addressed in flexdll, not OCaml, so there is no reason to delay the release of OCaml for this one.
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.
Original bug ID: 5613
Reporter: joedralliam
Assigned to: @alainfrisch
Status: assigned (set by @alainfrisch on 2012-05-15T12:22:27Z)
Resolution: open
Priority: normal
Severity: minor
Platform: Visual C++
OS: Windows
OS Version: Windows 7
Version: 3.12.1
Target version: later
Category: platform support (windows, cross-compilation, etc)
Bug description
Launching a byte-code executable which uses primitives defined in the dll (mixed C/C++) fails with following output:
No master relocation table
Fatal error: unknown C primitive `foo__impl'
Removing '/Ox' compilation option fix the 'bug'.
Replacing the object constructors/destructor behaviour (calling caml_release_runtime_system and caml_acquire_runtime_system) by explicit calls fix also the 'bug'.
Is this behaviour expected ?
Steps to reproduce
cl /MD /Ox /EHs /DCAML_NAME_SPACE /IC:/ocamlms/lib /c foo.cpp
cl /MD /Ox /EHs /DCAML_NAME_SPACE /IC:/ocamlms/lib /c bar.cpp
flexlink -chain msvc64 -merge-manifest foo.obj bar.obj -o dlltest.dll
cp dlltest.dll $(shell ocamlc -where)/lib/stublibs/dlltest.dll
ocamlc -c test.ml -o test.cmo
ocamlc -a test.cmo -o test.cma -dllib -ltest
ocamlc test.cma test_prog.ml -o test_prog.exe
File attachments
The text was updated successfully, but these errors were encountered: