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

C compiler not found on Windows #5661

Closed
rjbou opened this issue Sep 11, 2023 · 21 comments · Fixed by #5667
Closed

C compiler not found on Windows #5661

rjbou opened this issue Sep 11, 2023 · 21 comments · Fixed by #5667

Comments

@rjbou
Copy link
Collaborator

rjbou commented Sep 11, 2023

Originally posted by @XantreGodlike in #5166 (reply in thread)

I've tried master branch today and having this error

...
Bootstrap compiler found -- activating
checking for ocamlc... ocamlc
OCaml version is 4.14.1
OCaml library path is D:/projects/open-source/opam/bootstrap/ocaml/lib/ocaml
checking for ocamlopt... ocamlopt
checking for ocamlc.opt... ocamlc.opt
checking for ocamlopt.opt... ocamlopt.opt
checking for ocaml... ocaml
checking for ocamldep... ocamldep
checking for ocamldep.opt... ocamldep.opt
checking for ocamlmktop... ocamlmktop
checking for ocamlmklib... ocamlmklib
checking for ocamldoc... ocamldoc
checking for ocamldoc.opt... ocamldoc.opt
checking for ocamlbuild... no
checking OCaml Sys.os_type... Win32
checking for gawk... gawk
checking for compiler type... cc
checking for compiler architecture... amd64
checking for compiler system... mingw64
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether x86_64-w64-mingw32-gcc.exe accepts -g... yes
checking for x86_64-w64-mingw32-gcc.exe option to enable C11 features... none needed
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for acl/libacl.h... no
checking for library containing acl_get_perm... no
checking for x86_64-w64-mingw32-i686-w64-mingw32-gcc... no
checking for i686-w64-mingw32-gcc... no
configure: error: amd64 C compiler not found - opam-putenv cannot be built
make: *** [Makefile:282: cold] Error 1

I dont why this error occurs, because i have mingw gcc

@rjbou rjbou changed the title C compilernot found on Windows C compiler not found on Windows Sep 11, 2023
@rjbou
Copy link
Collaborator Author

rjbou commented Sep 11, 2023

Do you have both mingw64-x86_64-gcc-g++ and mingw64-i686-gcc-g++ installed ?

@XantreDev
Copy link

I have amd ryzen, so i cannot have mingw for i686.

PS D:\Projects\experiments\calculate-median-salary> gcc -v
Using built-in specs.
COLLECT_GCC=C:\mingw64\bin/gcc.exe
COLLECT_LTO_WRAPPER=C:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/13.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-13.1.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/buildroot/x86_64-1310-win32-seh-ucrt-rt_v11-rev1/mingw64 --enable-host-shared --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=win32 --enable-libstdcxx-threads=yes --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libssp --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/buildroot/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/buildroot/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/buildroot/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/buildroot/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-win32-seh-rev1, Built by MinGW-Builds project' --with-bugurl=https://github.com/niXman/mingw-builds CFLAGS='-O2 -pipe -fno-ident -I/c/buildroot/x86_64-1310-win32-seh-ucrt-rt_v11-rev1/mingw64/opt/include -I/c/buildroot/prerequisites/x86_64-zlib-static/include -I/c/buildroot/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/buildroot/x86_64-1310-win32-seh-ucrt-rt_v11-rev1/mingw64/opt/include -I/c/buildroot/prerequisites/x86_64-zlib-static/include -I/c/buildroot/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/buildroot/x86_64-1310-win32-seh-ucrt-rt_v11-rev1/mingw64/opt/include -I/c/buildroot/prerequisites/x86_64-zlib-static/include -I/c/buildroot/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/buildroot/x86_64-1310-win32-seh-ucrt-rt_v11-rev1/mingw64/opt/lib -L/c/buildroot/prerequisites/x86_64-zlib-static/lib -L/c/buildroot/prerequisites/x86_64-w64-mingw32-static/lib ' LD_FOR_TARGET=/c/buildroot/x86_64-1310-win32-seh-ucrt-rt_v11-rev1/mingw64/bin/ld.exe --with-boot-ldflags=' -Wl,--disable-dynamicbase -static-libstdc++ -static-libgcc'
Thread model: win32
Supported LTO compression algorithms: zlib
gcc version 13.1.0 (x86_64-win32-seh-rev1, Built by MinGW-Builds project)

@kit-ty-kate
Copy link
Member

I have amd ryzen, so i cannot have mingw for i686.

that sounds weird. AMD CPUs should be able to run 32bit code too.

What error are you getting when trying to install it?

@XantreDev
Copy link

Ok, i will try to install i686. But how it should be aliased?

@MisterDA
Copy link
Contributor

MisterDA commented Sep 11, 2023

No need to alias anything, if all is well it should be available as i686-w64-mingw32-gcc.exe.

@XantreDev
Copy link

I've installed 32 bit version of mingw (rebooted pc for sure), and i having this error. I actually have required file in PATH

checking for OCaml findlib package unix... found
checking for OCaml findlib package re 1.9.0 or later... no
checking for OCaml findlib package base64 3.1.0 or later... found 3.5.0
checking for OCaml findlib package cmdliner... found
checking for OCaml findlib package ocamlgraph... not found
checking for OCaml findlib package cudf 0.7 or later... no
checking for OCaml findlib package dose3.common 6.1 or later... no
checking for OCaml findlib package dose3.algo 6.1 or later... no
checking for OCaml findlib package opam-file-format 2.1.4 or later... no
checking for OCaml findlib package spdx_licenses... not found
checking for OCaml findlib package opam-0install-cudf 0.4 or later... no
checking for OCaml findlib package jsonm... not found
checking for OCaml findlib package uutf... not found
checking for OCaml findlib package sha... not found
checking for OCaml findlib package swhid_core... not found
checking for OCaml findlib package mccs 1.1+9 or later... no
checking for x86_64-w64-mingw32-g++... x86_64-w64-mingw32-g++
checking whether the compiler supports GNU C++... yes
checking whether x86_64-w64-mingw32-g++ accepts -g... yes
checking for x86_64-w64-mingw32-g++ option to enable C++11 features... none needed
checking whether x86_64-w64-mingw32-g++ really is a C++ compiler... yes

configure: creating ./config.status
config.status: creating Makefile.config
config.status: creating src/ocaml-flags-configure.sexp
config.status: creating src/stubs/c-flags.sexp
config.status: creating src/stubs/libacl/c-libraries.sexp

Opam will be built WITH its default built-in solver

Executables will be installed in /usr/local/bin
Manual pages will be installed in /usr/local/share/man

Downloading vendored source dependencies...
done
Extracting vendored source dependencies in src_ext/... done
env PATH="`pwd`/bootstrap/ocaml/bin:$PATH" CAML_LD_LIBRARY_PATH= make
make[1]: Entering directory '/cygdrive/d/projects/open-source/opam'
/cygdrive/d/projects/open-source/opam/src_ext/dune-local/dune.exe build --profile=release --root .  --promote-install-files -- opam-installer.install opam.install
File "src/stubs/win32/dune", line 13, characters 19-29:
13 |     (names         opamInject opamWindows)
                        ^^^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src/stubs/win32/dune", line 13, characters 30-41:
13 |     (names         opamInject opamWindows)
                                   ^^^^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/sha/dune", line 18, characters 9-19:
18 |   (names sha1_stubs sha256_stubs sha512_stubs)))
              ^^^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/sha/dune", line 18, characters 20-32:
18 |   (names sha1_stubs sha256_stubs sha512_stubs)))
                         ^^^^^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/sha/dune", line 18, characters 33-45:
18 |   (names sha1_stubs sha256_stubs sha512_stubs)))
                                      ^^^^^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/dune", line 3, characters 12-28:
3 |  (cxx_names changed_criteria constraint_generation count_criteria
                ^^^^^^^^^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/dune", line 3, characters 29-50:
3 |  (cxx_names changed_criteria constraint_generation count_criteria
                                 ^^^^^^^^^^^^^^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/dune", line 3, characters 51-65:
3 |  (cxx_names changed_criteria constraint_generation count_criteria
                                                       ^^^^^^^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/dune", line 4, characters 3-18:
4 |    cudf_reductions cudf_tools glpk_solver lp_solver lexagregate_combiner
       ^^^^^^^^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/dune", line 4, characters 19-29:
4 |    cudf_reductions cudf_tools glpk_solver lp_solver lexagregate_combiner
                       ^^^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/dune", line 4, characters 30-41:
4 |    cudf_reductions cudf_tools glpk_solver lp_solver lexagregate_combiner
                                  ^^^^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/dune", line 4, characters 52-72:
4 |    cudf_reductions cudf_tools glpk_solver lp_solver lexagregate_combiner
                                                        ^^^^^^^^^^^^^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/dune", line 4, characters 42-51:
4 |    cudf_reductions cudf_tools glpk_solver lp_solver lexagregate_combiner
                                              ^^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/dune", line 5, characters 63-73:
5 |    new_criteria notuptodate_criteria removed_criteria mccscudf mccs_stubs)
                                                                   ^^^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/dune", line 5, characters 54-62:
5 |    new_criteria notuptodate_criteria removed_criteria mccscudf mccs_stubs)
                                                          ^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/dune", line 5, characters 3-15:
5 |    new_criteria notuptodate_criteria removed_criteria mccscudf mccs_stubs)
       ^^^^^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/dune", line 5, characters 16-36:
5 |    new_criteria notuptodate_criteria removed_criteria mccscudf mccs_stubs)
                    ^^^^^^^^^^^^^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/dune", line 5, characters 37-53:
5 |    new_criteria notuptodate_criteria removed_criteria mccscudf mccs_stubs)
                                         ^^^^^^^^^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 22, characters 2-8:
22 |   advbas
       ^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 54, characters 2-7:
54 |   alloc
       ^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 64, characters 2-5:
64 |   avl
       ^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 7, characters 2-5:
7 |   bfd
      ^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 30, characters 2-5:
30 |   btf
       ^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 31, characters 2-8:
31 |   btfint
       ^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 43, characters 2-5:
43 |   cfg
       ^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 44, characters 2-6:
44 |   cfg1
       ^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 45, characters 2-6:
45 |   cfg2
       ^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 46, characters 2-8:
46 |   clqcut
       ^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 47, characters 2-8:
47 |   covgen
       ^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 23, characters 2-8:
23 |   cpxbas
       ^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 55, characters 2-7:
55 |   dlsup
       ^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 65, characters 2-5:
65 |   dmp
       ^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 56, characters 2-5:
56 |   env
       ^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 57, characters 2-7:
57 |   error
       ^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 32, characters 2-5:
32 |   fhv
       ^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 33, characters 2-8:
33 |   fhvint
       ^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 48, characters 2-7:
48 |   fpump
       ^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 34, characters 2-5:
34 |   fvs
       ^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 66, characters 2-5:
66 |   gcd
       ^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 8, characters 2-10:
8 |   glpapi06
      ^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 9, characters 2-10:
9 |   glpapi09
      ^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 10, characters 2-10:
10 |   glpapi10
       ^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 11, characters 2-10:
11 |   glpapi12
       ^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 12, characters 2-10:
12 |   glpapi13
       ^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 13, characters 2-10:
13 |   glpios01
       ^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 14, characters 2-10:
14 |   glpios02
       ^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 15, characters 2-10:
15 |   glpios03
       ^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 16, characters 2-10:
16 |   glpios07
       ^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 17, characters 2-10:
17 |   glpios09
       ^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 18, characters 2-10:
18 |   glpios11
       ^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 19, characters 2-10:
19 |   glpios12
       ^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 20, characters 2-8:
20 |   glpscl
       ^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 49, characters 2-8:
49 |   gmicut
       ^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 50, characters 2-8:
50 |   gmigen
       ^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 35, characters 2-5:
35 |   ifu
       ^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 67, characters 2-4:
67 |   jd
       ^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 68, characters 2-4:
68 |   ks
       ^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 36, characters 2-5:
36 |   luf
       ^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 37, characters 2-8:
37 |   lufint
       ^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 69, characters 2-7:
69 |   mc13d
       ^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 70, characters 2-7:
70 |   mc21a
       ^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 51, characters 2-8:
51 |   mirgen
       ^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 71, characters 2-5:
71 |   mt1
       ^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 79, characters 2-6:
79 |   npp1
       ^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 80, characters 2-6:
80 |   npp2
       ^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 81, characters 2-6:
81 |   npp3
       ^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 82, characters 2-6:
82 |   npp4
       ^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 83, characters 2-6:
83 |   npp5
       ^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 24, characters 2-7:
24 |   prob1
       ^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 25, characters 2-7:
25 |   prob2
       ^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 26, characters 2-7:
26 |   prob4
       ^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 27, characters 2-7:
27 |   prob5
       ^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 85, characters 2-7:
85 |   proxy
       ^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 86, characters 2-8:
86 |   proxy1
       ^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 72, characters 2-5:
72 |   rng
       ^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 73, characters 2-6:
73 |   rng1
       ^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 74, characters 2-9:
74 |   round2n
       ^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 38, characters 2-5:
38 |   scf
       ^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 39, characters 2-8:
39 |   scfint
       ^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 40, characters 2-5:
40 |   sgf
       ^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 52, characters 2-5:
52 |   spv
       ^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 88, characters 2-7:
88 |   spxat
       ^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 89, characters 2-10:
89 |   spxchuzc
       ^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 90, characters 2-10:
90 |   spxchuzr
       ^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 91, characters 2-7:
91 |   spxlp
       ^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 92, characters 2-7:
92 |   spxnt
       ^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 93, characters 2-9:
93 |   spxprim
       ^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 94, characters 2-9:
94 |   spxprob
       ^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 95, characters 2-10:
95 |   spychuzc
       ^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 96, characters 2-10:
96 |   spychuzr
       ^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 97, characters 2-9:
97 |   spydual)
       ^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 58, characters 2-6:
58 |   stdc
       ^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 59, characters 2-8:
59 |   stdout
       ^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 41, characters 2-5:
41 |   sva
       ^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 61, characters 2-6:
61 |   time
       ^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 62, characters 2-5:
62 |   tls
       ^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 75, characters 2-8:
75 |   triang
       ^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 76, characters 2-9:
76 |   wclique
       ^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
File "src_ext/mccs/src/glpk/dune", line 77, characters 2-10:
77 |   wclique1
       ^^^^^^^^
Error: Program x86_64-w64-mingw32-gcc.exe not found in the tree or in PATH
 (context: default)
make[1]: *** [Makefile:144: build-opam] Error 1
make[1]: Leaving directory '/cygdrive/d/projects/open-source/opam'
make: *** [Makefile:283: cold] Error 2

valer@LAPTOP-OQLP01LT /cygdrive/d/projects/open-source/opam
$ x86_64-w64-mingw32-gcc.exe
x86_64-w64-mingw32-gcc: fatal error: no input files
compilation terminated.

@kit-ty-kate kit-ty-kate added this to For RC in Opam 2.2.0 Sep 12, 2023
@kit-ty-kate
Copy link
Member

Mmh, this is very peculiar. What is the exact command used? (just make cold ?) Could you show your current PATH variable? Which terminal emulator are you using?

@XantreDev
Copy link

make cold

@XantreDev
Copy link

image

@kit-ty-kate
Copy link
Member

C:\mingw32\bin;C:\mingw64\bin

This makes me a bit suspicious cygwin is doing something to ensure only its binaries are called somehow. How did you install mingw64-x86_64-gcc-g++ and mingw64-i686-gcc-g++ ? Using cygwin package manager or by hand? Those two directories makes me think you've installed them by hand.

Could you show your current PATH variable?

I meant more in a terminal, I wanted to check the character used to separate the directories (: vs ;)

@XantreDev
Copy link

I've installed it by hand. I will try to install it with cygwin

@dra27 dra27 linked a pull request Sep 14, 2023 that will close this issue
@XantreDev
Copy link

I've used Cygwin from Ocaml installer and has no idea about packages))

@dra27
Copy link
Member

dra27 commented Sep 14, 2023

From the terminal, in the directory where you're running the build from, what's the output of the following seven commands, please?

which x86_64-w64-mingw32-gcc
ls -l `which x86_64-w64-mingw32-gcc`
which i686-w64-mingw32-gcc
ls -l `which i686-w64-mingw32-gcc`
grep '^PATH' Makefile.config
echo $PATH
cmd /c echo "%PATH%"

@dra27
Copy link
Member

dra27 commented Sep 14, 2023

Where did you download the installers/zips for whatever produced the files in C:\mingw32 and C:\mingw64?

@XantreDev
Copy link

Where did you download the installers/zips for whatever produced the files in C:\mingw32 and C:\mingw64?

I've just unpacked it from here: https://github.com/niXman/mingw-builds-binaries/releases

@XantreDev
Copy link

XantreDev commented Sep 14, 2023

I've reinstalled cygwin, installed make, mingw x86_64 and i686.
And now i having this error. What are actual prerequsties to successful make cold?)

checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for acl/libacl.h... no
checking for library containing acl_get_perm... no
checking for x86_64-w64-mingw32-i686-w64-mingw32-gcc... no
checking for i686-w64-mingw32-gcc... i686-w64-mingw32-gcc
checking for x86_64-w64-mingw32-ocamlobjinfo... no
checking for ocamlobjinfo... ocamlobjinfo
checking for x86_64-w64-mingw32-ocamlfind... ocamlfind
./configure: line 5540: ocamlfind: command not found
checking for curl... curl
checking for x86_64-w64-mingw32-dune... no
checking for dune... no
checking for x86_64-w64-mingw32-cppo... no
checking for cppo... no
checking for x86_64-w64-mingw32-patch... no
checking for patch... no
checking for x86_64-w64-mingw32-bunzip2... no
checking for bunzip2... bunzip2
configure: error: You must have patch installed.
make: *** [Makefile:282: cold] Error 1

@XantreDev
Copy link

From the terminal, in the directory where you're running the build from, what's the output of the following seven commands, please?

which x86_64-w64-mingw32-gcc
ls -l `which x86_64-w64-mingw32-gcc`
which i686-w64-mingw32-gcc
ls -l `which i686-w64-mingw32-gcc`
grep '^PATH' Makefile.config
echo $PATH
cmd /c echo "%PATH%"

After reinstall it produces this code:

$ which x86_64-w64-mingw32-gcc
ls -l `which x86_64-w64-mingw32-gcc`
which i686-w64-mingw32-gcc
ls -l `which i686-w64-mingw32-gcc`
grep '^PATH' Makefile.config
echo $PATH
cmd /c echo "%PATH%"
/usr/bin/x86_64-w64-mingw32-gcc
-rwxr-xr-x 2 valer Администраторы 1229843 Jun  7 21:19 /usr/bin/x86_64-w64-mingw32-gcc
/usr/bin/i686-w64-mingw32-gcc
-rwxr-xr-x 2 valer Администраторы 1229331 Jun  7 21:18 /usr/bin/i686-w64-mingw32-gcc
PATH:=/cygdrive/d/projects/open-source/opam/bootstrap/ocaml/bin:$(PATH)
/usr/local/bin:/usr/bin:/cygdrive/d/Utility2/cuda/bin:/cygdrive/d/Utility2/cuda/libnvvp:/cygdrive/c/Program Files/Volta:/cygdrive/c/Program Files/Alacritty:/cygdrive/d/Utility2/WMware/bin:/cygdrive/c/Program Files/Eclipse Adoptium/jdk-11.0.17.8-hotspot/bin:/cygdrive/c/Python310/Scripts:/cygdrive/c/Python310:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Windows/System32/OpenSSH:/cygdrive/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/mingw32/bin:/cygdrive/c/mingw64/bin:/cygdrive/c/Program Files/Cppcheck:/cygdrive/d/Service/LLVM/bin:/cygdrive/c/ProgramData/chocolatey/bin:/cygdrive/c/Program Files (x86)/MSBuild/14.0/Bin:/cygdrive/c/Program Files/dotnet:/cygdrive/c/Users/valer/AppData/Roaming/npm:/cygdrive/c/Program Files/MySQL/MySQL Server 8.0/bin:/cygdrive/c/Python27:/cygdrive/c/Users/valer/AppData/Roaming/nvm:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files/Graphviz/bin:/cygdrive/d/Utility2/Android_Studio_SDKs/platform-tools:/cygdrive/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Program Files (x86)/gsudo:/cygdrive/d/Utility2/aws-cli:/cygdrive/d/Utility2/OpenSSL-Win64/bin:/cygdrive/d/Utility2/Android_Studio_SDKs/tools:/cygdrive/c/Program Files/CMake/bin:/cygdrive/c/Program Files (x86)/GitHub CLI:/cygdrive/c/Program Files/OpenVPN/bin:/cygdrive/c/Program Files/WireGuard:/cygdrive/c/Program Files/nu/bin:/cygdrive/c/Program Files/NVIDIA Corporation/Nsight Compute 2023.1.1:/cygdrive/d/Utility2/OCaml64:/cygdrive/c/Program Files/starship/bin:/cygdrive/c/Program Files/Docker/Docker/resources/bin:/cygdrive/c/Program Files/Git/cmd:/cygdrive/c/Program Files/PowerShell/7:/cygdrive/d/Utility2/Ccache:/cygdrive/c/Users/valer/AppData/Local/Volta/bin:/cygdrive/c/Users/valer/scoop/shims:/cygdrive/c/Users/valer/.console-ninja/.bin:/cygdrive/d/Utility2/Ruby27-x64/bin:/cygdrive/c/Users/valer/.cargo/bin:/cygdrive/c/Users/valer/.windows-build-tools/python27:/cygdrive/c/Users/valer/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/Users/valer/.dotnet/tools:/cygdrive/c/Users/valer/AppData/Local/GitHubDesktop/bin:/cygdrive/c/Program Files/Azure Data Studio/bin:/cygdrive/c/Users/valer/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/Users/valer/AppData/Local/Microsoft/WinGet/Links:/cygdrive/c/Users/valer/AppData/Local/JetBrains/Toolbox/scripts:/cygdrive/d/Utility2/BrowserStack:/cygdrive/d/Utility2/Neovim/bin:/cygdrive/d/Apps/Microsoft VS Code Insiders/bin
D:\Utility2\Cygwin\usr\local\bin;D:\Utility2\Cygwin\bin;D:\Utility2\cuda\bin;D:\Utility2\cuda\libnvvp;C:\Program Files\Volta;C:\Program Files\Alacritty;D:\Utility2\WMware\bin;C:\Program Files\Eclipse Adoptium\jdk-11.0.17.8-hotspot\bin;C:\Python310\Scripts;C:\Python310;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\mingw32\bin;C:\mingw64\bin;C:\Program Files\Cppcheck;D:\Service\LLVM\bin;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\MSBuild\14.0\Bin;C:\Program Files\dotnet;C:\Users\valer\AppData\Roaming\npm;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Python27;C:\Users\valer\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\Graphviz\bin;D:\Utility2\Android_Studio_SDKs\platform-tools;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\gsudo;D:\Utility2\aws-cli;D:\Utility2\OpenSSL-Win64\bin;D:\Utility2\Android_Studio_SDKs\tools;C:\Program Files\CMake\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\OpenVPN\bin;C:\Program Files\WireGuard;C:\Program Files\nu\bin;C:\Program Files\NVIDIA Corporation\Nsight Compute 2023.1.1;D:\Utility2\OCaml64;C:\Program Files\starship\bin;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files\Git\cmd;C:\Program Files\PowerShell\7;D:\Utility2\Ccache;C:\Users\valer\AppData\Local\Volta\bin;C:\Users\valer\scoop\shims;C:\Users\valer\.console-ninja\.bin;D:\Utility2\Ruby27-x64\bin;C:\Users\valer\.cargo\bin;C:\Users\valer\.windows-build-tools\python27;C:\Users\valer\AppData\Local\Microsoft\WindowsApps;C:\Users\valer\.dotnet\tools;C:\Users\valer\AppData\Local\GitHubDesktop\bin;C:\Program Files\Azure Data Studio\bin;C:\Users\valer\AppData\Local\Microsoft\WindowsApps;C:\Users\valer\AppData\Local\Microsoft\WinGet\Links;C:\Users\valer\AppData\Local\JetBrains\Toolbox\scripts;D:\Utility2\BrowserStack;D:\Utility2\Neovim\bin;D:\Apps\Microsoft VS Code Insiders\bin

@dra27
Copy link
Member

dra27 commented Sep 14, 2023

You're missing the patch package as well - that should be sufficient.

@XantreDev
Copy link

XantreDev commented Sep 14, 2023

I think you should specify in installation guide that all this packages should be installed as cygwin packages, not regular one.

For example:
You should install lynx package, while installing Cygwin.
All futher steps should be processed from Cygwin.
Install apt-cyg

lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
install apt-cyg /bin

Install all deps:

apt-cyg install mingw64-i686-gcc-g++ mingw64-x86_64-gcc-g++ patch make

Build opam:

git clone https://github.com/ocaml/opam.git
cd opam
make cold

After successful build add opam repo to Path env variable.
...
Start your preferred Windows terminal (cmd or PowerShell), and initialise opam with the Windows sunset repository:
opam init git+https://github.com/ocaml-opam/opam-repository-mingw

@MisterDA
Copy link
Contributor

I think you should specify in installation guide that all this packages should be installed as cygwin packages, not regular one.

opam's readme already has all that info:

The following Cygwin packages are required:

  • From Devel - make
  • From Devel - patch (not required if OCaml and all required packages are pre-installed)
  • From Devel - mingw64-i686-gcc-core & mingw64-x86_64-gcc-core (not required if building with MSVC)

Alternatively, having downloaded Cygwin's setup program, Cygwin can be installed using the following command line:

setup-x86_64 --root=C:\cygwin64 --quiet-mode --no-desktop --no-startmenu --packages=make,mingw64-i686-gcc-core,mingw64-x86_64-gcc-core,patch

@XantreDev
Copy link

XantreDev commented Sep 14, 2023

Ok, sorry i've used instructions from announcement post of alpha version

Opam 2.2.0 automation moved this from For RC to Done Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Opam 2.2.0
  
Done
Development

Successfully merging a pull request may close this issue.

5 participants