modula3 / cm3

Critical Mass Modula-3
http://modula3.github.io/cm3/
Other
132 stars 26 forks source link

Q: how to compile hello world with MinGW or Cygwin on Windows? #692

Open bapcyk opened 3 years ago

bapcyk commented 3 years ago

I downloaded multiple ZIP packed releases for Windows and I see there in the bin\config folder targets like "I386_MINGW" and "I386_CYGWIN". An attempt to build hello world showed me that only "AMD64_NT" is supported in those ZIP releases. Also I see just pkg\cm3\NT386... So my questions are:

I tried cm3 -DTARGET=I386_MINGW ... but it did not help.

VictorMiasnikov commented 3 years ago

(

Are You sure what your question is exactly this?

} Q: how to compile hello world with MinGW or Cygwin on Windows?

or in fact question best read as:

} Q: how to compile hello world with "integrated backend" or "C backend" or "by any other way" on Windows?

)

I.e. You have installed and worked https://github.com/modula3/cm3/releases/download/20210312/cm3-all-win64-d5.11.0-VC2019-20210312.zip for Win x64?

Or https://github.com/modula3/cm3/releases/download/20210312/cm3-all-win32-d5.11.0-VC90-20210312.zip for pure 32bit environment inside VM on Hyper-V or VirtualBOX?

( both from https://github.com/modula3/cm3/releases/tag/20210312 )

You can upgrade AMD64_NT to 2021-05-13 https://github.com/modula3/cm3/commit/28aec13334d75306bca46ecf121a7c96e9f58562

See screenshot for comparing environment setting, etc:

**********************************************************************
** Visual Studio 2019 Any_Edt Command Prompt v16.6.0
** Copyright (c) 2020 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise>d:

D:\>cd D:\cm3\src\scripts\python\

D:\cm3\src\scripts\python>python upgrade.py && python do-cm3-all.py realclean skipgcc && python do-cm3-all.py buildship
SearchPath return:D:\cm3\bin\cm3.exe
set CM3_TARGET=AMD64_NT
set CM3_INSTALL=D:\cm3
set CM3_ROOT=D:/cm3/src
SearchPath return:C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\errno.h
SearchPath return:C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\windows.h
SearchPath return:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\kernel32.lib
SearchPath return:C:\Program Files (x86)\Microsoft Visual Studio\2019\Any_Edt\VC\Tools\MSVC\14.26.28801\lib\x64\libcmt.lib
SearchPath return:C:\Program Files (x86)\Microsoft Visual Studio\2019\Any_Edt\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\cl.exe
SearchPath return:C:\Program Files (x86)\Microsoft Visual Studio\2019\Any_Edt\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\link.exe
SearchPath return:C:\Program Files (x86)\Microsoft Visual Studio\2019\Any_Edt\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\mspdbsrv.exe
SearchPath return:C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\mt.exe
SearchPath return:C:\Program Files (x86)\Microsoft Visual Studio\2019\Any_Edt\VC\Tools\MSVC\14.26.28801\lib\x64\delayimp.lib
SearchPath return:C:\Program Files (x86)\Microsoft Visual Studio\2019\Any_Edt\VC\Tools\MSVC\14.26.28801\lib\x64\msvcrt.lib

 . . .

If You have installed cm3 then You can ( potentially) create cm3-boot* for MinGW or Cygwin ( see later)

VictorMiasnikov commented 3 years ago

Or download this files:

a) Cygwin NT386GNU http://modula3.elegosoft.com/cm3/uploaded-archives/cm3-std-NT386GNU-d5.7.0.tar.gz

════ arclite:tar:cm3-std-NT386GNU-d5.7.0.tar:\cm3-std-NT386GNU-d5.7.0\bin
S                         Name               │ Size │  Date  │Time
..                                           │  Up  │17.12.08│17:28
cm3cg                                     exe│  16 M│17.12.08│16:59
cm3                                       exe│6663 K│17.12.08│16:59
shobjcodegen                              exe│5585 K│17.12.08│16:53
stubgen                                   exe│5361 K│17.12.08│16:53
stablegen                                 exe│5356 K│17.12.08│16:53
obliq-std                                 exe│4886 K│17.12.08│16:56
mentor                                    exe│4835 K│17.12.08│16:58
m3tk                                      dll│4068 K│17.12.08│16:52
arithmetic                                dll│3338 K│17.12.08│16:51
netobjd                                   exe│2510 K│17.12.08│16:53
m3                                        dll│2286 K│17.12.08│16:50
m3tohtml                                  exe│2237 K│17.12.08│16:52

b) MinGW NT386MINGNU http://www.opencm3.net/uploaded-archives/cm3-std-NT386MINGNU-d5.7.1.tar.gz

════ arclite:tar:cm3-std-NT386MINGNU-d5.7.1.tar:\cm3-std-NT386MINGNU-d5.7.1\bin
S                         Name               │ Size │  Date  │Time
..                                           │  Up  │18.02.09│19:54
cm3cg                                     exe│  17 M│18.02.09│14:24
cm3                                       exe│7031 K│18.02.09│14:24
shobjcodegen                              exe│5940 K│18.02.09│14:16
stubgen                                   exe│5715 K│18.02.09│14:16
stablegen                                 exe│5710 K│18.02.09│14:17
obliq-std                                 exe│5242 K│18.02.09│14:21
mentor                                    exe│4851 K│18.02.09│14:23
m3tk                                      dll│4111 K│18.02.09│14:15
arithmetic                                dll│3389 K│18.02.09│14:13
VictorMiasnikov commented 3 years ago

ToDo: create cm3-boot* for MinGW or Cygwin (

I start do it and have some errors... -(

)

jaykrell commented 3 years ago

I had it (both?) working years ago. Do you really want it (both?)? Why? What is wrong with Visual C++? Cygwin is kinda horrible really. fork is so slow. I can try an mingw release, if you really need. x86, amd64, neither, other, both? I recommend avoiding 32bit x86, really.

It probably just takes a few lines of config/quake. Almost anyone should be able to do it..

jaykrell commented 3 years ago

I'll see what I can do.

VictorMiasnikov commented 3 years ago

} Do you really want it (both?)? Why?

My goal is "using m3gdb debugger", and ( may be) interaction with Ada language .lib / .obj

} It probably just takes a few lines of config/quake. Almost anyone should be able to do it..

I try do it, but there are errors on compiling stage

} I'll see what I can do.

Thanks!

--

I see https://github.com/modula3/cm3/commit/2b6bb826f9847355cd5d3f1015ab3b483029695c

jaykrell commented 3 years ago

There are too many of these things: cygwin, mingw, mingw64, msys, msys2.

VictorMiasnikov commented 3 years ago

} There are too many of these things: cygwin, mingw, mingw64, msys, msys2.

One sec... Please, see demo-screenshot:

{{{
**********************************************************************
** Visual Studio 2019 ZZZZZZZZZ Command Prompt v16.6.0
** Copyright (c) 2020 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Program Files (x86)\Microsoft Visual Studio\2019\Any_Edt>d:

D:\>cd D:\git-sdk-64\

D:\git-sdk-64>mingw64.exe

D:\git-sdk-64>
}}}
 +
{{{
user1@comp1 MINGW64 /
$ export PATH=/usr/local/cm3/bin:$PATH
$ cd /usr/local/cm3/bin
$ python2 ##VVM#ToDo###
$ cd /usr/local/cm3/src/scripts/python/
$ python2 ##VVM#ToDo###
}}}

{{{{{
Welcome to the Git for Windows SDK!

The common tasks are automated via the `sdk` function;
See `sdk help` for details.

user1@comp1 MINGW64 /
$ export PATH=/usr/local/cm3/bin:$PATH

user1@comp1 MINGW64 /
$ cd /usr/local/cm3/bin

user1@comp1 MINGW64 /usr/local/cm3/bin
$ g++ -g -pthread -c cm3-boot-unix64le-d5.11.1-20210610.cpp
../src/uid/Common/MachineIDC.i3:35:0: fatal error: net/if.h: No such file or directory
compilation terminated.

user1@comp1 MINGW64 /usr/local/cm3/bin
$

}}}}}
jaykrell commented 3 years ago

That is a Unix build. It is not meant to work for Windows. It says so clearly?

VictorMiasnikov commented 3 years ago

} It says so clearly?

and

VVM}} see demo-screenshot

IMHO, simplest way is download this:

https://github.com/git-for-windows/git-sdk-64 https://github.com/git-for-windows/git-sdk-64/commit/b1a28719ce97444f6c2b3e02d6eade75f94e9ccd

( But personal I use git-sdk x64 Update 20190627-031506

https://github.com/git-for-windows/git-sdk-64/commit/53940e317cee29f418eeaef041069f0f981a4a22

)

Unpack git-sdk-64-53940e317cee29f418eeaef041069f0f981a4a22.zip or git-sdk-b1a28719ce97444f6c2b3e02d6eade75f94e9ccd.zip to D:\git-sdk-64

Run ( one time) autorebase.bat ( it's emulation of run installer)

Run "Visual Studio 201X Command Prompt".

Run mingw64.exe for 64bit MinGW. ( Or run mingw32.exe for 32bit MinGW.)

jaykrell commented 3 years ago

Hints...that I have not quite finished...

Take recent updates to https://github.com/modula3/cm3

Note that msys, cygwin, mingw are all different things. msys and cygwin are Unix emulation layers, that you could run in. I don't think they are particularly interesting for Modula-3, except to run gcc. So then mingw is what I think you'd want. Gcc running in msys or cygwin, targeting mingw.

 cd scripts/python
 ./boot1.py amd64_nt  
 cd cm3-boot-amd64<tab>
 x86_64-w64-mingw32-g++ -c -g -xc++ *.c   (takes a while)  
 x86_64-w64-mingw32-g++ -g *.o cm3.d/*.c -o cm3.exe -liphlpapi -lws2_32 -lgdi32 -lcomctl32 (takes a while) 
 x86_64-w64-mingw32-g++ -g *.o mklib.d/*.c -o mklib.exe -liphlpapi -lws2_32 -lgdi32 -lcomctl32 (ditto) 
 # test it
 ./cm3.exe
 => it works ? Yes. (error about cannot find cm3.cfg is success)
 mkdir /cm3 
 mkdir /cm3/bin 
 mv cm3.exe /cm3/bin  
 mv mklib.exe /cm3/bin
 export PATH=/cm3/bin:$PATH 
 cd .. 
 ./boot2min.py 

except, that last line..just need some scripts and config work.

I guess we'll want it to be boot2min.py c amd64_mingw ? mingw and msys2 should be considered the same thing? i.e. the point is to use gcc.

I kinda think amd64_nt_gcc?

VictorMiasnikov commented 3 years ago

} boot2min.py c amd64_mingw

We can use amd64_mingw naming style as "initial point" and later switch to "amd64_nt_gcc" naming

} I kinda think amd64_nt_gcc?

It looks good idea: using triple CPU_OS_Compiler

I.e. we can use amd64_nt_gcc , amd64_nt_clang, amd64_nt_tcc, etc.

With "MinGW" amd64_nt_gcc looks good, but I am not sure that "Cygwin" is "NT OS family". Because de-facto "Cygwin" is "UNIX OS" may be best use amd64_cygwin_gcc

--

} mingw and msys2 should be considered the same thing? i.e. the point is to use gcc.

In my "installation of git-sdk-64-53940e317cee29f418eeaef041069f0f981a4a22.zip" inside "mingw" ( i.e. MINGW32 ):

$ gcc --version
gcc.exe (Rev3, Built by MSYS2 project) 9.1.0

and inside "msys2" we have another(!) version of gcc[.exe]

$ gcc --version
gcc (GCC) 7.4.0
VictorMiasnikov commented 3 years ago

J.K.} J.K.} Note that msys, cygwin, mingw are all different things. J.K.} msys and cygwin are Unix emulation layers, that you could run in. J.K.} I don't think they are particularly interesting for Modula-3, except to run gcc. J.K.} So then mingw is what I think you'd want. Gcc running in msys or cygwin, targeting mingw. J.K.} J.K.} . . . J.K.} J.K.} ./cm3.exe J.K.} => it works ? Yes. (error about cannot find cm3.cfg is success) J.K.}

} Gcc running in msys or cygwin, targeting mingw

It is possible, de-facto both variants are only one target AMD64_MINGW ( a-ka AMD64_NT_GCC) ( in this case cygwin environment used only for crosscompiling)

But we ( VVM and bapcyk) think about this:


 a)        AMD64_NT_GCC     Gcc running in msys           , targeting  mingw 64bit and 32bit_as_etalon
 b) AMD64_CYGWIN_GCC   Gcc running in          cygwin, targeting cygwin 64bit and 32bit_as_etalon
jaykrell commented 3 years ago

It is going to be AMD64_MINGW. It is true that Cygwin is "Unix". The Modula-3 system confuses host and target a lot, so the results are going to be a mess if you look closely, or just fine if you don't understand.

So what this means is, the config file will run x86_64-w64-mingw32-g++, because "x86_64-w64-mingw32" is the target. The host could be Linux, and the config doesn't really understand that. Such a mess.

Anyway it is almost working, if you ignore what a mess was already there. :(

VictorMiasnikov commented 3 years ago

} It is going to be AMD64_MINGW.

Ok: in CPU_OS_Compiler triple OS eq MINGW

--

Proposal: We should going "step by step". I.e. temporary forgot about "modern cm3-std-NT386GNU-d5.11.2.tar.gz"

Our "first step" is: upgrade Modula-3 for good working inside "mingw64.exe for 64bit MinGW".

jaykrell commented 3 years ago

Please try this: https://github.com/modula3/cm3/releases/tag/d5.11.2 And be sure you have a pretty current tree, i.e. https://github.com/modula3/cm3/commit/0350f81ffdf391924e56f36ae8c77858ff8cc2b5

VictorMiasnikov commented 3 years ago

By this:

==
To install the bootstrap:

tar xf cm3-boot-AMD64_MINGW-d5.11.2-20210623.tgz
cd cm3-boot-AMD64_MINGW-d5.11.2-20210623
# Optionally review the top of Makefile
make -j 
==

created "good working" cm3.exe:

==
D:\git-sdk-64\usr\local\cm3\bin>cm3.exe --version
Critical Mass Modula-3 version d5.11.2
  GitInfo: unknown
  last updated: 2021-06-15
  compiled: 2021-06-24 11:48:25
  configuration:
  host: AMD64_NT
  target:
==

Thanks!

VictorMiasnikov commented 3 years ago

But cm3.exe testing with boot2min.py and ( or) boot2.py:

$ python2 boot2.py AMD64_MINGW

===
--- building in AMD64_MINGW ---

ignoring ..\src\m3overrides

new source -> compiling Main.m3
****  PARALLEL BACK-END BUILD, M3_PARALLEL_BACK = 20
 -> linking m3cggen.exe
x86_64-w64-mingw32-g++ -o m3cggen  @C:\Users\ADMINI~1\AppData\Local\Temp\2\qk
x86_64-w64-mingw32-g++: error: D:/git-sdk-64/usr/local/cm3/pkgm3middleAMD64_MINGWm3middle.lib: No such file or directory
x86_64-w64-mingw32-g++: error: D:/git-sdk-64/usr/local/cm3/pkgsysutilsAMD64_MINGWsysutils.lib: No such file or directory
x86_64-w64-mingw32-g++: error: D:/git-sdk-64/usr/local/cm3/pkglibm3AMD64_MINGWm3.lib: No such file or directory
x86_64-w64-mingw32-g++: error: D:/git-sdk-64/usr/local/cm3/pkgm3coreAMD64_MINGWm3core.lib: No such file or directory
"D:/git-sdk-64/usr/local/cm3/bin\config\AMD64_MINGW", line 41: quake runtime error: exit 1: x86_64-w64-mingw32-g++ -o m3cggen  @C:\Users\User~1\AppData\Local\Temp\2\qk
===

2021-06-25: https://github.com/modula3/cm3/commit/844d639e14dd05b38c895e5607e6346f74af2357 affected too ;-(

VictorMiasnikov commented 3 years ago

See https://github.com/modula3/cm3/pull/705#issuecomment-870662590 or read "at place":

 -> linking m3cggen.exe
x86_64-w64-mingw32-g++ -o m3cggen  @C:\Users\ADMINI~1\AppData\Local\Temp\2\qk
x86_64-w64-mingw32-g++: error: D:/git-sdk-64/usr/local/cm3/pkgm3middleAMD64_MINGWm3middle.lib: No such file or directory
x86_64-w64-mingw32-g++: error: D:/git-sdk-64/usr/local/cm3/pkgsysutilsAMD64_MINGWsysutils.lib: No such file or directory
x86_64-w64-mingw32-g++: error: D:/git-sdk-64/usr/local/cm3/pkglibm3AMD64_MINGWm3.lib: No such file or directory
x86_64-w64-mingw32-g++: error: D:/git-sdk-64/usr/local/cm3/pkgm3coreAMD64_MINGWm3core.lib: No such file or directory
"D:/git-sdk-64/usr/local/cm3/bin\config\AMD64_MINGW", line 41: quake runtime error: exit 1: x86_64-w64-mingw32-g++ -o m3cggen  @C:\Users\ADMINI~1\AppData\Local\Temp\2\qk

If "say short" : nothing changed. But...

I think it is depends gcc version, etc:

 -> linking m3cggen.exe
x86_64-pc-msys-g++ -o m3cggen  @D:\tmp\qk
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: D:\usr\local\cm3\pkg\m3core\AMD64_MINGW\m3core.lib(RTProcessC.obj):/usr/local/cm3/src/m3-libs/m3core/AMD64_MINGW/..\src\runtime\common\RTProcessC.c:133: undefined reference to `ThreadPThread__AtForkPrepareOutsideFork'
collect2: error: ld returned 1 exit status
"D:\usr\local\cm3\bin\config\AMD64_MINGW", line 41: quake runtime error: exit 1: x86_64-pc-msys-g++ -o m3cggen  @D:\tmp\qk

P.S. x86_64-pc-msys-g++ used only as quick test

VictorMiasnikov commented 3 years ago

Results of testing x86_64-w64-mingw32 from \Files\Strawberry\c subdir of strawberry-perl-5.30.2.1-64bit.msi

$ x86_64-w64-mingw32-g++ --version
x86_64-w64-mingw32-g++.exe (x86_64-posix-seh, Built by strawberryperl.com project) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.

Before:

v MINGW64 /usr/local/cm3/m3-sys/mklib
$ cm3
--- building in AMD64_MINGW ---

ignoring ..\src\m3overrides

****  PARALLEL BACK-END BUILD, M3_PARALLEL_BACK = 20
 -> linking mklib.exe
x86_64-w64-mingw32-g++ -o mklib  @X:\ZZZZZ\Temp\2\qk
x86_64-w64-mingw32-g++: error: D:git-sdk-64usrlocalcm3pkgm3middleAMD64_MINGWm3middle.lib: No such file or directory
x86_64-w64-mingw32-g++: error: D:git-sdk-64usrlocalcm3pkgsysutilsAMD64_MINGWsysutils.lib: No such file or directory
x86_64-w64-mingw32-g++: error: D:git-sdk-64usrlocalcm3pkglibm3AMD64_MINGWm3.lib: No such file or directory
x86_64-w64-mingw32-g++: error: D:git-sdk-64usrlocalcm3pkgm3coreAMD64_MINGWm3core.lib: No such file or directory
"D:\git-sdk-64\usr\local\cm3\bin\config\AMD64_MINGW", line 41: quake runtime error: exit 1: x86_64-w64-mingw32-g++ -o mklib  @X:\ZZZZZ\Temp\2\qk

--procedure--  -line-  -file---
exec               --  <builtin>
m3_link            41  D:\git-sdk-64\usr\local\cm3\bin\config\AMD64_NT
Program            --  <builtin>
include_dir         7  D:\git-sdk-64\usr\local\cm3\m3-sys\mklib\src\m3makefile
                    4  D:\git-sdk-64\usr\local\cm3\m3-sys\mklib\AMD64_MINGW\m3make.args

Fatal Error: procedure "m3_link" defined in "D:\git-sdk-64\usr\local\cm3\bin\cm3.cfg" failed.

After manually edit "X:\ZZZZZ\Temp\2\qk" ( see later) we have good results:

v MINGW64 /usr/local/cm3/m3-sys/mklib/AMD64_MINGW
$ x86_64-w64-mingw32-g++ -o mklib  @qk_but_fixed_slash

v MINGW64 /usr/local/cm3/m3-sys/mklib/AMD64_MINGW
$ cm3 -ship
. => D:/git-sdk-64/usr/local/cm3/pkg/mklib/AMD64_MINGW
  .M3EXPORTS

See "fixes by manual" in qk_but_fixed_slash:

--- qk 000  Thu Jul 01 10:33:28 2021
+++ qk_but_fixed_slash  Thu Jul 01 17:25:56 2021
@@ -1,9 +1,9 @@
 _m3main.obj
 Main.mo
-D:\git-sdk-64\usr\local\cm3\pkg\m3middle\AMD64_MINGW\m3middle.lib
-D:\git-sdk-64\usr\local\cm3\pkg\sysutils\AMD64_MINGW\sysutils.lib
-D:\git-sdk-64\usr\local\cm3\pkg\libm3\AMD64_MINGW\m3.lib
-D:\git-sdk-64\usr\local\cm3\pkg\m3core\AMD64_MINGW\m3core.lib
+D:/git-sdk-64/usr/local/cm3/pkg/m3middle/AMD64_MINGW/m3middle.lib
+D:/git-sdk-64/usr/local/cm3/pkg/sysutils/AMD64_MINGW/sysutils.lib
+D:/git-sdk-64/usr/local/cm3/pkg/libm3/AMD64_MINGW/m3.lib
+D:/git-sdk-64/usr/local/cm3/pkg/m3core/AMD64_MINGW/m3core.lib
 -liphlpapi
 -lrpcrt4
 -lcomctl32

I.e. in autogenerated "qk" files we should have only "/" and avoid "\" ( in MINGW64 environment, of course )

jaykrell commented 3 years ago

It is actually an annoyingly tricky problem. The main problem is that cm3 confuses host and target all over the place. Worse, “Windows” is kinda a mixed up host itself, maybe sometimes requiring backward slashes, sometimes forward, sometimes either, often quoting rules with difficult to predict layers of application.

When I switched to all forward slashes, I think the problem was cmd requiring backward slashes in stdio redirection.

Like in PklFonts invocation.

It might work to double backslash.

Or avoid stdio redirection. Or replace exec with q_exec so we handle the redirection instead of cmd.

Anyway it is a big mess, but seems trivial from the outside.

VictorMiasnikov commented 3 years ago

Tested with https://github.com/modula3/cm3/commit/ab0accebe764ab62a2382e7345ac5d83bcd016ff (#721):


{{
**********************************************************************
** Visual Studio 2019 Any_Edt Command Prompt v16.6.0
** Copyright (c) 2020 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Program Files (x86)\Microsoft Visual Studio\2019\Any_Edt>d:

D:\>cd D:\git-sdk-64\

D:\git-sdk-64>mingw64.exe

D:\git-sdk-64>
}}
 +
{{
export PATH=/usr/local/cm3/bin:$PATH
cd /usr/local/cm3/src/scripts/python/
./boot1.py AMD64_MINGW c keep commands
}}
 +
{{
make -j
}}
 +
{{
$ python2 boot2min.py amd64_mingw
}}

...
 -> linking m3cggen.exe
x86_64-w64-mingw32-g++ -o m3cggen  @C:\Users\user~1\AppData\Local\Temp\2\qk
x86_64-w64-mingw32-g++: error: D:/git-sdk-64/usr/local/cm3/pkgm3middleAMD64_MINGW/m3middle.lib: No such file or directory
x86_64-w64-mingw32-g++: error: D:/git-sdk-64/usr/local/cm3/pkgsysutilsAMD64_MINGW/sysutils.lib: No such file or directory
x86_64-w64-mingw32-g++: error: D:/git-sdk-64/usr/local/cm3/pkglibm3AMD64_MINGW/m3.lib: No such file or directory
x86_64-w64-mingw32-g++: error: D:/git-sdk-64/usr/local/cm3/pkgm3coreAMD64_MINGW/m3core.lib: No such file or directory
"D:/git-sdk-64/usr/local/cm3/bin/config/AMD64_MINGW", line 41: quake runtime error: exit 1: x86_64-w64-mingw32-g++ -o m3cggen  @C:\Users\user~1\AppData\Local\Temp\2\qk

--procedure--  -line-  -file---
exec               --  <builtin>
m3_link            41  D:/git-sdk-64/usr/local/cm3/bin/config/AMD64_MINGW
Program            --  <builtin>
include_dir         7  D:\git-sdk-64\usr\local\cm3\src\m3-sys\m3cggen\src\m3makefile
                    8  D:\git-sdk-64\usr\local\cm3\src\m3-sys\m3cggen\AMD64_MINGW\m3make.args

Fatal Error: procedure "m3_link" defined in "D:/git-sdk-64/usr/local/cm3/bin\cm3.cfg" failed.
...
VictorMiasnikov commented 3 years ago

Please, see fix of 'last "\"' in https://github.com/modula3/cm3/pull/722

VictorMiasnikov commented 2 years ago

06.07.2021, 21:12, "Jay Krell" @.***>: Merged #722 into master.

 Thanks!

jaykrell commented 2 years ago

It works now? Close the issue? I would like to generate autoconf-based bootstrap. I had a successful little prototype, and the .cpp extensions help.

VictorMiasnikov commented 2 years ago

} It works now? Yes, it works with https://github.com/modula3/cm3/commit/7ea13c713c256d07d4703ed889a49bcea8cba6e5 and with https://github.com/modula3/cm3/commit/8a842be10f0e5d1f1acf73597d13765aea305573

Only with boot1.py + boot2min.py + boot2.py i.e. this python upgrade.py && python do-cm3-all.py realclean skipgcc && python do-cm3-all.py buildship does not work as need.

} Close the issue? I have some issues do not related MinGW: a) https://github.com/modula3/cm3/commit/f2c0ec19e0ac5742ea680d8d244e22c48f7a6b17#commitcomment-54082596 b) https://github.com/modula3/cm3/commit/8a842be10f0e5d1f1acf73597d13765aea305573#commitcomment-54082876

VictorMiasnikov commented 2 years ago

There are some related binary and boot files on https://github.com/VictorMiasnikov/cm3/releases/tag/d5.11.3_8a842be

https://github.com/VictorMiasnikov/cm3/releases/download/d5.11.3_8a842be/cm3-boot-AMD64_MINGW-d5.11.3-MINGW64.git-sdk-64@53940e3_and_.mingw-w64-x86_64-gcc-10.3.0-2.-2021-07-20_07-26.FIXed.by.VVM.20210803_14-02.non.Unicode.AMD64_MINGW.Target.cm3-8a842be.tar.xz

https://github.com/VictorMiasnikov/cm3/releases/download/d5.11.3_8a842be/cm3-min_by_boot-AMD64_MINGW-d5.11.3-MINGW64.git-sdk-64@53940e3_and_.mingw-w64-x86_64-gcc-10.3.0-2.-2021-07-20_07-26.FIXed.by.VVM.20210803_14-02.non.Unicode.AMD64_MINGW.Target.cm3-8a842be.7z

https://github.com/VictorMiasnikov/cm3/releases/download/d5.11.3_8a842be/cm3-min-AMD64_MINGW-d5.11.3-MINGW64.git-sdk-64@53940e3_and_.mingw-w64-x86_64-gcc-10.3.0-2.-2021-07-20_07-26.FIXed.by.VVM.20210803_14-02.non.Unicode.AMD64_MINGW.Target.cm3-8a842be10f0e5d1f1acf73597d13765aea305573.7z

https://github.com/VictorMiasnikov/cm3/releases/download/d5.11.3_8a842be/cm3-all-AMD64_MINGW-d5.11.3-MINGW64.git-sdk-64@53940e3_and_.mingw-w64-x86_64-gcc-10.3.0-2.-2021-07-20_07-26.FIXed.by.VVM.20210803_14-02.non.Unicode.AMD64_MINGW.Target.cm3-8a842be10f0e5d1f1acf73597d13765aea305573.7z

ghost commented 2 years ago

Thanks @VictorMiasnikov I've added a link to your builds on the releases page.

VictorMiasnikov commented 2 years ago

} Thanks for your updated Windows builds.

You are welcome!

} I've added a link to your builds on the releases page.

Thank You!

P.S. Someone can see related info , i.e. some ideas ( and Co) about CI/CD on page https://github.com/modula3/cm3/discussions/80#discussioncomment-1458598

VictorMiasnikov commented 2 years ago

New release:

https://github.com/VictorMiasnikov/cm3/releases/tag/d15.11.4_5.11.4-ZZYYXX-20211101_22-02_66914fc

for MinGW d15.11.4_5.11.4-ZZYYXX-20211101_22-02_66914fc

= = =

Critical Mass Modula-3 version d5.11.4
  GitInfo: /commit/66914fc7f5012c4b01a59d12d70e82125836356d
           /commits/heads/d15.11.4_5.11.4-ZZYYXX-20211101_22-02_66914fc
           remote: 
           revision: 66914fc7f5012c4b01a59d12d70e82125836356d
           branch: heads/d15.11.4_5.11.4-ZZYYXX-20211101_22-02_66914fc
  last updated: 2021-10-07
  compiled: 2021-11- 2 14:39:24

= = =


"cm3-boot-AMD64_MINGW-d5.11.4-MINGW64(git-sdk-64@53940e3_and_{{mingw-w64-x86_64-gcc-10.3.0-2}})-2021-11-01_22-02__FIXed__by__VVM__2021-11-02_14-16__16bit__Unicode__AMD64_MINGW__Target__cm3-66914fc.tar.xz"
"cm3-min-AMD64_MINGW-d5.11.4-MINGW64(git-sdk-64@53940e3_and_{{mingw-w64-x86_64-gcc-10.3.0-2}})-2021-11-01_22-02__FIXed__by__VVM__2021-11-02_14-16__16bit__Unicode__AMD64_MINGW__Target__cm3-66914fc.7z"
"cm3-min_by_boot-AMD64_MINGW-d5.11.4-MINGW64(git-sdk-64@53940e3_and_{{mingw-w64-x86_64-gcc-10.3.0-2}})-2021-11-01_22-02__FIXed__by__VVM__2021-11-02_14-16__16bit__Unicode__AMD64_MINGW__Target__cm3-66914fc.7z"
"cm3-min_by_boot2min-AMD64_MINGW-d5.11.4-MINGW64(git-sdk-64@53940e3_and_{{mingw-w64-x86_64-gcc-10.3.0-2}})-2021-11-01_22-02__FIXed__by__VVM__2021-11-02_14-16__16bit__Unicode__AMD64_MINGW__Target__cm3-66914fc.7z"
jaykrell commented 2 years ago

It works fine now right?

VictorMiasnikov commented 2 years ago

06.02.2022, 20:49, "Jay Krell" @.***>: It works fine now right?

With boot1.py + boot2.py method  - yes. But tested on 2 week old commit.

jaykrell commented 2 years ago

Probably . I don't test every commit against every system!


From: VictorMiasnikov @.> Sent: Monday, February 7, 2022 5:51 AM To: modula3/cm3 @.> Cc: Jay Krell @.>; Comment @.> Subject: Re: [modula3/cm3] Q: how to compile hello world with MinGW or Cygwin on Windows? (#692)

With boot1.py + boot2.py method - yes.But tested on 2 week old commit.06.02.2022, 20:49, "Jay Krell" @.***>: It works fine now right?

—Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmodula3%2Fcm3%2Fissues%2F692%23issuecomment-1031098283&data=04%7C01%7C%7Cf97e5a5e7c71481bc0bd08d9e9fdeca1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637798099080529792%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=j07aliwT0ae8VpWyMWkuycVIYOJCNRXGps%2FsHrms2%2B4%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAMPLEGD5CFD35ZZ5M3RGILUZ5MWXANCNFSM47AHRUOQ&data=04%7C01%7C%7Cf97e5a5e7c71481bc0bd08d9e9fdeca1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637798099080529792%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=xQjPjhU8XjrtUD1hbgDXnOvj3tNAP%2BIUl6yY7AwE4W0%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7Cf97e5a5e7c71481bc0bd08d9e9fdeca1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637798099080529792%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=DE2aQsdtCzvN2BRMVycEd91KyhuldvUdrhrDpZkPGAI%3D&reserved=0 or Androidhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7Cf97e5a5e7c71481bc0bd08d9e9fdeca1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637798099080529792%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Pfi40zVIsxhbex0uxgJlDbfsakn7mNpArzU0HKYm%2BEQ%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

VictorMiasnikov commented 2 years ago

I don't test every commit against every system

I'm too ... ;-(

P.S.

Last tested AMD64_NT, AMD64_MINGW , I386_NT are

1) cm3 d5.11.6-ZZYYXX-20220107_12-57 https://github.com/modula3/cm3/commit/66cdee8570338dd9492a6e15f456092682402265

2) cm3 d5.11.8-ZZYYXX-20220125_17-54 https://github.com/modula3/cm3/commit/3be819ed8e2fa60885aff0cb6278934a17b30702