opentelemetry-cpp icon indicating copy to clipboard operation
opentelemetry-cpp copied to clipboard

ext/src/dll/input.src hardcodes "v1", and thus WITH_ABI_VERSION_2=1 does not work

Open vkrevs opened this issue 3 months ago • 2 comments

Describe your environment Windows 11, VS2022, cmake-4.1.1

Steps to reproduce Attempt to build opentelemetry 1.22.0 on Windows as a single shared dll using v2 ABI using the following command (passing -DOPENTELEMETRY_BUILD_DLL=1 and -DWITH_ABI_VERSION_2=ON -DWITH_ABI_VERSION_1=OFF to cmake):

cmake %BUILD_ROOT%\otel-1.22.0\opentelemetry-cpp-1.22.0 -DCMAKE_CXX_FLAGS="/std:c++17 /EHsc" -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_REQUIRED=ON -DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_BUILD_TYPE=Release -GNinja -DWITH_ABI_VERSION=2 -DWITH_ABI_VERSION_2=ON -DWITH_ABI_VERSION_1=OFF -DBUILD_TESTING=OFF -DWITH_ABSEIL=ON -DWITH_DEPRECATED_SDK_FACTORY=OFF -DWITH_OTLP_GRPC=OFF -DWITH_OTLP_FILE=ON -DWITH_OTLP_HTTP=ON -DWITH_OTLP_HTTP_COMPRESSION=ON -DWITH_EXAMPLES=OFF -DWITH_EXAMPLES_HTTP=OFF -DWITH_OTLP_HTTP_SSL_PREVIEW=ON -DWITH_OTLP_HTTP_SSL_TLS_PREVIEW=ON -DOPENSSL_USE_STATIC_LIBS=TRUE -DOPENSSL_ROOT_DIR=%BUILD_ROOT%\otel-1.22.0\openssl_home -DCURL_USE_STATIC_LIBS=TRUE -DOPENTELEMETRY_BUILD_DLL=1 -DOPENTELEMETRY_INSTALL=ON -DOTELCPP_PROTO_PATH=%BUILD_ROOT_UNIX%/otel-1.22.0/opentelemetry-proto-1.7.0 -DCMAKE_INSTALL_PREFIX=%BUILD_ROOT%\otel-1.22.0\Release\opentelemetry-cpp-1.22.0-bin -DCMAKE_PREFIX_PATH="%BUILD_ROOT%\otel-1.22.0\Release\json-3.12.0-bin;%BUILD_ROOT%\otel-1.22.0\Release\zlib-1.3.1-bin;%BUILD_ROOT%\otel-1.22.0\libcurl;%BUILD_ROOT%\otel-1.22.0\openssl;%BUILD_ROOT%\otel-1.22.0\Release\googletest-1.17.0-bin;%BUILD_ROOT%\otel-1.22.0\Release\benchmark-1.9.4-bin;%BUILD_ROOT%\otel-1.22.0\Release\protobuf-32.0-bin;%BUILD_ROOT%\otel-1.22.0\Release\abseil-cpp-20250512.1-bin"

What is the expected behavior? What did you expect to see? A working opentelemetry_cpp.dll is generated after building.

What is the actual behavior? What did you see instead? A stub opentelemetry_cpp.dll is generated after building because ext/src/dll/input.src hardcodes "v1" . Hence the pattern matching in ext\src\dll\make_def.ps1 fails and the generated build\ext\src\dll\opentelemetry_cpp.def file contains no exports...

Additional context Add any other context about the problem here.

Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

vkrevs avatar Sep 18 '25 14:09 vkrevs

File + scripts need to support ABI version 2 in input.src, so this needs to be done, this is a valid issue.

Still, please keep in mind that ABI v2 is not declared stable and will change, so starting to deploy now applications relying on a DLL compiled for ABI v2 is dangerous, and will fail.

marcalff avatar Sep 23 '25 19:09 marcalff

This issue was marked as stale due to lack of activity.

github-actions[bot] avatar Nov 23 '25 02:11 github-actions[bot]