Skip to content

Building aws-crt on NetBSD #371

Open
@darko-mesaros

Description

@darko-mesaros

Hello, I am trying to get AWS CLI v2 running on NetBSD, however one of the issues I encounter is the inability to compile aws-crt. When running python setup.py install (python 3.9.12) the process fails during aws-crt compilation, with the following error:

[ 66%] Building C object crypto/CMakeFiles/crypto.dir/thread_pthread.c.o
In file included from /tmp/easy_install-k26ugbga/awscrt-0.13.11/crt/aws-lc/include/openssl/stack.h:62:0,
                 from /tmp/easy_install-k26ugbga/awscrt-0.13.11/crt/aws-lc/include/openssl/ex_data.h:114,
                 from /tmp/easy_install-k26ugbga/awscrt-0.13.11/crt/aws-lc/crypto/internal.h:113,
                 from /tmp/easy_install-k26ugbga/awscrt-0.13.11/crt/aws-lc/crypto/thread_pthread.c:15:
/tmp/easy_install-k26ugbga/awscrt-0.13.11/crt/aws-lc/crypto/thread_pthread.c:27:1: error: negative width in bit-field ‘static_assertion_at_line_28_error_is_CRYPTO_MUTEX_is_too_small’
 OPENSSL_STATIC_ASSERT(sizeof(CRYPTO_MUTEX) >= sizeof(pthread_rwlock_t),
 ^
--- crypto/CMakeFiles/crypto.dir/thread_pthread.c.o ---
*** [crypto/CMakeFiles/crypto.dir/thread_pthread.c.o] Error code 1

make[2]: stopped in /tmp/easy_install-k26ugbga/awscrt-0.13.11/build/temp.netbsd-9.2-amd64-3.9/deps/aws-lc
[ 66%] Building C object crypto/CMakeFiles/crypto.dir/thread_win.c.o
1 error

make[2]: stopped in /tmp/easy_install-k26ugbga/awscrt-0.13.11/build/temp.netbsd-9.2-amd64-3.9/deps/aws-lc
--- crypto/CMakeFiles/crypto.dir/all ---
*** [crypto/CMakeFiles/crypto.dir/all] Error code 2

make[1]: stopped in /tmp/easy_install-k26ugbga/awscrt-0.13.11/build/temp.netbsd-9.2-amd64-3.9/deps/aws-lc
1 error

make[1]: stopped in /tmp/easy_install-k26ugbga/awscrt-0.13.11/build/temp.netbsd-9.2-amd64-3.9/deps/aws-lc
*** [all] Error code 2

make: stopped in /tmp/easy_install-k26ugbga/awscrt-0.13.11/build/temp.netbsd-9.2-amd64-3.9/deps/aws-lc
1 error

I am running the following version of NetBSD:

(.venv) [vagrant@netbsd9 ~]$ uname -a
NetBSD netbsd9.localdomain 9.2 NetBSD 9.2 (GENERIC) #0: Wed May 12 13:15:55 UTC 2021  [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC amd64

And this is the version of cmake I have:

(.venv) [vagrant@netbsd9 aws-cli]$ cmake --version
cmake version 3.22.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).

Is there a specific dependency that I am missing, or what version of cmake3 is required?
Thank you,
Darko

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.p2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions