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

Build failure with latest Cygwin (2.11.0-1) #7845

Closed
vicuna opened this issue Sep 1, 2018 · 7 comments

Comments

Projects
None yet
3 participants
@vicuna
Copy link

commented Sep 1, 2018

Original bug ID: 7845
Reporter: @bryphe
Assigned to: @dra27
Status: assigned (set by @dra27 on 2018-09-01T08:03:24Z)
Resolution: open
Priority: normal
Severity: major
Platform: Windows + Cygwin
OS: Windows
OS Version: 10
Version: 4.07.0
Category: configure and build/install
Monitored by: @nojb @hcarty

Bug description

Builds 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 reproduce

The 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
@vicuna

This comment has been minimized.

Copy link
Author

commented Sep 1, 2018

Comment author: @bryphe

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.

@vicuna

This comment has been minimized.

Copy link
Author

commented Sep 1, 2018

Comment author: @bryphe

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

@vicuna

This comment has been minimized.

Copy link
Author

commented Sep 1, 2018

Comment author: @dra27

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.

@vicuna

This comment has been minimized.

Copy link
Author

commented Sep 1, 2018

Comment author: @dra27

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.

@vicuna

This comment has been minimized.

Copy link
Author

commented Sep 1, 2018

Comment author: @bryphe

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"
@vicuna

This comment has been minimized.

Copy link
Author

commented Sep 1, 2018

Comment author: @bryphe

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

@nojb

This comment has been minimized.

Copy link
Contributor

commented Mar 22, 2019

Issue resolved, so closing.

@nojb nojb closed this Mar 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.