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

Multiple issues with Windows "Getting Started" #1096

Open
SethMarshall opened this issue Oct 5, 2022 · 16 comments
Open

Multiple issues with Windows "Getting Started" #1096

SethMarshall opened this issue Oct 5, 2022 · 16 comments

Comments

@SethMarshall
Copy link

Attempting to follow the "Getting Started: Windows" instructions with Mingw, but running into the following issues:

pacman -S base-devel mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-toolchain

This above command gives the impression that it would install three packages automatically. Instead it brings up a menu of 19 separate installs! (I install them all to be on the safe side)

curl -LO https://github.com/modula3/cm3/releases/download/d5.11.4/cm3-dist-AMD64_LINUX-d5.11.4.tar.xz

This (above) command results in a certificate error. "Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate." However, even when telling curl to ignore certs, it still fails.

No matter I suppose, so I manually download and unzip cm3-dist-AMD64_NT-d5.11.4 then create and cd to directory build. I ensure that msys2 and CMake are already installed.

../cm3/scripts/concierge.py install --prefix /c/cm3

(I assume that's a type-o and should be "python3 ../cm3/scripts/concierge.py install --prefix /c/cm3"). Anyway, here is the error after that command churns for a bit:

CMake Error at bootstrap.cmake:17 (find_library):
Could not find COMCTL32 using the following names: comctl32
Call Stack (most recent call first):
CMakeLists.txt:7 (include)

_Traceback (most recent call last):
File "c:\Modula\cm3\scripts\concierge.py", line 1816, in
Concierge().main()
File "c:\Modula\cm3\scripts\concierge.py", line 1750, in main
command.execute()
File "c:\Modula\cm3\scripts\concierge.py", line 1490, in execute
self.bootstrap()
File "c:\Modula\cm3\scripts\concierge.py", line 1515, in bootstrap
self._build_with_cmake(bootstrap_dir, build_dir=os.getcwd())
File "c:\Modula\cm3\scripts\concierge.py", line 1559, in build_with_cmake
proc.check_returncode()
File "C:\Python310\lib\subprocess.py", line 456, in check_returncode
raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '['cmake', '-S', 'C:\Modula\cm3\bootstrap', '-B', 'c:\Modula\build', '-DCMAKE_INSTALL_PREFIX=C:\c\cm3', '-A', 'x64']' returned non-zero exit status 1.

Here are excerpts from the CMakeError file:

Microsoft (R) C/C++ Optimizing Compiler Version 19.32.31332 for x64

src.c

C:\Modula\build\CMakeFiles\CMakeTmp\src.c(1,10): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [C:\Modula\build\CMakeFiles\CMakeTmp\cmTC_85e5e.vcxproj]_

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: C:/Modula/build/CMakeFiles/CMakeTmp

Any tips?

@VictorMiasnikov
Copy link
Contributor

VictorMiasnikov commented Oct 5, 2022

(

curl -LO https://github.com/modula3/cm3/releases/download/d5.11.4/cm3-dist-AMD64_LINUX-d5.11.4.tar.xz

This (above) command results in a certificate error. "Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate." However, even when telling curl to ignore certs, it still fails.

URL is good

You can try use non-SSL var:
http://github.com/modula3/cm3/releases/download/d5.11.4/cm3-dist-AMD64_LINUX-d5.11.4.tar.xz

)

} cm3-dist-AMD64_LINUX-d5.11.4.tar.xz

AMD64_LINUX -- this file for OS Linux

@VictorMiasnikov
Copy link
Contributor

VictorMiasnikov commented Oct 5, 2022

I any key, we have 1 . . 5 latest Issues about "cm3 on Windows" . . . Please, read they

cm3 5.11.9 placed here:
= =
https://github.com/VictorMiasnikov/cm3/releases/tag/d5.11.9-ZZYYXX-20220208_13-48
= =

Please download this file

https://github.com/VictorMiasnikov/cm3/releases/download/d5.11.9-ZZYYXX-20220208_13-48/cm3-all-AMD64_NT-d5.11.9-VC142.2019.-2022-02-08_13-48__FIXed__by__VVM__2022-04-26_17-22__16bit__Unicode__AMD64_NT__Target__cm3-69f22c9.7z

unpack to "d:\cm3" or "c:\cm3";
add "d:\cm3" or "c:\cm3" to PATH

First run run "x64 Native Tools Command Prompt" and run cm3 and "cm3 -ship" inside this "command promt"

@VictorMiasnikov
Copy link
Contributor

VictorMiasnikov commented Oct 5, 2022

P.S.

( . . .)
No matter I suppose, so I manually download and unzip cm3-dist-AMD64_NT-d5.11.4 then create and cd to directory build. I ensure that msys2 and CMake are already installed.

../cm3/scripts/concierge.py install --prefix /c/cm3

(I assume that's a type-o and should be "python3 ../cm3/scripts/concierge.py install --prefix /c/cm3"). Anyway, here is the error after that command churns for a bit:

CMake Error at bootstrap.cmake:17 (find_library): Could not find COMCTL32 using the following names: comctl32 Call Stack (most recent call first): CMakeLists.txt:7 (include)

_Traceback (most recent call last): File "c:\Modula\cm3\scripts\concierge.py", line 1816, in Concierge().main() File "c:\Modula\cm3\scripts\concierge.py", line 1750, in main command.execute() File "c:\Modula\cm3\scripts\concierge.py", line 1490, in execute self.bootstrap() File "c:\Modula\cm3\scripts\concierge.py", line 1515, in bootstrap self._build_with_cmake(bootstrap_dir, build_dir=os.getcwd()) File "c:\Modula\cm3\scripts\concierge.py", line 1559, in build_with_cmake proc.check_returncode() File "C:\Python310\lib\subprocess.py", line 456, in check_returncode raise CalledProcessError(self.returncode, self.args, self.stdout, subprocess.CalledProcessError: Command '['cmake', '-S', 'C:\Modula\cm3\bootstrap', '-B', 'c:\Modula\build', '-DCMAKE_INSTALL_PREFIX=C:\c\cm3', '-A', 'x64']' returned non-zero exit status 1.

Here are excerpts from the CMakeError file:

Microsoft (R) C/C++ Optimizing Compiler Version 19.32.31332 for x64

src.c

C:\Modula\build\CMakeFiles\CMakeTmp\src.c(1,10): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [C:\Modula\build\CMakeFiles\CMakeTmp\cmTC_85e5e.vcxproj]_

Determining if the function pthread_create exists in the pthreads failed with the following output: Change Dir: C:/Modula/build/CMakeFiles/CMakeTmp

Any tips?

Are You do this step from Wiki?
= =
for 64-bit Windows (AMD64_NT), run x64 Native Tools Command Prompt.
= =

@SethMarshall
Copy link
Author

Thank you for the pointers. Here's what I have so far:

I downloaded and unzipped the file you mentioned to c:\cm3. So now the directory contents I have are...

c:\cm3\bin
c:\cm3\lib
c:\cm3\license
c:\cm3\man
c:\cm3\package

(I actually had to add c:\cm3\bin to PATH). Now I open "x64 Native Tools prompt for VS 2022" cd to c:\cm3 and run cm3
Here is the error message:

--- building in AMD64_NT --

"c:\cm3\AMD64_NT\m3make.args", line 8: quake runtime error: wrong number of parameters passed to procedure import_lib (expected 2, received 1)

--procedure-- -line- -file---
8 c:\cm3\AMD64_NT\m3make.args
8 c:\cm3\AMD64_NT\m3make.args

Fatal Error: package build failed

Please download this file

https://github.com/VictorMiasnikov/cm3/releases/download/d5.11.9-ZZYYXX-20220208_13-48/cm3-all-AMD64_NT-d5.11.9-VC142.2019.-2022-02-08_13-48__FIXed__by__VVM__2022-04-26_17-22__16bit__Unicode__AMD64_NT__Target__cm3-69f22c9.7z

unpack to "d:\cm3" or "c:\cm3"; add "d:\cm3" or "c:\cm3" to PATH

First run run "x64 Native Tools Command Prompt" and run cm3 and "cm3 -ship" inside this "command promt"

@VictorMiasnikov
Copy link
Contributor

Thank you for the pointers. Here's what I have so far:

I downloaded and unzipped the file you mentioned to c:\cm3. So now the directory contents I have are...

c:\cm3\bin c:\cm3\lib c:\cm3\license c:\cm3\man c:\cm3\package

(I actually had to add c:\cm3\bin to PATH). Now I open "x64 Native Tools prompt for VS 2022" cd to c:\cm3 and run cm3

And at this moment run this, please:
= = =
d:
D:\cm3\examples\hello
= = =

and run "cm3" after change directory

Here is the error message:

--- building in AMD64_NT --

"c:\cm3\AMD64_NT\m3make.args", line 8: quake runtime error: wrong number of parameters passed to procedure import_lib (expected 2, received 1)

--procedure-- -line- -file--- 8 c:\cm3\AMD64_NT\m3make.args 8 c:\cm3\AMD64_NT\m3make.args

Fatal Error: package build failed

Please download this file
https://github.com/VictorMiasnikov/cm3/releases/download/d5.11.9-ZZYYXX-20220208_13-48/cm3-all-AMD64_NT-d5.11.9-VC142.2019.-2022-02-08_13-48__FIXed__by__VVM__2022-04-26_17-22__16bit__Unicode__AMD64_NT__Target__cm3-69f22c9.7z
unpack to "d:\cm3" or "c:\cm3"; add "d:\cm3" or "c:\cm3" to PATH
First run run "x64 Native Tools Command Prompt" and run cm3 and "cm3 -ship" inside this "command promt"

@SethMarshall
Copy link
Author

Sorry, not sure I follow. The zipped file you advised me to download contains no folder "examples" and no file "hello" when unzipped.

I take it you mean that I should clone the repo in another directory and try the compiler there? I do have a clone of the repo on my desktop. When I cd into /examples/hello inside it and run cm3 here are the results:

--- building in AMD64_NT ---

new source -> compiling Hello.m3
PARALLEL BACK-END BUILD, M3_PARALLEL_BACK = 20
Hello.m3.cpp

-> linking hello.exe
_m3main.cpp
Microsoft (R) Incremental Linker Version 14.32.31332.0
Copyright (C) Microsoft Corporation. All rights reserved.

-out:hello.exe
-subsystem:console
-entry:mainCRTStartup
-nodefaultlib
-debug
-incremental:no
-opt:ref
_m3main.obj
Hello.mo
C:\cm3\pkg\libm3\AMD64_NT\m3.lib
C:\cm3\pkg\m3core\AMD64_NT\m3core.lib
iphlpapi.lib
rpcrt4.lib
winspool.lib
comctl32.lib
ws2_32.lib
comdlg32.lib
netapi32.lib
gdi32.lib
user32.lib
advapi32.lib
kernel32.lib
msvcrt.lib
vcruntime.lib
ucrt.lib
C:\cm3\bin..\lib\hand.obj
C:\cm3\bin..\lib\WinConstants.obj
C:\cm3\bin..\lib\Uconstants.obj

Thank you for the pointers. Here's what I have so far:
I downloaded and unzipped the file you mentioned to c:\cm3. So now the directory contents I have are...
c:\cm3\bin c:\cm3\lib c:\cm3\license c:\cm3\man c:\cm3\package
(I actually had to add c:\cm3\bin to PATH). Now I open "x64 Native Tools prompt for VS 2022" cd to c:\cm3 and run cm3

And at this moment run this, please: = = = d: D:\cm3\examples\hello = = =

and run "cm3" after change directory

@VictorMiasnikov
Copy link
Contributor

Sorry, not sure I follow. The zipped file you advised me to download contains no folder "examples" and no file "hello" when unzipped.

I take it you mean that I should clone the repo in another directory and try the compiler there? I do have a clone of the repo on my desktop. When I cd into /examples/hello inside it and run cm3 here are the results:

--- building in AMD64_NT ---

new source -> compiling Hello.m3 PARALLEL BACK-END BUILD, M3_PARALLEL_BACK = 20 Hello.m3.cpp -> linking hello.exe _m3main.cpp Microsoft (R) Incremental Linker Version 14.32.31332.0 Copyright (C) Microsoft Corporation. All rights reserved.

-out:hello.exe -subsystem:console -entry:mainCRTStartup -nodefaultlib -debug -incremental:no -opt:ref _m3main.obj Hello.mo C:\cm3\pkg\libm3\AMD64_NT\m3.lib C:\cm3\pkg\m3core\AMD64_NT\m3core.lib iphlpapi.lib rpcrt4.lib winspool.lib comctl32.lib ws2_32.lib comdlg32.lib netapi32.lib gdi32.lib user32.lib advapi32.lib kernel32.lib msvcrt.lib vcruntime.lib ucrt.lib C:\cm3\bin..\lib\hand.obj C:\cm3\bin..\lib\WinConstants.obj C:\cm3\bin..\lib\Uconstants.obj

Thank you for the pointers. Here's what I have so far:
I downloaded and unzipped the file you mentioned to c:\cm3. So now the directory contents I have are...
c:\cm3\bin c:\cm3\lib c:\cm3\license c:\cm3\man c:\cm3\package
(I actually had to add c:\cm3\bin to PATH). Now I open "x64 Native Tools prompt for VS 2022" cd to c:\cm3 and run cm3

And at this moment run this, please: = = = d: D:\cm3\examples\hello = = =
and run "cm3" after change directory

Yes, You do "all as need".

And there is Hello.exe inside subfolder AMD64_NT

@SethMarshall
Copy link
Author

Thank you, sir. I was able to successfully compile and execute my own "Hello World" project (including with an m3makefile to import the standard library). Very cool.

Sorry, not sure I follow. The zipped file you advised me to download contains no folder "examples" and no file "hello" when unzipped.
I take it you mean that I should clone the repo in another directory and try the compiler there? I do have a clone of the repo on my desktop. When I cd into /examples/hello inside it and run cm3 here are the results:
--- building in AMD64_NT ---
new source -> compiling Hello.m3 PARALLEL BACK-END BUILD, M3_PARALLEL_BACK = 20 Hello.m3.cpp -> linking hello.exe _m3main.cpp Microsoft (R) Incremental Linker Version 14.32.31332.0 Copyright (C) Microsoft Corporation. All rights reserved.
-out:hello.exe -subsystem:console -entry:mainCRTStartup -nodefaultlib -debug -incremental:no -opt:ref _m3main.obj Hello.mo C:\cm3\pkg\libm3\AMD64_NT\m3.lib C:\cm3\pkg\m3core\AMD64_NT\m3core.lib iphlpapi.lib rpcrt4.lib winspool.lib comctl32.lib ws2_32.lib comdlg32.lib netapi32.lib gdi32.lib user32.lib advapi32.lib kernel32.lib msvcrt.lib vcruntime.lib ucrt.lib C:\cm3\bin..\lib\hand.obj C:\cm3\bin..\lib\WinConstants.obj C:\cm3\bin..\lib\Uconstants.obj

Thank you for the pointers. Here's what I have so far:
I downloaded and unzipped the file you mentioned to c:\cm3. So now the directory contents I have are...
c:\cm3\bin c:\cm3\lib c:\cm3\license c:\cm3\man c:\cm3\package
(I actually had to add c:\cm3\bin to PATH). Now I open "x64 Native Tools prompt for VS 2022" cd to c:\cm3 and run cm3

And at this moment run this, please: = = = d: D:\cm3\examples\hello = = =
and run "cm3" after change directory

Yes, You do "all as need".

And there is Hello.exe inside subfolder AMD64_NT

@VictorMiasnikov
Copy link
Contributor

VictorMiasnikov commented Oct 5, 2022

And at this moment run this, please:
= = =
d:
D:\cm3\examples\hello
= = =
and run "cm3" after change directory

Yes, You do "all as need".
And there is Hello.exe inside subfolder AMD64_NT

Thank you, sir.

You are welcome!

I was able to successfully compile and execute my own "Hello World" project (including with an m3makefile to import the standard library). Very cool.

Yes, I think so: cm3 "m3makefile style" of compiling is very nice

@SethMarshall
Copy link
Author

SethMarshall commented Oct 16, 2022

Ok. Perhaps it would be worth adding these additional steps to the "Getting Started" then?

The OP doesn't know how to use MSYS2. First thing after you install it is to update it with pacman -Syu since it's rolling release. It take two times running pacman -Syu (and one restart of the MSYS2 shell) to done the update.

At no point whatsoever did I "whine" about anything. I'll graciously assume your choice of words is due to non-native English, because otherwise what you said is disrespectful and needlessly antagonistic.

Before whining please take time to learn the thing. Sincere.

@VictorMiasnikov
Copy link
Contributor

VictorMiasnikov commented Oct 16, 2022 via email

@SethMarshall
Copy link
Author

Ah yes, how unreasonable of me to suggest amending what is already a very terse guide with any indication that there are quirks to getting MSYS2 configured.

Ok. Perhaps it would be worth adding these additional steps to the "Getting Started" then?

No. Getting MSYS2 up and ready is of your part. In no way we have any responsibility to teach you how to use MSYS2.

Your contempt towards users politely asking for assistance is quite remarkable. Actually, it doesn't look like you're even a contributor to this project, so who is this we you think you're speaking for? At any rate, I have no intention of engaging your hostility any further, so we're done here.

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

3 participants
@VictorMiasnikov @SethMarshall and others