Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • F frama-c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 168
    • Issues 168
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • pub
  • frama-c
  • Issues
  • #428

Compilation of kernel native cmx is messed up with plugin makefile

ID0002162: This issue was created automatically from Mantis Issue 2162. Further discussion may take place here.


Id Project Category View Due Date Updated
ID0002162 Frama-C Kernel > Makefile public 2015-09-16 2016-06-21
Reporter ploc Assigned To bobot Resolution open
Priority normal Severity minor Reproducibility always
Platform - OS - OS Version -
Product Version Frama-C Sodium Target Version - Fixed in Version -

Description :

The include mechanism of plugin makefiles impact the oflags of the kernel compilation.

For example, the compilation flags of cmx for plugin is enriched with a -for-pack pluginname.

When one compiles frama-c classicaly, with VERBOSEMALE=yes make, one obtains:

ocamlopt ..... -for-pack Aorai structural_descr.ml and same for a lot of .ml files of the kernel such as external/unmarshal.ml, src/type/type.ml ...

A (not so nice) workaround is to compile first those cmx without call to any dynamic plugin and then the main call:

kernel only

EXTERNAL_PLUGINS="" VERBOSEMAKE=yes FRAMAC_USER_FLAGS="-for-pack FramaC" GEN_BUCKX_CFLAGS="-fPIC" make

remaining uncompiled plugins

VERBOSEMAKE=yes FRAMAC_USER_FLAGS="-for-pack FramaC" GEN_BUCKX_CFLAGS="-fPIC" make

install

sudo make install

Interestingly, removing such cmx compiled incorrectly with -for-pack Aorai, and asking to compile it again, triggers the correct rule:

#frama-c-Sodium-20150201$ rm src/type/structural_descr.cmx

#frama-c-Sodium-20150201$ VERBOSEMAKE=yes make src/type/structural_descr.cmx

It returns:

ocamlopt.opt -c -w +a-3-4-6-9-41-44-45-48 -annot -bin-annot -g -I src/misc -I src/ai -I src/memory_state -I src/toplevel -I src/slicing_types -I src/pdg_types -I src/kernel -I src/logic -I src/lib -I src/printer -I src/project -I src/type -I src/buckx -I src/gui -I external -I cil/src -I cil/src/ext -I cil/src/frontc -I cil/src/logic -I cil/ocamlutil -I /home/ploc/Local/src/frama-c/frama-c-Sodium-20150201/lib/plugins -I lib -I /home/ploc/.opam/4.01.0/lib/ocamlgraph -I /home/ploc/.opam/4.01.0/lib/zarith -compact src/type/structural_descr.ml

Strange, n'est ce pas?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking