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

Add Visual Studio 2015 + Windows 7.1 / 8.1 SDK build #215

Closed
maxgolov opened this issue Jul 27, 2020 · 4 comments · Fixed by #839
Closed

Add Visual Studio 2015 + Windows 7.1 / 8.1 SDK build #215

maxgolov opened this issue Jul 27, 2020 · 4 comments · Fixed by #839
Assignees
Labels
build and test enhancement New feature or request

Comments

@maxgolov
Copy link
Contributor

Visual Studio 2015 provides fairly 'complete' support of C++11. Currently we are already adding extra code to maintain older gcc-4.x for Linux; that one even predates vs2015. Some customers on Windows may still be operating on code built using Visual Studio 2015 (vc140) compiler, and may be targeting Windows 7.x and above. Our current CI loops are only testing Visual Studio 2017 (C++14) and Visual Studio 2019 (C++19), both by default targeting Windows 10.x and above. And we do not really cover Visual Studio 2015 (C++11) yet.

Recommendation is, as a minimum, add Visual Studio 2015 + CMake build using choco install microsoft-build-tools --version=14.0.25420.1 , to make sure that the API and SDK all compiles with an older compiler. And that our backports of nostd:: classes are all operational. There could be issues discovered that'd need fixing.

This is a blocker for adoption of OpenTelemetry SDK by a few larger codebase customers.

@maxgolov
Copy link
Contributor Author

maxgolov commented Jul 27, 2020

As a minimum, our notsd::string_view is having this issue with Visual Studio 2015 (C++11) , esp. due to extra SCL / secure C++ coding practices (which may be a false-positive, but requires either a code change or compiler flag change to turn SCL off) :

1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xutility(2983): error C4996: 'std::equal::_Unchecked_iterators::_Deprecate': Call to 'std::equal' with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xutility(2983): note: see declaration of 'std::equal::_Unchecked_iterators::_Deprecate'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xutility(3008): note: see reference to function template instantiation 'bool std::equal<_InIt1,_InIt2,std::equal_to<void>>(_InIt1,_InIt1,_InIt2,_Pr)' being compiled
1>        with
1>        [
1>            _InIt1=const char *,
1>            _InIt2=const char *,
1>            _Pr=std::equal_to<void>
1>        ]
1>c:\work\opentelemetry-cpp\api\include\opentelemetry\nostd\string_view.h(126): note: see reference to function template instantiation 'bool std::equal<const char*,const char*>(_InIt1,_InIt1,_InIt2)' being compiled
1>        with
1>        [
1>            _InIt1=const char *,
1>            _InIt2=const char *
1>        ]

@maxgolov
Copy link
Contributor Author

I'm assigning this issue to myself, as discussed during community meeting:

  • fixes to make sure code compiles and works with vs2015
  • deprecation policy guidelines : how long do we intend to support vs2015 and other older compilers, e.g. gcc-4.x on Linux

@maxgolov maxgolov self-assigned this Jul 27, 2020
@pyohannes pyohannes added the enhancement New feature or request label Aug 4, 2020
@maxgolov maxgolov added the priority:p1 Issues that are blocking label Dec 22, 2020
@maxgolov
Copy link
Contributor Author

maxgolov commented Apr 27, 2021

I can only confirm at this point that API headers + ETW exporter are working with Visual Studio 2015 Update 2 , which is min version required for Abseil Variant (absl::variant). I have not tested the rest of code, i.e. unsure if we can build gRPC, for example. If we require proper C++14 support, then 2015 Update 2 may not always work .......... @ThomsonTan

@maxgolov
Copy link
Contributor Author

I am removing priority:p1 label at this time based on the following:

  • customers that require that old compiler may use ETW exporter and out-of-proc listener. Out-of-proc listener may subsequently use OpenTelemetry C# SDK, for example, to forward data to OTLP receiver.
  • Visual Studio 2017 is known to compile gRPC exporter just fine.

Other features and exporters should be good.

@maxgolov maxgolov added build and test and removed priority:p1 Issues that are blocking labels Apr 27, 2021
@maxgolov maxgolov linked a pull request Jul 7, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build and test enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants