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

[BUILD] Patches for building on AIX #3127

Merged
merged 8 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ else()
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(ARCH x86)
endif()
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "powerpc")
# AIX will report the processor as 'powerpc' even if building in 64-bit mode
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(ARCH ppc64)
else()
set(ARCH ppc32)
endif()
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES
"^(aarch64.*|AARCH64.*|arm64.*|ARM64.*)")
set(ARCH arm64)
Expand Down
3 changes: 2 additions & 1 deletion cmake/opentelemetry-proto.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ if(WITH_OTLP_GRPC)
target_link_libraries(opentelemetry_proto_grpc PUBLIC opentelemetry_proto)

get_target_property(grpc_lib_type gRPC::grpc++ TYPE)
if(grpc_lib_type STREQUAL "SHARED_LIBRARY")
get_target_property(opentelemetry_proto_grpc_lib_type opentelemetry_proto_grpc TYPE)
if ((grpc_lib_type STREQUAL "SHARED_LIBRARY") OR (opentelemetry_proto_grpc_lib_type STREQUAL "SHARED_LIBRARY"))
target_link_libraries(opentelemetry_proto_grpc PUBLIC gRPC::grpc++)
endif()
set_target_properties(opentelemetry_proto_grpc PROPERTIES EXPORT_NAME
Expand Down
4 changes: 4 additions & 0 deletions cmake/tools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ function(project_build_tools_patch_default_imported_config)
if(IS_ALIAS_TARGET)
continue()
endif()
get_target_property(IS_ALIASED_TARGET ${TARGET_NAME} ALIASED_TARGET)
if (IS_ALIASED_TARGET)
continue()
endif()
tjcw marked this conversation as resolved.
Show resolved Hide resolved

if(CMAKE_VERSION VERSION_LESS "3.19.0")
get_target_property(TARGET_TYPE_NAME ${TARGET_NAME} TYPE)
Expand Down
13 changes: 13 additions & 0 deletions sdk/include/opentelemetry/sdk/resource/semantic_conventions.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@
#include "opentelemetry/common/macros.h"
#include "opentelemetry/version.h"

/*
* Special considerations for HostArchValues
*
* The sys/systemcfg.h header on AIX is known to define an IA64 macro,
* which collides with HostArchValues::IA64.
tjcw marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This work around is no longer necessary, after:

Change naming to use camel case, to avoid collisions with macros.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will change the PR to withdraw this workaround

*/
#ifdef _AIX
# ifdef IA64
# pragma message "Removing define on IA64"
# undef IA64
# endif
#endif

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
Expand Down
Loading