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

Unable to debug under Cygwin (with flexdll) #5094

Closed
vicuna opened this issue Jul 6, 2010 · 5 comments
Closed

Unable to debug under Cygwin (with flexdll) #5094

vicuna opened this issue Jul 6, 2010 · 5 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Jul 6, 2010

Original bug ID: 5094
Reporter: aostruszka
Status: closed (set by @damiendoligez on 2011-05-17T14:51:02Z)
Resolution: fixed
Priority: normal
Severity: block
Version: 3.11.2
Category: ~DO NOT USE (was: OCaml general)

Bug description

Hello Team,

I have recently upgraded to 3.11.2 and would like to debug but it seems that it is impossible for Cygwin+flexdll setup (or at least I don't know how).
Configuration is:

  • cygwin 1.7
  • ocaml 3.11.2 (compiled with no Tk - otherwise the build was failing)
  • flexdll 0.23 installed at C:\Program Files\flexdll

Exemplary output:

$ cat test.ml
print_endline "Hello world!"
$ ocamlc -g -o a test.ml
$ ./a
Hello world!
$ ocamldebug ./a
Objective Caml Debugger version 3.11.2

(ocd) run
Loading program... Cannot find FLEXDLL_RELOCATE
Cannot find FLEXDLL_RELOCATE
12 [main] ocamlrun 5132 C:\cygwin\usr\local\bin\ocamlrun.exe: *** fatal error - unable to remap \?\C:\cygwin\usr\local\lib\ocaml\stublibs\dllunix.so to same address as parent: 0x665C0000 != 0x0
11 [main] ocamldebug 1752 fork: child 5132 - died waiting for dll loading, errno 11
Unix error : 'fork' failed : Resource temporarily unavailable
(ocd)

Best regards
Andrzej

@vicuna
Copy link
Author

vicuna commented Sep 7, 2010

Comment author: @alainfrisch

Yasutaka Atarashi found the cause for bad interaction between flexdll and Cygwin's fork (namely, flexdll used putenv instead of setenv). This is fixed in the current development version of flexdll and it might solve the issue reported here. Any feedback on that would be appreciated.

@vicuna
Copy link
Author

vicuna commented Oct 27, 2010

Comment author: aostruszka

I have just upgraded to 0.25 flexdll and builded new 3.12.0. Unfortunately the result is the same.

@vicuna
Copy link
Author

vicuna commented Oct 27, 2010

Comment author: aostruszka

One additional note/question about flexdll (under Cygwin). Is the -custom flag not supposed to work when ocaml has been compiled with support for flexdll?
Any compilation with -custom that I've tried fails - for example this is what I get when compiling findlib with new toolchain

-8<---compiling findlib----
ocamlc -custom -o ocamlfind.exe findlib.cma unix.cma
ocaml_args.cmo frontend.cmo
realgcc.exe: /tmp/camlprime47ca9.c: No such file or directory
realgcc.exe: no input files
** Fatal error: Error while compiling
File "none", line 1, characters 0-1:
Error: Error while building custom runtime system
make[1]: *** [ocamlfind] Error 2
-8<---compiling findlib----

@vicuna
Copy link
Author

vicuna commented Dec 20, 2010

Comment author: atarashi

At that time "the current development version" mentioned by frisch didn't mean the release version 0.25 but subversion repository. However, now my patch is included in the release version 0.26 according to ChangeLog. So, please try again.

In my environment (patched flexdll and OCaml 3.12.0 on Cygwin 1.7.7), compiling findlib, including quoted command line, does not cause the error.

What is "realgcc.exe"? Do you have custom configuration for gcc?

@vicuna
Copy link
Author

vicuna commented May 17, 2011

Comment author: @damiendoligez

Flexdll version 0.26 fixes this problem.

@vicuna vicuna closed this as completed May 17, 2011
@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
Labels
Projects
None yet
Development

No branches or pull requests

1 participant