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

When buliding an MSVC executable, flexdll passes cygwin paths to microsoft tools #5831

Closed
vicuna opened this issue Nov 17, 2012 · 3 comments
Closed

Comments

@vicuna
Copy link

vicuna commented Nov 17, 2012

Original bug ID: 5831
Reporter: sesquized
Assigned to: @alainfrisch
Status: closed (set by @alainfrisch on 2012-11-19T11:13:47Z)
Resolution: not a bug
Priority: normal
Severity: major
Platform: Windows
OS: Windows
OS Version: Vista 64
Version: 4.00.1
Category: configure and build/install

Bug description

When flexlink builds an MSVC project, it will pass cygwin style paths to microsoft LINK.

For example, if I have TMPDIR unset, it passes /tmp/dyndll051eba.obj to link which gives this error:
LINK : warning LNK4044: unrecognized option "tmp/dyndll051eba.obj"; ignored

If I have TMPDIR set to c:\windows\temp, it passes /cygdrive/c/windows/temp/dyndlla8f209.obj to Link which gives this error:

LINK : warning LNK4044: unrecognized option "cygdrive/c/windows/temp/dyndlla8f209.obj"; ignored

Steps to reproduce

  • build flexdll with a cygwin ocaml
  • build a msvc ocaml
  • Either set TMPDIR to "c:/windows/temp" or leave it unset
  • Build a "Hello world" with the MSVC port of OCaml and its ocamlbuild

You will get those errors when the project is linking.

Additional information

(Currently I can't link flexdll with my MSVC OCaml so I'm not certain whether that build of flexlink would have this problem.)

This patch to flexlink 0.30 solves the problem: http://wwayneb.wikispaces.com/Windowsify+Patch (I don't think the patch works if TMPDIR is not set.)

This other patch to flexlink 0.30 is useful for testing this problem because it causes flexlink.exe to print out the name of every temporary file that it creates. http://wwayneb.wikispaces.com/Flexdll+Noisy+Patch

@vicuna
Copy link
Author

vicuna commented Nov 17, 2012

Comment author: @alainfrisch

flexdll is supposed to be built with a native Win32 port (mingw or msvc). Do you have a reason not to use the binary distribution of flexdll?

@vicuna
Copy link
Author

vicuna commented Nov 17, 2012

Comment author: sesquized

I get problems trying to build the libraries such as win32unix.

If I have flexlink in the default install path of "c:\program files (x86)\flexdll",
I get LINK : fatal error LNK1104: cannot open file ''c:\Program.obj'
(because some step in the process doesn't handle spaces properly)

If I move it to c:\Tools\Flexdll, I get this error:
LINK : fatal error LNK1104: cannot open file ''c:\Tools\Flexdll\flexdll_initer_msvc.obj''

where the problem is extra single quotes in the arguments to LINK (the '' is two single quotes, not a double quote. One is from the error message and one is from what was given to link.) I checked and the file is there.

subcommands get passed through bash which has its own magic processing in the middle

Bill

@vicuna
Copy link
Author

vicuna commented Nov 19, 2012

Comment author: sesquized

I found out today that the version I was using yesterday was not the "stock" version that I thought it was. I had replaced it by my own build about two weeks ago and forgot that I'd made the change.

Once I restarted the build process from start, I was able to get it to work, except that I couldn't build ocamlbrowser.

So this report is all wrong...

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

2 participants