Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flexlink may fail to parse directives #5339

Closed
vicuna opened this issue Aug 16, 2011 · 1 comment
Closed

flexlink may fail to parse directives #5339

vicuna opened this issue Aug 16, 2011 · 1 comment
Assignees
Labels

Comments

@vicuna
Copy link

vicuna commented Aug 16, 2011

Original bug ID: 5339
Reporter: matt
Assigned to: @alainfrisch
Status: closed (set by @xavierleroy on 2012-09-25T18:06:17Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.12.1
Category: ~DO NOT USE (was: OCaml general)

Bug description

Hello,

One of my compilation failed during the linking phase, with the following message:


$ ocamlbuild ms_gates.dll
ocamlfind ocamlopt -o ms_gates.native.dll -linkpkg -package mtsvrac -package gates -output-obj gates/gates_dll.cmx gates/ms_gates_rev.o
** Fatal error: Cannot parse directive: -export:"ms_gates_min_max_porte" -export:"ms_gates_get_color" -export:"ms_gates_set_color" -export:"ms_gates_get_mode" -export:"ms_gates_set_mode" -export:"ms_gates_get_synchro" -export:"ms_gates_set_synchro" -export:"ms_gates_set_synchro_with_opt" -export:"ms_gates_get_sme" -export:"ms_gates_set_sme" -export:"ms_gates_get_width" -export:"ms_gates_set_width" -export:"ms_gates_get_shown" -export:"ms_gates_set_shown" -export:"ms_gates_get_active" -export:"ms_gates_set_active" -export:"ms_gates_get_level" -export:"ms_gates_set_level" -export:"ms_gates_get_begin" -export:"ms_gates_set_begin" -export:"ms_gates_compute_ascan_array_u8" -export:"ms_gates_compute_ascan_array_i8" -export:"ms_gates_compute_ascan_array_i16" -export:"ms_gates_compute_u8" -export:"ms_gates_compute_i8" -export:"Java_com_metalscan_ndtcomponents_gatesdevice_GatesDll_computeGates" -export:"ms_gates_compute_i16" -export:"ms_gates_table_size" -export:"ms_gates_mini_maxi" -export:"ms_gates_swap" -export:"ms_gates_suppress_gate" -export:"ms_gates_suppress_gate_with_opt" -export:"ms_gates_add_gate" -export:"ms_gates_add_gate_with_opt" -export:"ms_gates_forget_table" -export:"ms_gates_create_table" -export:"ms_gates_init_ok" -export:"ms_gates_init" -export:"ms_gates_version"

File "caml_startup", line 1, characters 0-1:
Error: Error during linking
Exit code 2 while executing this command:
ocamlfind ocamlopt -o ms_gates.native.dll -linkpkg -package mtsvrac -package gates -output-obj gates/gates_dll.cmx gates/ms_gates_rev.o

After some investigation, it appears that the directive parsing function fails because the last char of the directive string is the closing '"' of an exported symbol. I'm attaching a patch (against rev 195 of http://flexdll.googlecode.com/svn/trunk) that solves the bug, and I hope do not add other one.

Sidenote : this case was encountered during my experiments to use i686-w64-mingw32- cross-compilation tools.

File attachments

@vicuna
Copy link
Author

vicuna commented Sep 7, 2011

Comment author: @alainfrisch

Thank, well spotted! I've applied a similar patch to the development version of flexdll (commit 198 on flexdll SVN repository).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants