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

EASTL failed with error C2039 , C2065 when build with default by msvc on Windows #480

Open
nnfdnkns opened this issue Aug 16, 2022 · 3 comments

Comments

@nnfdnkns
Copy link

nnfdnkns commented Aug 16, 2022

Hi all,

EASTL failed with error C2039 , C2065 when build with default by msvc on Windows.Could you please help take a look at this?

You can repro this issue as the steps below:
1.git clone https://github.com/electronicarts/EASTL F:\gitP\electronicarts\EASTL
2.cd F:\gitP\electronicarts\EASTL\build_x86
3.cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DEASTL_BUILD_TESTS:BOOL=ON -DEASTL_BUILD_BENCHMARK:BOOL=OFF .. 2>&1
4.set CL=%CL% /Zc:static_assert-
5. msbuild /m /p:Platform=Win32 /p:Configuration=Release EASTL.sln /t:Rebuild 2>&1

Error info:
F:\gitP\electronicarts\EASTL\include\EASTL/numeric_limits.h(1684,20): error C2039: '_LDenorm': is not a member of '`global namespace'' [F:\gitP\electronicarts\EASTL\build_x86\EASTL.vcxproj]
F:\gitP\electronicarts\EASTL\include\EASTL/numeric_limits.h(1684,1): error C2065: '_LDenorm': undeclared identifier [F:\gitP\electronicarts\EASTL\build_x86\EASTL.vcxproj]

log
build (2).log

@grojo-ea
Copy link
Contributor

Hello @nnfdnkns,

Thanks for the report. It seems like EAThread has some issues building for Win32 that we need to resolve to actually build EASTL as you describe, but after I hacked around EAThread a bit I was able to compile fine for Win32 on VS2019.

What you describe sounds a lot like what #474 was trying to resolve. I wonder if there's something we're doing incorrectly there.

Can you share the output of running cl /Bv on your system as described here to get some details on your toolchain?

In my system I can see all the variable declarations you're missing in C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\ymath.h. Do you have an equivalent file under your VS installation?

These variables have been removed in a more recent version of MSVC's STL which I believe hasn't shipped, so I'm surprised you're hitting this. The newer version is supposed to be detected by the #if defined(_MSVC_STL_UPDATE) && _MSVC_STL_UPDATE >= 202206L in our EASTL\numeric_limits.h.

@QuellaZhang
Copy link

QuellaZhang commented Aug 25, 2022

@grojo-ea Thanks for your quick reply. I have confirmed that this issue has been fixed after we updated the EASTL sha.

But now we still have other same problems as #371. This issue only occurs on x86 bit and we have patched it to unblock testing. Can you help fix it? Thanks.

I can repro the issue on VS2019 16.11.18 with the following build steps:

  1. open VS2019 x86 native tools command
  2. git clone https://github.com/electronicarts/EASTL F:\gitP\electronicarts\EASTL
  3. cd F:\gitP\electronicarts\EASTL
  4. git submodule sync
  5. git submodule foreach git reset --hard
  6. git submodule foreach git clean -xdf
  7. git submodule update --init
  8. mkdir build_x86 && cd build_x86
  9. cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DEASTL_BUILD_TESTS:BOOL=ON -DEASTL_BUILD_BENCHMARK:BOOL=OFF ..
  10. msbuild /m /p:Platform=Win32 /p:Configuration=Release EASTL.sln /t:Rebuild

build.log
eastl_x86_c3861.patch.txt

@QuellaZhang
Copy link

F:\gitP\electronicarts\EASTL\build_x86>cl /Bv
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30146 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

Compiler Passes:
 C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\cl.exe:        Version 19.29.30146.0
 C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\c1.dll:        Version 19.29.30146.0
 C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\c1xx.dll:      Version 19.29.30146.0
 C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\c2.dll:        Version 19.29.30146.0
 C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\c1xx.dll:      Version 19.29.30146.0
 C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\link.exe:      Version 14.29.30146.0
 C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\mspdb140.dll:  Version 14.29.30146.0
 C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\1033\clui.dll: Version 19.29.30146.0

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