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

Test with AppVeyor #28

Merged
merged 4 commits into from
Jan 2, 2018
Merged

Test with AppVeyor #28

merged 4 commits into from
Jan 2, 2018

Conversation

talex5
Copy link
Contributor

@talex5 talex5 commented Nov 18, 2017

No description provided.

@talex5
Copy link
Contributor Author

talex5 commented Nov 18, 2017

Note, this fails for me with:

#=== ERROR while compiling sha.1.10 ===========================================#
# opam-version         1.3.0~dev (2c2399d98ad0ebcb43a4bc856f3636030bb376db)
# os                   win32
# command              make
# path                 C:/cygwin64/home/appveyor/.opam/4.03.0+mingw64c/build/sha.1.10
# exit-code            2
# env-file             C:/cygwin64/home/appveyor/.opam/4.03.0+mingw64c/build/sha.1.10\sha-288-d2c37b.env
# stdout-file          C:/cygwin64/home/appveyor/.opam/4.03.0+mingw64c/build/sha.1.10\sha-288-d2c37b.out
# stderr-file          C:/cygwin64/home/appveyor/.opam/4.03.0+mingw64c/build/sha.1.10\sha-288-d2c37b.err
### stdout ###
# ocamlc -c -o sha1.cmi sha1.mli
# ocamlc -ccopt "-Wall -O3 -funroll-loops -I/usr/include" -c -o sha1.o sha1.c
### stderr ###
# [...]
# /usr/include/sys/_timeval.h:40:18: error: conflicting types for ‘time_t’
#  typedef _TIME_T_ time_t;
#                   ^~~~~~
# In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/stddef.h:7:0,
#                  from /usr/lib/gcc/x86_64-w64-mingw32/6.4.0/include/stddef.h:1,
#                  from /usr/include/sys/reent.h:14,
#                  from /usr/include/string.h:11,
#                  from sha1.c:16:
# /usr/x86_64-w64-mingw32/sys-root/mingw/include/crtdefs.h:138:20: note: previous declaration of ‘time_t’ was here
#  typedef __time64_t time_t;
#                     ^~~~~~
# make: *** [Makefile:94: sha1.o] Error 2

(https://ci.appveyor.com/project/talex5-ci/ocaml-sha)

Meanwhile, 0install (which has tested sha with AppVeyor as a dependency for a long time) has just started failing with:

#=== ERROR while compiling sha.1.10 ===========================================#
# opam-version         1.3.0~dev (2c2399d98ad0ebcb43a4bc856f3636030bb376db)
# os                   win32
# command              make
# path                 C:/cygwin64/home/appveyor/.opam/4.03.0+mingw64c/build/sha.1.10
# exit-code            2
# env-file             C:/cygwin64/home/appveyor/.opam/4.03.0+mingw64c/build/sha.1.10\sha-288-4197d2.env
# stdout-file          C:/cygwin64/home/appveyor/.opam/4.03.0+mingw64c/build/sha.1.10\sha-288-4197d2.out
# stderr-file          C:/cygwin64/home/appveyor/.opam/4.03.0+mingw64c/build/sha.1.10\sha-288-4197d2.err
### stdout ###
# ocamlc -I  -c -o sha1.cmi sha1.mli
# ocamlc -ccopt "-Wall -O3 -funroll-loops" -c -o sha1.o sha1.c
# mv sha1.o sha1.lib.o
# ocamlc -ccopt "-Wall -O3 -funroll-loops" -c -o sha1_stubs.o sha1_stubs.c
# ocamlc -I  -c -o sha1.cmo sha1.ml
### stderr ###
# ocamlfind: Package `oUnit' not found
# ocamlfind: Package `oUnit' not found
# File "sha1.ml", line 1:
# Error: The output file sha1.cmo has the wrong name. The extension implies an object file but the link step was requested
# make: *** [Makefile:87: sha1.cmo] Error 2

(https://ci.appveyor.com/project/talex5-ci/0install-yp593/build/90#L398)

@talex5
Copy link
Contributor Author

talex5 commented Nov 19, 2017

Also, Travis is now failing with:

$ bash ./.travis-docker.sh
prepare.ci
Sending build context to Docker daemon 226.3 kB
Step 1/6 : FROM ocaml/opam:alpine_ocaml-4.02.0
manifest for ocaml/opam:alpine_ocaml-4.02.0 not found

@talex5
Copy link
Contributor Author

talex5 commented Jan 2, 2018

(this code is copied from https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/appveyor.yml, which doesn't specify a license - I've filed an issue at ocaml/ocaml-ci-scripts#201, but I doubt it will be a problem)

@djs55
Copy link
Owner

djs55 commented Jan 2, 2018

I've enabled appveyor on this repo and rebased your branch to see what happens.

This fails on Windows, with:

    /usr/include/sys/_timeval.h:40:18: error: conflicting types for ‘time_t’
     typedef _TIME_T_ time_t;
                      ^~~~~~
    In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/stddef.h:7:0,
                     from /usr/lib/gcc/x86_64-w64-mingw32/6.4.0/include/stddef.h:1,
                     from /usr/include/sys/reent.h:14,
                     from /usr/include/string.h:11,
                     from sha1.c:16:
    /usr/x86_64-w64-mingw32/sys-root/mingw/include/crtdefs.h:138:20: note: previous declaration of ‘time_t’ was here
     typedef __time64_t time_t;
@talex5
Copy link
Contributor Author

talex5 commented Jan 2, 2018

Same problem. I wonder if the -I/usr/include at the top of the Makefile is the problem. Git says it was added in 6550b35, but I'm not sure why.

I've pushed a new commit to try removing it...

@talex5
Copy link
Contributor Author

talex5 commented Jan 2, 2018

Well, that got a few more lines, but:

# In file included from sha1.c:19:0:
# bitfn.h:71:20: fatal error: endian.h: No such file or directory
#  #include <endian.h>
#                     ^
# compilation terminated.

Probably someone with a Windows machine will have to debug this.

djs55 added 2 commits January 2, 2018 13:08
On Windows we omit this #include.

Signed-off-by: David Scott <[email protected]>
This concept doesn't exist on Windows. We can omit this flag.

Signed-off-by: David Scott <[email protected]>
@djs55
Copy link
Owner

djs55 commented Jan 2, 2018

Travis and appveyor are green -- I'll merge this for the release.

@djs55 djs55 merged commit c5e282a into djs55:master Jan 2, 2018
@talex5 talex5 deleted the appveyor branch January 2, 2018 13:23
@talex5 talex5 mentioned this pull request Jan 2, 2018
@nojb
Copy link
Contributor

nojb commented Jan 2, 2018

Note that this fixes compilation for the mingw toolchain; msvc compilation still needs some more work. I will try to put together a PR.

@nojb nojb mentioned this pull request Jan 2, 2018
@talex5
Copy link
Contributor Author

talex5 commented Jan 3, 2018

Just to add to the confusion, I see there's another patch to support Windows (from @fdopen) at fdopen/opam-repository-mingw@cd2ebee#diff-fe866ea31ff1e66dce52f6124adbeacd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants