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

ocamlopt -shared fails on cygwin 64bit #6470

Closed
vicuna opened this issue Jun 25, 2014 · 4 comments
Closed

ocamlopt -shared fails on cygwin 64bit #6470

vicuna opened this issue Jun 25, 2014 · 4 comments

Comments

@vicuna
Copy link

vicuna commented Jun 25, 2014

Original bug ID: 6470
Reporter: nndms
Status: resolved (set by @xavierleroy on 2017-02-16T14:11:01Z)
Resolution: not a bug
Priority: normal
Severity: major
Target version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Fixed in version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Category: platform support (windows, cross-compilation, etc)

Bug description

ocamlopt -shared fails on cygwin 64bit with the following error message.

$ ocamlopt -o test.cmxs -shared test.ml
sh: -o: command not found
File "caml_startup", line 1:
Error: Error during linking

In this case, test.ml is simple.
$ cat test.ml
print_string "test\n"

This error seems to occur for all .ml files.
This error does not occur on 32bit version of cygwin.

@vicuna
Copy link
Author

vicuna commented Jul 16, 2014

Comment author: @damiendoligez

Reproduced.

Looks like a configuration problem: the variable that should contain the name of the C compiler is empty, and the shell takes the first option (-o) as the command name.

@vicuna
Copy link
Author

vicuna commented Jul 16, 2014

Comment author: @damiendoligez

In fact the C compiler for shared libraries is not configured because they are not supported under Cygwin-64 because flexdll hasn't been ported yet.

When that happens, we should give a dummy value to the variable to make the error message more informative.

@vicuna
Copy link
Author

vicuna commented Jul 13, 2016

Comment author: @alainfrisch

I just tried and it seems native dynlink works with the current dev versions of flexdll and OCaml (Cygwin64 port).

@doligez : can you confirm?

@vicuna
Copy link
Author

vicuna commented Feb 16, 2017

Comment author: @xavierleroy

Tested with 4.05 and the current Cygwin 64. Seems to work.

@vicuna vicuna closed this as completed Feb 16, 2017
@vicuna vicuna added this to the 4.05.0 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant