Skip to content

"Cannot relocate" error with flexdll in OCaml for Windows 4.11 (and older versions) #92

@maroneze

Description

@maroneze

Hello,

I just installed OCaml for Windows 4.11.1 (4.11.1+mingw64c) and, as before, I tried to install and run the frama-c package, which uses dynamic loading for its plugins. Compilation worked fine, but trying to run it fails with:

[kernel] User Error: cannot load plug-in 'num.core': cannot load module
  Details: error loading shared library: Dynlink.Error (Dynlink.Cannot_open_dll "Failure(\"flexdll error: cannot relocate RELOC_REL32, target is too far: ffffffff6a110d73  000000006a110d73\")")
[kernel] User Error: cannot load plug-in 'zip': cannot load module
  Details: error loading shared library: Dynlink.Error (Dynlink.Cannot_open_dll "Failure(\"flexdll error: cannot relocate RELOC_REL32, target is too far: fffffffe488b648d  00000000488b648d\")")
[kernel] User Error: cannot load plug-in 'why3': cannot load module
  Details: error loading shared library: Dynlink.Error (Dynlink.Cannot_open_dll "Failure(\"Cannot resolve camlGzip\")")
[kernel] User Error: cannot load plug-in 'frama-c-wp': cannot load module
  Details: error loading shared library: Dynlink.Error (Dynlink.Cannot_open_dll "Failure(\"Cannot resolve camlWhy3__Ident\")")

I had never seen this issue before; frama-c worked with several previous versions of the OCaml compiler. After testing, I noticed it also happens with older versions of Frama-C, and with OCaml as old as 4.08.1 (I didn't have the time to test other versions; each compilation takes about 1 hour...). So I wonder if something changed on Windows or in flexdll. The same issue happened to one of our users, so it's not just my machine. I'm not sure what to do on the Frama-C side to debug it.

Are there any known issues issues related to the "flexdll error: cannot relocate RELOC_REL32, target is too far" message? Would you have any suggestions on how to proceed to debug this?

By the way, running flexlink -help displays FlexDLL version 0.38fdopen1; so I'm not sure I should contact fdopen directly to ask for help; sorry if the issue is unrelated to you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions