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

tools-windows-msvc: Trying to run as instruction but compilation doesn't work #22

Closed
DartViet opened this issue Oct 6, 2022 · 4 comments

Comments

@DartViet
Copy link

DartViet commented Oct 6, 2022

I already in install clang in Msys2 and do as instruction, but so far still got this:

It's just a Hello World file.

is there anything I should add to make this works ?

image

@DartViet DartViet changed the title Trying to run as instruction but compilation doesn't work tools-windows-msvc: Trying to run as instruction but compilation doesn't work Oct 6, 2022
@triplef
Copy link
Member

triplef commented Oct 10, 2022

Hi, did you launch the MSYS2 shell from a Visual Studio environment like the "x64 Native Tools Command Prompt"?

@DartViet
Copy link
Author

Yeah, I got this:

`
C:\Users\MyOwnPC\Documents\Projects\ObjectiveC1>clang-cl -I C:\GNUstep\x64\Debug\include -fobjc-runtime=gnustep-2.0 -Xclang -fexceptions -Xclang -fobjc-exceptions -fblocks -DGNUSTEP -DGNUSTEP_WITH_DLL -DGNUSTEP_RUNTIME=1 -D_NONFRAGILE_ABI=1 -D_NATIVE_OBJC_EXCEPTIONS /MDd /c main1.m
Assertion failed: cast(getOperand(1)->getType()) ->isOpaqueOrPointeeTypeMatches(getOperand(0)->getType()) && "Ptr must be a pointer to Val type!", file D:\a\1\s\llvm-project\llvm\lib\IR\Instructions.cpp, line 1493
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang-cl -I C:\GNUstep\x64\Debug\include -fobjc-runtime=gnustep-2.0 -Xclang -fexceptions -Xclang -fobjc-exceptions -fblocks -DGNUSTEP -DGNUSTEP_WITH_DLL -DGNUSTEP_RUNTIME=1 -D_NONFRAGILE_ABI=1 -D_NATIVE_OBJC_EXCEPTIONS /MDd /c main1.m

  1.  <eof> parser at end of file
    
  2.  Per-file LLVM IR generation
    

#0 0x00007ff7713eff35 (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x165ff35)
#1 0x00007ff955521881 (C:\Windows\System32\ucrtbase.dll+0x71881)
#2 0x00007ff955522851 (C:\Windows\System32\ucrtbase.dll+0x72851)
#3 0x00007ff95552426e (C:\Windows\System32\ucrtbase.dll+0x7426e)
#4 0x00007ff955524165 (C:\Windows\System32\ucrtbase.dll+0x74165)
#5 0x00007ff9555244f1 (C:\Windows\System32\ucrtbase.dll+0x744f1)
#6 0x00007ff770d1d7b3 (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0xf8d7b3)
#7 0x00007ff770d1c94f (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0xf8c94f)
#8 0x00007ff770d1c80e (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0xf8c80e)
#9 0x00007ff77092bc2d (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0xb9bc2d)
#10 0x00007ff7718bf146 (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x1b2f146)
#11 0x00007ff77170592d (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x197592d)
#12 0x00007ff773ce8e67 (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x3f58e67)
#13 0x00007ff773ce531e (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x3f5531e)
#14 0x00007ff772b206d4 (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x2d906d4)
#15 0x00007ff771d4f005 (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x1fbf005)
#16 0x00007ff773ce431d (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x3f5431d)
#17 0x00007ff771d4ee18 (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x1fbee18)
#18 0x00007ff771d11f0c (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x1f81f0c)
#19 0x00007ff771dc9a89 (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x2039a89)
#20 0x00007ff76fe14a04 (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x84a04)
#21 0x00007ff76fe0f4c6 (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x7f4c6)
#22 0x00007ff771c359d7 (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x1ea59d7)
#23 0x00007ff7713ce65f (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x163e65f)
#24 0x00007ff771c35f8a (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x1ea5f8a)
#25 0x00007ff771bb3ff9 (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x1e23ff9)
#26 0x00007ff771bb4221 (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x1e24221)
#27 0x00007ff771b9cc7c (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x1e0cc7c)
#28 0x00007ff76fe11984 (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x81984)
#29 0x00007ff773a32ec0 (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\clang-cl.exe+0x3ca2ec0)
#30 0x00007ff9558a7034 (C:\Windows\System32\KERNEL32.DLL+0x17034)
#31 0x00007ff9575a26a1 (C:\Windows\SYSTEM32\ntdll.dll+0x526a1)
clang-cl: error: clang frontend command failed due to signal (use -v to see invocation)
compnerd.org clang version 14.0.0
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin
clang-cl: note: diagnostic msg:


PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-cl: note: diagnostic msg: C:\Users\MyOwnPC\AppData\Local\Temp\main1-1b73e0.m
clang-cl: note: diagnostic msg: C:\Users\MyOwnPC\AppData\Local\Temp\main1-1b73e0.sh
clang-cl: note: diagnostic msg:


`

@triplef
Copy link
Member

triplef commented Oct 10, 2022

This looks like one of the issues from Clang 14 documented here:
https://github.com/gnustep/tools-windows-msvc#status-and-known-issues

Please try with Clang 13 e.g. the one bundled with Visual Studio 2019.

@triplef
Copy link
Member

triplef commented Nov 23, 2022

Feel free to re-open this if you’re still running into issues.

@triplef triplef closed this as not planned Won't fix, can't repro, duplicate, stale Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants