Skip to content

Can't build x86 on an x86-64 machine because of third-party #1086

@kmaragon

Description

@kmaragon

What platform/OS are you using?

Linux x86-64 machine with -m32 build

What compiler are you using? what version?

gcc / clang are both affected

What's your CMake arguments?

The important ones are CMAKE_CXX_FLAGS="-m32", CMAKE_SHARED_LINKER_FLAGS="-m32", and CMAKE_CXX_FLAGS="-m32" and CMAKE_C_FLAGS="-m32"

Can you provide a TRACE level log? (sanitize any sensitive information)

not really but there's this: https://travis-ci.org/kmaragon/conan-aws-sdk-cpp/jobs/503283625

Ultimately the issue is that when calling ExternalProject_Add at https://github.com/aws/aws-sdk-cpp/blob/master/third-party/cmake/BuildAwsEventStream.cmake#L45
https://github.com/aws/aws-sdk-cpp/blob/master/third-party/cmake/BuildAwsChecksums.cmake#L38
and https://github.com/aws/aws-sdk-cpp/blob/master/third-party/cmake/BuildAwsCCommon.cmake#L39

The build doesn't forward the aformentioned flags. it seems like there was a commit:
312db5e
that likely largely resolved the issue for OSX. It only forwards C_FLAGS but I assume these 3 libraries are pure C from their names so that's sufficient. But the fix wasn't rolled out to any case except OSX.

The result is that when building aws-sdk-cpp with -m32 on Linux, with either clang or gcc, you get a nicely compiled set of 32 bit aws cpp libraries that can't be loaded because they ultimately depend on these 3 c libraries which have all been built for 64 bit only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedWe are asking the community to submit a PR to resolve this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions