Frama-C Bug Tracking System

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002378Frama-Cptestspublic2018-06-18 16:482020-02-17 18:08
Assigned Tomaroneze 
PrioritynormalSeverityminorReproducibilityhave not tried
Platformbytecode-onlyOSOpenBSDOS Version6.3
Product Version 
Target VersionFixed in VersionFrama-C 20-Calcium 
Summary0002378: Bytecode only compilation fails when linking to stdlib
DescriptionCompiling bytecode only fails with this error: ocamlfind ocamlc -I ptests -dtypes -vmthread -g -o bin/ptests.byte unix.cma threads.cma str.cma dynlink.cma ptests/ ptests/ File "ptests/", line 1: Error: Required module `Uchar' is unavailable
Steps To ReproduceCompile OCaml >=4.03 without optimizing compilers. Use this compiler to build frama-c
TagsNo tags attached.
Attached Files? file icon patch-configure_in [^] (1,400 bytes) 2019-02-24 23:55 [Show Content]
? file icon patch-Makefile [^] (888 bytes) 2019-02-25 02:01 [Show Content]
? file icon patch-configure_in_2 [^] (1,282 bytes) 2019-08-29 00:36 [Show Content]
? file icon patch-Makefile_2 [^] (2,039 bytes) 2019-08-29 00:46 [Show Content]
? file icon patch-Makefile_3 [^] (2,091 bytes) 2019-08-30 00:49 [Show Content]

- Relationships

-  Notes
madroach (reporter)
2019-02-24 23:58
edited on: 2019-02-24 23:59

I suspect the build error is caused by +vmthreads/stdlib.cma having a different ordering and set of modules than +stdlib.cma. Since vmthreads are being deprecated anyway I would consider always building with system threads. Alternatively, do at least prefer system threads even on bytecode builds as is done by the patch I just uploaded.
madroach (reporter)
2019-08-27 22:06

Please commit at least the configure patch. There is a misunderstanding of what "native system threads" implies in the OCaml world. Native system threads are available for native and for bytecode compilation and are the only available threading since vmthreads, which were only supported for bytecode, have been dropped.
maroneze (administrator)
2019-08-28 18:04

I hadn't seen this issue before, so in March I applied a similar patch to the Makefile, which should have the same effect as yours, I think (and it should already be available in the latest Frama-C release, 19.0). But the configure patch has not been applied. We don't currently have an OpenBSD VM to test it, but I tried applying the patch using my fork of Frama-C's Github repository ( If it looks good to you, we'll probably commit it soon.
madroach (reporter)
2019-08-29 00:38

Looks good to me. You might consider applying patch-configure_in_2 instead because it is simpler while yielding the same results. There is no difference in threading between byte- and nativecode anymore.
madroach (reporter)
2019-08-29 00:47

Now also updated to patch-Makefile_2 adding a fix to allow bytecode only installation.
maroneze (administrator)
2019-08-29 09:14

Thanks a lot. I adapted a bit the patch Makefile_2 to make it work, and we will try to integrate it quickly. Concerning the threads detection, though, maybe it's better to completely remove the test from the configure, assuming native threads are always available. Is there a deadline concerning OpenBSD package releases? In other words, would it be useful if the patches were integrated ASAP, or could it wait for the next Frama-C release (likely sometime in November/December)?
madroach (reporter)
2019-08-29 09:54
edited on: 2019-08-29 09:55

I have no idea which platforms would run Frama-C without threads and therefore no idea whether they need thread-detection. No need to hurry the release; we are patching Frama-C in our ports. But it would be nice if we could stop maintaining the patches with the next Frama-C update.
virgile (developer)
2019-08-29 10:38

The fact that vmthreads are deprecated in 4.08 (, with the suggestion to move to system threads regardless of the OS on which the application is run is in my opinion a good hint that assuming native thread support everywhere is not too far fetched.
madroach (reporter)
2019-08-29 12:52

According to threads are supported everywhere.
madroach (reporter)
2019-08-30 00:50

I'm afraid I forgot to test native code builds, which are broken by my Makefile patch. That's why I just uploaded a fixed 3rd version of the Makefile patch.
virgile (developer)
2019-09-12 17:44

Changes have been merged internally and will be part of Frama-C 20.0 Calcium
signoles (manager)
2020-02-17 18:08

Fixed in Frama-C 20.0 (Calcium).

- Issue History
Date Modified Username Field Change
2018-06-18 16:48 madroach New Issue
2018-06-18 16:48 madroach Status new => assigned
2018-06-18 16:48 madroach Assigned To => virgile
2018-11-30 10:41 signoles Assigned To virgile => bobot
2019-02-24 23:56 madroach File Added: patch-configure_in
2019-02-24 23:58 madroach Note Added: 0006752
2019-02-24 23:59 madroach Note Edited: 0006752 View Revisions
2019-02-25 02:01 madroach File Added: patch-Makefile
2019-08-27 22:06 madroach Note Added: 0006856
2019-08-28 17:37 maroneze Assigned To bobot => maroneze
2019-08-28 18:04 maroneze Note Added: 0006857
2019-08-29 00:36 madroach File Added: patch-configure_in_2
2019-08-29 00:38 madroach Note Added: 0006858
2019-08-29 00:46 madroach File Added: patch-Makefile_2
2019-08-29 00:47 madroach Note Added: 0006860
2019-08-29 09:14 maroneze Note Added: 0006862
2019-08-29 09:54 madroach Note Added: 0006863
2019-08-29 09:55 madroach Note Edited: 0006863 View Revisions
2019-08-29 10:38 virgile Note Added: 0006864
2019-08-29 12:52 madroach Note Added: 0006865
2019-08-30 00:49 madroach File Added: patch-Makefile_3
2019-08-30 00:50 madroach Note Added: 0006867
2019-09-12 17:44 virgile Note Added: 0006869
2019-09-12 17:44 virgile Status assigned => resolved
2019-09-12 17:44 virgile Fixed in Version => Frama-C 20-Calcium
2019-09-12 17:44 virgile Resolution open => fixed
2020-02-17 18:08 signoles Status resolved => closed
2020-02-17 18:08 signoles Note Added: 0006953

Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker