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

cpp20coroutinefill.h(286): error C3861: '__builtin_*': identifier not found #8

Closed
therealdreg opened this issue Jul 10, 2023 · 20 comments

Comments

@therealdreg
Copy link

I want to contribute to this project but I have some problems:

Build started...
1>------ Build started: Project: BugChecker, Configuration: Debug x64 ------
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v150\Platforms\x64\PlatformToolsets\v141_xp\Toolset.targets(39,5): warning MSB8051: Support for targeting Windows XP is deprecated and will not be present in future releases of Visual Studio. Please see https://go.microsoft.com/fwlink/?linkid=2023588 for more information.
1>Assembling AsmForAmd64.asm...
1>Allocator.cpp
1>c:\users\dreg\desktop\bugchecker\bugchecker\cpp20coroutinefill.h(138): error C3861: '__builtin_coro_done': identifier not found
1>c:\users\dreg\desktop\bugchecker\bugchecker\cpp20coroutinefill.h(142): error C3861: '__builtin_coro_resume': identifier not found
1>c:\users\dreg\desktop\bugchecker\bugchecker\cpp20coroutinefill.h(146): error C3861: '__builtin_coro_resume': identifier not found
1>c:\users\dreg\desktop\bugchecker\bugchecker\cpp20coroutinefill.h(150): error C3861: '__builtin_coro_destroy': identifier not found
1>c:\users\dreg\desktop\bugchecker\bugchecker\cpp20coroutinefill.h(296): error C3861: '__builtin_coro_noop': identifier not found
1>c:\users\dreg\desktop\bugchecker\bugchecker\cpp20coroutinefill.h(286): error C3861: '__builtin_coro_promise': identifier not found
1>BcCoroutine.cpp
1>c:\users\dreg\desktop\bugchecker\bugchecker\cpp20coroutinefill.h(138): error C3861: '__builtin_coro_done': identifier not found
.....
1>X86Step.cpp
1>Generating Code...
1>Done building project "BugChecker.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Microsoft Visual Studio Community 2019
Version 16.11.27
VisualStudio.16.Release/16.11.27+33801.447
Microsoft .NET Framework
Version 4.8.09032

Installed Version: Community

Visual C++ 2019   00435-00000-00000-AA111
Microsoft Visual C++ 2019

ASP.NET and Web Tools 2019   16.11.115.10959
ASP.NET and Web Tools 2019

C# Tools   3.11.0-4.22108.8+d9bef045c4362fbcab27ef35daec4e95c8ff47e1
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

IntelliCode Extension   1.0
IntelliCode Visual Studio Extension Detailed Info

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

NuGet Package Manager   5.11.4
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

Test Adapter for Boost.Test   1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test.  The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test   1.0
Enables Visual Studio's testing tools with unit tests written for Google Test.  The use terms and Third Party Notices are available in the extension installation directory.

TypeScript Tools   16.0.30526.2002
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   3.11.0-4.22108.8+d9bef045c4362fbcab27ef35daec4e95c8ff47e1
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for CMake   1.0
Visual Studio Tools for CMake
@vitoplantamura
Copy link
Owner

vitoplantamura commented Jul 10, 2023 via email

@therealdreg
Copy link
Author

I am using ISO C++ Latest Draft Standard (/std:c++latest)

c++

projectset

@therealdreg
Copy link
Author

therealdreg commented Jul 10, 2023

I am also have problems with dependencies, @vitoplantamura can you add more details about how to compile all please?

@vitoplantamura
Copy link
Owner

vitoplantamura commented Jul 10, 2023 via email

@therealdreg
Copy link
Author

therealdreg commented Jul 11, 2023

I have the same problem:

builderror.txt

same1

same2

@vitoplantamura
Copy link
Owner

vitoplantamura commented Jul 11, 2023 via email

@therealdreg
Copy link
Author

dont works :(

@vitoplantamura
Copy link
Owner

vitoplantamura commented Jul 11, 2023 via email

@therealdreg
Copy link
Author

therealdreg commented Jul 11, 2023

I have the sample problems, steps:

  1. install a new windows 10 VM machine
  2. Install windows visual studio 2019 enterprise
Microsoft Visual Studio Enterprise 2019
Version 16.4.0
VisualStudio.16.Release/16.4.0+29519.181
Microsoft .NET Framework
Version 4.8.04084

Installed Version: Enterprise

Visual C++ 2019   00435-60000-00000-AA740
Microsoft Visual C++ 2019

ASP.NET and Web Tools 2019   16.4.457.38025
ASP.NET and Web Tools 2019

C# Tools   3.4.0-beta4-19569-03+82f2e2541478e239dc4b04f231e90dc2b3dcb422
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

IntelliCode Extension   1.0
IntelliCode Visual Studio Extension Detailed Info

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

NuGet Package Manager   5.4.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

Test Adapter for Boost.Test   1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test.  The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test   1.0
Enables Visual Studio's testing tools with unit tests written for Google Test.  The use terms and Third Party Notices are available in the extension installation directory.

Visual Basic Tools   3.4.0-beta4-19569-03+82f2e2541478e239dc4b04f231e90dc2b3dcb422
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for CMake   1.0
Visual Studio Tools for CMake

Visual Studio Tools for CMake   1.0
Visual Studio Tools for CMake 7

I install C++ dev env and:

pack

  1. git clone current master

  2. open vc proj

  3. select Release x64

  4. Build All

@vitoplantamura & @Luca1991 can you help me?

c++ std:

cstd

@zwclose
Copy link

zwclose commented Jul 11, 2023

Hey @therealdreg

I managed to move BC to VS2019. I had an issue with coroutines too but solved it eventually. It would be easier if you gist your .vcproj* files. I can publish mine too, just have to get rid of some abs paths I used...

@Luca1991
Copy link
Contributor

Luca1991 commented Jul 11, 2023

Hello guys,
@therealdreg I clearly remember having some issues the first time I tried building BC.
I'm not in from of my dev machine, so I can't check right now, but IIRC:

  • I was not able to use the latest version of VS due to coroutines issues, so I probably used VS2017
  • I definitely used the community edition
  • The only configuration that was working out of the box for me was Release|x64 (building Debug always failed for me)
  • I remember that I spent some time in the VS installer looking for the deprecated C++ Windows XP support, and eventually installed more than what was required (almost certainly).

If you can, try building BC in VS2017. Please tell me know if this still fails and I'll check my VS configuration (tomorrow).

Thanks,
Luca

EDIT: @zwclose if you managed to sucessfully move BC to VS2019, please consider contributing a PR. I think it would be good to have support for a recent version of VS (if Vito is ok with that of course)

@therealdreg
Copy link
Author

therealdreg commented Jul 12, 2023

here my vmware machine with windows 10 + winddk GRMWDK_EN_7600_1+ visual studio 2019 enterprise + bc

(70 GB)

https://drive.google.com/file/d/1bX2rQvh9yuRjvQOm2wdTSxfwm6Wnz6d3/view?usp=sharing

can you help me with this env?

I need compile all (including deps) for x64

@vitoplantamura
Copy link
Owner

vitoplantamura commented Jul 12, 2023 via email

@vitoplantamura
Copy link
Owner

hi,

this is a step-by-step guide to setup a build environment for BugChecker. There is no trace of the coroutine problem. My test machine is a fresh Win11 VM.

Only the Release configurations are supported (x86 and x64).

NOTE#1: BugChecker builds natively on Visual Studio 2019 (i.e. it was developed on Visual Studio 2019).
NOTE#2: there is no need to modify the VS Project Settings of any project in the repo (for example all the paths in the vcxproj files are always relative).
NOTE#3: as explained in the main README.md file, clone the repo somewhere in the C: drive (i.e. BugChecker and WDK7.1 must be on the same drive).

  1. Install VS2019 (whichever edition, Community works) with these additional components:
  • Workloads > Desktop development with C++
  • Individual components > C++ Windows XP Support for VS 2017 (v141) tools [Deprecated]
  1. Install the WDK 7.1.0.7600 in its default location (C:\WinDDK\7600.16385.1). Select only the "Build Environments" feature.

  2. In order to compile Zydis, go to https://my.visualstudio.com/Downloads and search for "sdk 1903" and "wdk 1903": download and install both, in that order.

That's it.

Before building BugChecker, open the Zydis solution (BugChecker\dependencies\zydis\msvc\Zydis.sln) and build: Zycore, Configuration: Release Kernel Win32; Zycore, Configuration: Release Kernel x64; Zydis, Configuration: Release Kernel Win32; Zydis, Configuration: Release Kernel x64.

Vito

@therealdreg
Copy link
Author

these steps dont works for me, I made this again and I have the same errors :(

@therealdreg
Copy link
Author

4
3
2
1

@Luca1991
Copy link
Contributor

Luca1991 commented Jul 12, 2023

Ok I had a look at my windows dev machine.
I was wrong: I indeed used VS2019 (Community Edition) to build BC. The coroutines problem is probably related to VS2022 (but please don't quote me on that because I can't remember).
I remember that I had some troubles building Zydis, but nothing too serious and I can send you my precompiled bin if needed (make sure you have the correct sdk/wdk installed).

@zwclose
Copy link

zwclose commented Jul 12, 2023

@Luca1991 Yeah, I will publish my solution/project soon.

@therealdreg
Copy link
Author

@Luca1991 Yeah, I will publish my solution/project soon.

yes please I want make a PR with new features :D

btw, @vitoplantamura @zwclose & @Luca1991 thx for your help with this pain hehe

@therealdreg
Copy link
Author

After fighting with retargets, repair some errors and waste a lot of time... it works

retarg

I think we should provide a development environment out of the box. This is necessary to attract new developers.

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