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

A failure in the middle of the build may be caused by build parallelism (enabled by default). #26507

Open
anajera05 opened this issue Sep 6, 2024 · 6 comments

Comments

@anajera05
Copy link

image

@punchagan
Copy link
Contributor

@anajera05 Can you give more context on the error? What package was this building? If there's a link to the logs, that would be helpful too.

@mbarbin
Copy link
Contributor

mbarbin commented Sep 10, 2024

I just encountered a similar error. This is for the windows-latest, 4.08.x job of pp's CI in PR 21. See for example this run.

@mbarbin
Copy link
Contributor

mbarbin commented Sep 10, 2024

If this helps, I found trace of this error message in packages/ocaml-base-compiler/ocaml-base-compiler.4.08.1/opam's post-messages, in this repository.

@mbarbin
Copy link
Contributor

mbarbin commented Sep 11, 2024

With the help of ocaml/setup-ocaml#861 I understand it is not always simple to anticipate which architecture is going to be used when choosing an OS by name on GitHub workflow actions.

It seems there are going to be instances where this message is not that helpful in that it may take the attention away from what may be an actual build incompatibility, which does not relate to build parallelism. For example, in the log I linked, I now see:

   # C:/mingw64/x86_64-w64-mingw32/include/_mingw.h:271:2: error: #error Only Win32 target is supported!
  #   271 | #error Only Win32 target is supported!
  #       |  ^~~~~

@RichAyotte
Copy link

RichAyotte commented Sep 17, 2024

I'm seeing the same issue.

❯ echo $MAKEFLAGS
-j16

❯ echo $CFLAGS
-O2 -pipe -march=native -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing

❯ echo $CXXFLAGS
-O2 -pipe -march=native -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing

image

@RichAyotte
Copy link

RichAyotte commented Sep 17, 2024

Continues to fail with --jobs=1 suggestion but with different error.

<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
Switch invariant: ["ocaml-base-compiler" {= "4.14.2"}]

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved ocaml-config.2  (cached)
∗ installed base-bigarray.base
∗ installed base-threads.base
∗ installed base-unix.base
∗ installed host-arch-x86_64.1
∗ installed host-system-other.1
∗ installed ocaml-options-vanilla.1
⬇ retrieved ocaml-base-compiler.4.14.2  (cached)
[ERROR] The compilation of ocaml-base-compiler.4.14.2 failed at "make -j1".

#=== ERROR while compiling ocaml-base-compiler.4.14.2 =========================#
# context     2.2.1 | linux/x86_64 |  | git+https://github.com/ocaml/opam-repository.git#0f4d0ee5b69b496a4e26f305891c31400f0b4b5f
# path        ~/Projects/tezos/tezos/_opam/.opam-switch/build/ocaml-base-compiler.4.14.2
# command     ~/.opam/opam-init/hooks/sandbox.sh build make -j1
# exit-code   2
# env-file    ~/.opam/log/ocaml-base-compiler-557611-153e30.env
# output-file ~/.opam/log/ocaml-base-compiler-557611-153e30.out
### output ###
# [...]
# floats.c:440:16: note: type ‘value’ should match type ‘void’
# floats.c:440:16: note: ‘caml_abs_float’ was previously declared here
# lto1: some warnings being treated as errors
# lto-wrapper: fatal error: gcc returned 1 exit status
# compilation terminated.
# /usr/bin/ld: error: lto-wrapper failed
# collect2: error: ld returned 1 exit status
# make[2]: *** [Makefile:272: ocamlrun] Error 1
# make[2]: Leaving directory '/home/rich/Projects/tezos/tezos/_opam/.opam-switch/build/ocaml-base-compiler.4.14.2/runtime'
# make[1]: *** [Makefile:165: coldstart] Error 2
# make[1]: Leaving directory '/home/rich/Projects/tezos/tezos/_opam/.opam-switch/build/ocaml-base-compiler.4.14.2'
# make: *** [Makefile:313: world.opt] Error 2
❯ gcc --version
gcc (Debian 14.2.0-5) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

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

No branches or pull requests

4 participants