Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005613OCamlOCaml windowspublic2012-05-12 19:362015-05-15 10:06
Assigned Tofrisch 
PlatformVisual C++OSWindowsOS VersionWindows 7
Product Version3.12.1 
Target VersionlaterFixed in Version 
Summary0005613: Flexdll's dll produced from several object files fails to load
DescriptionLaunching 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 Reproducecl /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 -o test.cmo
ocamlc -a test.cmo -o test.cma -dllib -ltest
ocamlc test.cma -o test_prog.exe
TagsNo tags attached.
Attached Filesgz file icon test_corrected.tar.gz [^] (640 bytes) 2012-05-12 19:46

- Relationships

-  Notes
joedralliam (reporter)
2012-05-12 19:47
edited on: 2012-05-12 19:48

I'm sorry, I uploaded the wrong archive ("test.tar.gz", the correct one is "test_corrected.tar.gz"). But I can't delete it ??

doligez (administrator)
2015-05-13 20:04

Is flexdll even supposed to work with C++ code?
frisch (developer)
2015-05-15 10:06

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.

- Issue History
Date Modified Username Field Change
2012-05-12 19:36 joedralliam New Issue
2012-05-12 19:36 joedralliam File Added: test.tar.gz
2012-05-12 19:46 joedralliam File Added: test_corrected.tar.gz
2012-05-12 19:47 joedralliam Note Added: 0007427
2012-05-12 19:48 joedralliam Note Edited: 0007427 View Revisions
2012-05-15 14:12 frisch File Deleted: test.tar.gz
2012-05-15 14:22 frisch Assigned To => frisch
2012-05-15 14:22 frisch Status new => assigned
2012-07-09 14:56 doligez Target Version => 4.01.0+dev
2012-07-31 13:36 doligez Target Version 4.01.0+dev => 4.00.1+dev
2012-09-21 14:22 doligez Target Version 4.00.1+dev => 4.00.2+dev
2013-06-14 14:19 frisch Target Version 4.00.2+dev => 4.02.0+dev
2013-07-12 18:15 doligez Target Version 4.02.0+dev => 4.01.1+dev
2014-05-25 20:20 doligez Target Version 4.01.1+dev => 4.02.0+dev
2014-08-18 20:39 doligez Target Version 4.02.0+dev => 4.02.1+dev
2014-09-04 00:25 doligez Target Version 4.02.1+dev => undecided
2014-09-26 20:52 doligez Target Version undecided => 4.02.2+dev / +rc1
2015-05-13 20:04 doligez Note Added: 0013922
2015-05-15 10:06 frisch Note Added: 0013930
2015-05-15 10:06 frisch Target Version 4.02.2+dev / +rc1 => later

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker