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

MinGW/msys: Camlp4 crashes #5150

Closed
vicuna opened this issue Sep 18, 2010 · 2 comments
Closed

MinGW/msys: Camlp4 crashes #5150

vicuna opened this issue Sep 18, 2010 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Sep 18, 2010

Original bug ID: 5150
Reporter: spiralvoice
Assigned to: @xclerc
Status: closed (set by @diml on 2016-12-07T17:27:35Z)
Resolution: open
Priority: normal
Severity: minor
Version: 3.12.0
Target version: later
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Tags: patch

Bug description

$ camlp4
Fatal error: cannot load shared library dllunix
Reason: Cannot resolve WSAGetLastError@0

Additional information

Hi, I know MinGW/msys is not really supported but nonetheless I gave the new MinGW environment a try (gcc-4.5.0, binutils 2.20.51.20100613).
To compile the attached patch was needed to add "L/mingw/lib" at various places, it produced working ocamlc and ocamlopt.opt

$ ocamlopt.opt -v
The Objective Caml native-code compiler, version 3.12.0
Standard library directory: c:/GNU/ocaml3120/lib

$ ocamlc -v
The Objective Caml compiler, version 3.12.0
Standard library directory: c:/GNU/ocaml3120/lib

Can you give me a hint please what to do with camlp4? I already tried this without success:

--- ocaml-3.12.0.org//myocamlbuild.ml 2010-06-08 11:50:56.000000000 +0200
+++ ocaml-3.12.0/myocamlbuild.ml 2010-09-18 19:52:48.000000000 +0200
@@ -744,7 +744,7 @@
begin fun _ _ ->
Cmd(S[ocamlc; A"-I"; P dynlink_dir; A "dynlink.cma"; include_unix; unix_cma;
T(tags_of_pathname byte++"ocaml"++"link"++"byte");

  •        P camlp4lib_cma; A"-linkall"; atomize cmos; A"-o"; Px (add_exe byte)])
    
  •        P camlp4lib_cma; A"-cclib"; A"-L/mingw/lib"; A"-cclib"; A"-lws2_32"; A"-linkall"; atomize cmos; A"-o"; Px (add_exe byte)])
    
    end;
    rule native
    ~deps:(camlp4lib_cmxa :: camlp4lib_lib :: (cmxs @ objs @ dep_unix_native @ dep_dynlink_native))

File attachments

@vicuna
Copy link
Author

vicuna commented Aug 22, 2012

Comment author: @bobzhang

IMHO, the dependency on unix is really non necessary. Only Unix.isatty is used for the auto-printer

@vicuna
Copy link
Author

vicuna commented Dec 7, 2016

Comment author: @diml

Camlp4 is now a separate project. Please re-open a ticket on github [1] if you are still interested in seeing the original issue fixed.

[1] https://github.com/ocaml/camlp4/issues

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