Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007845OCamlconfigure and build/installpublic2018-09-01 04:052018-09-01 22:29
Assigned Todra 
PlatformWindows + CygwinOSWindowsOS Version10
Product Version4.07.0 
Target VersionFixed in Version 
Summary0007845: Build failure with latest Cygwin (2.11.0-1)
DescriptionBuilds of the OCaml compiler have started to fail for me today, with errors of the form:
OCAML_FLEXLINK="../boot/ocamlrun ../flexdll/flexlink.exe" ../runtime/ocamlrun ../ocamlc -g -nostdlib -I ../utils -I ../p
arsing -I ../stdlib -I ../compilerlibs -strict-sequence -safe-string -strict-formats -w +a-4-9-41-42-44-45-48 -warn-erro
r A -custom ocamlcommon.cma -o ocamltest.exe run_win32.o run_stubs.o ocamltest_stdlib_stubs.o ocamltest_config.cmo ocaml
test_stdlib.cmo run_command.cmo filecompare.cmo variables.cmo environments.cmo result.cmo actions.cmo tests.cmo tsl_ast.
cmo tsl_parser.cmo tsl_lexer.cmo tsl_semantics.cmo builtin_variables.cmo actions_helpers.cmo builtin_actions.cmo ocaml_b
ackends.cmo ocaml_filetypes.cmo ocaml_variables.cmo ocaml_modifiers.cmo ocaml_directories.cmo ocaml_files.cmo ocaml_flag
s.cmo ocaml_commands.cmo ocaml_tools.cmo ocaml_compilers.cmo ocaml_toplevels.cmo ocaml_actions.cmo ocaml_tests.cmo optio
ns.cmo main.cmo
x86_64-w64-mingw32-gcc: error: ../stdlib\libcamlrun.a: No such file or directory
** Fatal error: Error during linking

Before today, builds were working great in our Cygwin environment!

After some investigation, I narrowed it down to the recent Cygwin release - the cygwin dll was updated to 2.11.0 today (8/31). On an environment with the 2.10.0 version, the build is successful, but on an environment with the 2.11.0 version, the build fails with the above error.

A full build failure is available here: [^]
Steps To ReproduceThe failure is reproducible by following the MingW build steps here: [^]
, if you have the latest Cygwin environment. You can validate that you have the latest environment by checking `cygcheck -c` and looking for the cygwin version - if it is 2.11.0, it should repro.

Alternatively, if you have NPM, you can follow these steps to repro:
- `npm install -g esy-bash@0.1.22`
- `git clone [^]`
- `cd ocaml`
- `git submodule update --init`
- `cp config/m-nt.h runtime/caml/m.h`
- `cp config/s-nt.h runtime/caml/s.h`
- `cp config/Makefile.mingw64 config/Makefile`
- `esy-bash make flexdll`
- `esy-bash make world.opt`
- `esy-bash make flexlink.opt`
- `esy-bash make install`
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
bryphe (reporter)
2018-09-01 04:08

This is a list of changes that came in to Cygwin 2.11.0-1: [^]

There were several fixes for path handling, so I suspect that one of those changes may be related to the above error.
bryphe (reporter)
2018-09-01 06:44

One other note - if I copy over the 2.10.0-1 version of 'cygwin1.dll', the build works correctly. So that's been our workaround for the time being.

I've also started a thread on the Cygwin mailing list: [^]
dra (developer)
2018-09-01 10:03

I agree that this is likely to be a regression in Cygwin 2.11 - I'll attempt to produce a smaller repro case. We should clean up the mixing of forward and backslashes anyhow - it's ugly, even if not technically incorrect.
dra (developer)
2018-09-01 10:04

If you're using the graphic setup program, for now you can manually downgrade the Cygwin package to the previous. Unfortunately they don't expose that in the command line, so you can't do that for AppVeyor.

However, if this is confirmed as a regression, I expect Corinna will push a fix very quickly.
bryphe (reporter)
2018-09-01 22:02

Thanks David for the response and triage!

Looks like Corinna created a fix here: [^]

I tested it out with a simplified version of our build pipeline: [^] and the build is now green with the patched dll: [^]

Also, regarding a minimal repro, looks like they have a minimal repro here:
> The normalization of paths with backslashes has changed.
> The following doesn't work any longer:
> cd /tmp
> stat "..\bin\file.exe" # or
> stat "..\\bin\\file.exe"
> This however still works:
> stat "C:\cygwin\bin\file.exe"
bryphe (reporter)
2018-09-01 22:04

I like the idea of cleaning up the mixing of forward and backslashes - standardizing to forward slashes seems more reliable.

- Issue History
Date Modified Username Field Change
2018-09-01 04:05 bryphe New Issue
2018-09-01 04:08 bryphe Note Added: 0019320
2018-09-01 06:44 bryphe Note Added: 0019321
2018-09-01 10:03 dra Note Added: 0019322
2018-09-01 10:03 dra Assigned To => dra
2018-09-01 10:03 dra Status new => assigned
2018-09-01 10:04 dra Note Added: 0019323
2018-09-01 22:02 bryphe Note Added: 0019325
2018-09-01 22:04 bryphe Note Added: 0019326

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker