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
Reporterbryphe 
Assigned Todra 
PrioritynormalSeveritymajorReproducibilityalways
StatusassignedResolutionopen 
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:
https://gist.github.com/bryphe/58603ab752ecd988f78ee383fa9c9e78 [^]
Steps To ReproduceThe failure is reproducible by following the MingW build steps here: https://github.com/ocaml/ocaml/blob/trunk/README.win32.adoc [^]
, 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 https://github.com/ocaml/ocaml [^]`
- `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
(0019320)
bryphe (reporter)
2018-09-01 04:08

This is a list of changes that came in to Cygwin 2.11.0-1: https://cygwin.com/ml/cygwin-announce/2018-08/msg00031.html [^]

There were several fixes for path handling, so I suspect that one of those changes may be related to the above error.
(0019321)
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: https://cygwin.com/ml/cygwin/2018-09/msg00000.html [^]
(0019322)
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.
(0019323)
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.
(0019325)
bryphe (reporter)
2018-09-01 22:02

Thanks David for the response and triage!

Looks like Corinna created a fix here: https://cygwin.com/snapshots/ [^]

I tested it out with a simplified version of our build pipeline: https://github.com/bryphe/test-ocaml-build [^] and the build is now green with the patched dll: https://ci.appveyor.com/project/bryphe/test-ocaml-build [^]

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"
(0019326)
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