Giter VIP home page Giter VIP logo

Comments (41)

bretambrose avatar bretambrose commented on September 24, 2024 2

try installing libssl-dev

from aws-crt-nodejs.

bretambrose avatar bretambrose commented on September 24, 2024 1

"I did not have to install anything related to openssl" "Try installing libssl-dev"

Oops.

from aws-crt-nodejs.

JonathanHenson avatar JonathanHenson commented on September 24, 2024 1

Question: Does aws-crt work on a raspberry pi 4? I am gonna guess its looking for linux-arm binary.
I really dont want to waste too much time. I am surprised that we have a library for iot devices and raspberry pi is not tested.

It is tested and I can assure you it’s not intentional that it doesn’t work out of the box and we’re working to get this resolved for the future. Sorry for the miss on this, we’ll get it resolved for you. The goal is for the prebuilds to be used rather than you having to build from source

from aws-crt-nodejs.

bretambrose avatar bretambrose commented on September 24, 2024 1

As soon as I add a timer and a clearTimer call at the end (similar to the pub_sub sample), your program works correctly for me. Without it, it appears that node is shutting down with the first await call.

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024

@justinboswell Any thoughts on this?
Is this the right place to log this issue or should I log it somewhere else?

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024

@justinboswell Wanted to see if you got a chance to look at this issue.
Really appreciate your help.

from aws-crt-nodejs.

bretambrose avatar bretambrose commented on September 24, 2024

@gyandeeps Are you still stuck on this issue? I pulled down the latest CRT and while I don't have a pi, I checked and the s2n submodule is now on a commit that does have that file.

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024

here is what i see. it ends successfully but the internal have an issue.

not sure if initial problem was solved or not but now it fails way before the initial point of failure.

pi@raspberrypi:~/home-garage $ npm install aws-crt

> [email protected] install /home/pi/home-garage/node_modules/aws-crt
> node ./scripts/install.js

info TOOL Using Unix Makefiles generator.
info TOOL Building only the install target, as specified from the command line.
info CMD CONFIGURE
info TOOL Building only the install target, as specified from the command line.
info RUN cmake "/home/pi/home-garage/node_modules/aws-crt" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/home/pi/home-garage/node_modules/aws-crt/build/Release" -DCMAKE_JS_INC="/home/pi/.cmake-js/node-arm/v13.12.0/include/node;/home/pi/home-garage/node_modules/nan" -DCMAKE_JS_SRC="" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="13.12.0" -DNODE_ARCH="arm" -DCMAKE_EXPORT_COMPILE_COMMANDS="true" -DCMAKE_JS_PLATFORM="linux" -DCMAKE_JS_ARCH="arm"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Using submodule dependencies
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS - Success
-- Performing Test AWS_HAVE_MSVC_MULX
-- Performing Test AWS_HAVE_MSVC_MULX - Failed
-- Performing Test AWS_ARCH_INTEL
-- Performing Test AWS_ARCH_INTEL - Failed
-- Performing Test AWS_HAVE_GCC_INLINE_ASM
-- Performing Test AWS_HAVE_GCC_INLINE_ASM - Success
-- Performing Test AWS_HAVE_EXECINFO
-- Performing Test AWS_HAVE_EXECINFO - Success
-- Performing Test HAVE_M_AVX2_FLAG
-- Performing Test HAVE_M_AVX2_FLAG - Failed
-- Performing Test HAVE_AVX2_INTRINSICS
-- Performing Test HAVE_AVX2_INTRINSICS - Failed
-- Performing Test HAVE_MM256_EXTRACT_EPI64
-- Performing Test HAVE_MM256_EXTRACT_EPI64 - Failed
-- Looking for pthread.h
-- Looking for pthread.h - not found
CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
  /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.13/Modules/FindThreads.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  aws-common-runtime/aws-c-common/CMakeLists.txt:94 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeOutput.log".
See also "/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeError.log".
ERR! OMG Process terminated: 1
(node:28552) UnhandledPromiseRejectionWarning: Error: Process terminated: 1
    at ChildProcess.<anonymous> (/home/pi/home-garage/node_modules/cmake-js/lib/processHelpers.js:29:32)
    at ChildProcess.emit (events.js:315:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
(node:28552) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:28552) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
npm WARN [email protected] No description

+ [email protected]
updated 1 package and audited 689 packages in 17.553s

1 package is looking for funding
  run `npm fund` for details

found 21 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

from aws-crt-nodejs.

bretambrose avatar bretambrose commented on September 24, 2024

Are you able to find pthread.h on your system? Searching around it seems like pthreads is usually a part of the default OS image/install but maybe not in this case?

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024

I have not changed my system and last time it was able to find it. (ref to the log in the body of issue)

from aws-crt-nodejs.

bretambrose avatar bretambrose commented on September 24, 2024

The log just shows feature tests, which don't look relevant to either of the problems. Can you wipe the aws-crt out of the node_modules directory (unsure if there are any other temp directories that might have leftover state) and try a reinstall?

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024

I tried cleaning up everything and i still get the same error.

If you see the log in the main body of the issue it a was able to find the pthread.h.

...
-- Performing Test HAVE_BUILTIN_CPU_SUPPORTS
-- Performing Test HAVE_BUILTIN_CPU_SUPPORTS - Failed
-- Performing Test HAVE_MSVC_CPUIDEX
-- Performing Test HAVE_MSVC_CPUIDEX - Failed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Looking for stdint.h
...

from aws-crt-nodejs.

cBiscuitSurprise avatar cBiscuitSurprise commented on September 24, 2024

I'm experiencing the same issue. I was hoping to find a workaround, but after messing around on this all day I can't seem to get s2n to build either for other reasons (it depends on add-apt-repository which wasn't immediately compatible with Raspbien).


Using npm install cmake-js aws-iot-device-sdk-v2, I get the same error as OP:

...

-- Found assembler: /usr/bin/cc
CMake Error at /home/spoke/tem/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CMakeLists.txt:15 (add_executable):
  Cannot find source file:

    /home/spoke/tem/node_modules/aws-crt/aws-common-runtime/s2n/tests/unit/s2n_pq_asm_noop_test.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at /home/spoke/tem/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CMakeLists.txt:15 (add_executable):
  No SOURCES given to target: cmTC_06ce1

CMake Error at aws-common-runtime/s2n/CMakeLists.txt:118 (try_compile):
  Failed to generate test project build system.

...

There is no tests directory included in the s2n node_modules package:

pi@raspberrypi:~$ ls /home/pi/node_modules/aws-crt/aws-common-runtime/s2n
api  bin  cmake  CMakeLists.txt  crypto  error  LICENSE  NOTICE  pq-crypto  README.md  s2n.mk  scram  stuffer  tls  utils

from aws-crt-nodejs.

bretambrose avatar bretambrose commented on September 24, 2024

v1.2.3 of the sdk has just been released and should fix this problem.

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024

I dont see v1.2.3 on npm. Also can we please leave this issue open until verified?

pi@raspberrypi:~/home-garage $ npm view aws-crt

[email protected] | Apache-2.0 | deps: 5 | versions: 19
NodeJS/browser bindings to the aws-c-* libraries
https://github.com/awslabs/aws-crt-nodejs

dist
.tarball: https://registry.npmjs.org/aws-crt/-/aws-crt-1.1.9.tgz
.shasum: e8a6d11756b98bc64ac9f6bb5c4747e94246bb0b
.integrity: sha512-qMJf6eXnOxCpgG3vSDirbK5iiy+/K9OtL6ACGFFz+rJ03UDemT7+5ZOdnCCoLG/Fu8uTOBlb2Jv2y737BzG0Iw==
.unpackedSize: 14.9 MB

dependencies:
async-mqtt: ^2.5.0       axios: ^0.19.2           crypto-js: ^3.3.0        mqtt: ^4.1.0             websocket-stream: ^5.5.2

maintainers:
- colden <[email protected]>

dist-tags:
latest: 1.1.9

published yesterday by aws-common-runtime <[email protected]>

v1.1.9

I still get the same error as above with 1.1.5

pi@raspberrypi:~/home-garage $ npm install aws-crt

> [email protected] install /home/pi/home-garage/node_modules/aws-crt
> node ./scripts/install.js

info TOOL Using Unix Makefiles generator.
info TOOL Building only the install target, as specified from the command line.
info CMD CONFIGURE
info TOOL Building only the install target, as specified from the command line.
info RUN cmake "/home/pi/home-garage/node_modules/aws-crt" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/home/pi/home-garage/node_modules/aws-crt/build/Release" -DCMAKE_JS_INC="/home/pi/.cmake-js/node-arm/v13.12.0/include/node;/home/pi/home-garage/node_modules/nan" -DCMAKE_JS_SRC="" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="13.12.0" -DNODE_ARCH="arm" -DCMAKE_EXPORT_COMPILE_COMMANDS="true" -DCMAKE_JS_PLATFORM="linux" -DCMAKE_JS_ARCH="arm" -DBUILD_TESTING="OFF"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Using submodule dependencies
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS - Success
-- Performing Test AWS_HAVE_MSVC_MULX
-- Performing Test AWS_HAVE_MSVC_MULX - Failed
-- Performing Test AWS_ARCH_INTEL
-- Performing Test AWS_ARCH_INTEL - Failed
-- Performing Test AWS_HAVE_GCC_INLINE_ASM
-- Performing Test AWS_HAVE_GCC_INLINE_ASM - Success
-- Performing Test AWS_HAVE_EXECINFO
-- Performing Test AWS_HAVE_EXECINFO - Success
-- Performing Test HAVE_M_AVX2_FLAG
-- Performing Test HAVE_M_AVX2_FLAG - Failed
-- Performing Test HAVE_AVX2_INTRINSICS
-- Performing Test HAVE_AVX2_INTRINSICS - Failed
-- Performing Test HAVE_MM256_EXTRACT_EPI64
-- Performing Test HAVE_MM256_EXTRACT_EPI64 - Failed
-- Looking for pthread.h
-- Looking for pthread.h - not found
CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
  /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.13/Modules/FindThreads.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  aws-common-runtime/aws-c-common/CMakeLists.txt:94 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeOutput.log".
See also "/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeError.log".
ERR! OMG Process terminated: 1
(node:11172) UnhandledPromiseRejectionWarning: Error: Process terminated: 1
    at ChildProcess.<anonymous> (/home/pi/home-garage/node_modules/cmake-js/lib/processHelpers.js:29:32)
    at ChildProcess.emit (events.js:315:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
(node:11172) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:11172) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
npm WARN [email protected] No description

+ [email protected]
updated 1 package and audited 689 packages in 70.881s

1 package is looking for funding
  run `npm fund` for details

found 21 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

from aws-crt-nodejs.

bretambrose avatar bretambrose commented on September 24, 2024

1.2.3 is the sdk version, 1.1.9 is the current crt version used by the sdk.

That being said, pthreads is usually(always?) a part of the standard pi os distributions.
What do you get from 'find / -name 'pthreads.h'?

Also, can you update to 1.1.9 and test from there?

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024
pi@raspberrypi:~/home-garage $ sudo find /  -name pthread.h
/usr/include/pthread.h

I have already included the log for 1.1.9 install run in my comment above

from aws-crt-nodejs.

bretambrose avatar bretambrose commented on September 24, 2024

Does https://stackoverflow.com/questions/24813827/cmake-failing-to-detect-pthreads-due-to-warnings/25130590 contain anything relevant to your situation? You seem to have an up-to-date cmake and pthreads should be installed on your system (and looks to be). You'll need to dig into the cmake output and see what the actual compile-test error was.

In particular, after a cmake run, what's in the two files listed at the end:

See also "/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeOutput.log".
See also "/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeError.log".

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024

CMakeError.log

log
Performing C SOURCE FILE Test AWS_HAVE_MSVC_MULX failed with the following compile output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_a3020/fast"
/usr/bin/make -f CMakeFiles/cmTC_a3020.dir/build.make CMakeFiles/cmTC_a3020.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a3020.dir/src.c.o
/usr/bin/cc   -DAWS_HAVE_MSVC_MULX   -o CMakeFiles/cmTC_a3020.dir/src.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c: In function ‘main’:
/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c:4:5: warning: implicit declaration of function ‘_mulx_u32’ [-Wimplicit-function-declaration]
     _mulx_u32(1, 2, &foo);
     ^~~~~~~~~
Linking C executable cmTC_a3020
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a3020.dir/link.txt --verbose=1
/usr/bin/cc  -DAWS_HAVE_MSVC_MULX    -rdynamic CMakeFiles/cmTC_a3020.dir/src.c.o  -o cmTC_a3020
/usr/bin/ld: CMakeFiles/cmTC_a3020.dir/src.c.o: in function `main':
src.c:(.text+0x24): undefined reference to `_mulx_u32'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_a3020.dir/build.make:87: cmTC_a3020] Error 1
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_a3020/fast] Error 2

...and run output:

Return value: 1
Source file was:

    int main() {
    int foo = 42;
    _mulx_u32(1, 2, &foo);
    return foo != 2;
    }
Performing C SOURCE FILE Test AWS_ARCH_INTEL failed with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_2f0e5/fast"
/usr/bin/make -f CMakeFiles/cmTC_2f0e5.dir/build.make CMakeFiles/cmTC_2f0e5.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_2f0e5.dir/src.c.o
/usr/bin/cc   -DAWS_ARCH_INTEL   -o CMakeFiles/cmTC_2f0e5.dir/src.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c: In function ‘main’:
/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c:4:6: error: #error "not intel"
 #    error "not intel"
      ^~~~~
make[1]: *** [CMakeFiles/cmTC_2f0e5.dir/build.make:66: CMakeFiles/cmTC_2f0e5.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_2f0e5/fast] Error 2

Source file was:

    int main() {
#if !(defined(__x86_64__) || defined(__i386__) || defined(_M_X64) || defined(_M_IX86))
#    error "not intel"
#endif
        return 0;
    }

Performing C SOURCE FILE Test HAVE_M_AVX2_FLAG failed with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_071ad/fast"
/usr/bin/make -f CMakeFiles/cmTC_071ad.dir/build.make CMakeFiles/cmTC_071ad.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_071ad.dir/src.c.o
/usr/bin/cc   -DHAVE_M_AVX2_FLAG   -mavx2 -o CMakeFiles/cmTC_071ad.dir/src.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
cc: error: unrecognized command line option '-mavx2'
make[1]: *** [CMakeFiles/cmTC_071ad.dir/build.make:66: CMakeFiles/cmTC_071ad.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_071ad/fast] Error 2

Source file was:
int main(void) { return 0; }
Performing C SOURCE FILE Test HAVE_AVX2_INTRINSICS failed with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_ab221/fast"
/usr/bin/make -f CMakeFiles/cmTC_ab221.dir/build.make CMakeFiles/cmTC_ab221.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_ab221.dir/src.c.o
/usr/bin/cc   -DHAVE_AVX2_INTRINSICS   -o CMakeFiles/cmTC_ab221.dir/src.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c:2:10: fatal error: immintrin.h: No such file or directory
 #include <immintrin.h>
          ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [CMakeFiles/cmTC_ab221.dir/build.make:66: CMakeFiles/cmTC_ab221.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_ab221/fast] Error 2

Source file was:

#include <immintrin.h>
#include <emmintrin.h>
#include <string.h>

int main() {
    __m256i vec;
    memset(&vec, 0, sizeof(vec));

    _mm256_shuffle_epi8(vec, vec);
    _mm256_set_epi32(1,2,3,4,5,6,7,8);
    _mm256_permutevar8x32_epi32(vec, vec);

    return 0;
}
Performing C SOURCE FILE Test HAVE_MM256_EXTRACT_EPI64 failed with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_bc68d/fast"
/usr/bin/make -f CMakeFiles/cmTC_bc68d.dir/build.make CMakeFiles/cmTC_bc68d.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_bc68d.dir/src.c.o
/usr/bin/cc   -DHAVE_MM256_EXTRACT_EPI64   -o CMakeFiles/cmTC_bc68d.dir/src.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c:2:10: fatal error: immintrin.h: No such file or directory
 #include <immintrin.h>
          ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [CMakeFiles/cmTC_bc68d.dir/build.make:66: CMakeFiles/cmTC_bc68d.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_bc68d/fast] Error 2

Source file was:

#include <immintrin.h>
#include <string.h>

int main() {
    __m256i vec;
    memset(&vec, 0, sizeof(vec));
    return (int)_mm256_extract_epi64(vec, 2);
}
Determining if the include file pthread.h exists failed with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_a29ff/fast"
/usr/bin/make -f CMakeFiles/cmTC_a29ff.dir/build.make CMakeFiles/cmTC_a29ff.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a29ff.dir/CheckIncludeFile.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_a29ff.dir/CheckIncludeFile.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
In file included from /usr/include/sched.h:29,
                 from /usr/include/pthread.h:23,
                 from /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:
/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h:88:1: error: expected identifier or ‘(’ before ‘!’ token
 !endif /* definud(▒INSI_H_)`|| defined(_MCHINE_ANSI_H▒9 || def ~ed(_X86_24_ANSI_H]) || dqfqned8^I386OANBI_H_)▒*/
 ^
/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h:92:38: error: missing binary operator before token "("
 #if defined (__sequent__) &&$defined (_PTRDIFB_T_)
                                      ^
In file included from /usr/include/sched.h:44,
                 from /usr/include/pthread.h:23,
                 from /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:
/usr/include/arm-linux-gnueabihf/bits/cpu-set.h:117:30: error: unknown type name ‘size_t’
 extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
                              ^~~~~~
/usr/include/arm-linux-gnueabihf/bits/cpu-set.h:117:30: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/usr/include/arm-linux-gnueabihf/bits/cpu-set.h:1:1:
+#include <stddef.h>
 /* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993
/usr/include/arm-linux-gnueabihf/bits/cpu-set.h:117:30:
 extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
                              ^~~~~~
/usr/include/arm-linux-gnueabihf/bits/cpu-set.h:119:37: error: unknown type name ‘size_t’
 extern cpu_set_t *__sched_cpualloc (size_t __count) __THROW __wur;
                                     ^~~~~~
/usr/include/arm-linux-gnueabihf/bits/cpu-set.h:119:37: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
In file included from /usr/include/time.h:29,
                 from /usr/include/pthread.h:24,
                 from /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:
/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h:88:1: error: expected identifier or ‘(’ before ‘!’ token
 !endif /* definud(▒INSI_H_)`|| defined(_MCHINE_ANSI_H▒9 || def ~ed(_X86_24_ANSI_H]) || dqfqned8^I386OANBI_H_)▒*/
 ^
/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h:92:38: error: missing binary operator before token "("
 #if defined (__sequent__) &&$defined (_PTRDIFB_T_)
                                      ^
In file included from /usr/include/pthread.h:24,
                 from /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:
/usr/include/time.h:72:8: error: unknown type name ‘clock_t’
 extern clock_t clock (void) __THROW;
        ^~~~~~~
/usr/include/time.h:88:8: error: unknown type name ‘size_t’
 extern size_t strftime (char *__restrict __s, size_t __maxsize,
        ^~~~~~
/usr/include/time.h:88:47: error: unknown type name ‘size_t’
 extern size_t strftime (char *__restrict __s, size_t __maxsize,
                                               ^~~~~~
/usr/include/time.h:88:47: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/usr/include/time.h:61:1:
+#include <stddef.h>
 #endif
/usr/include/time.h:88:47:
 extern size_t strftime (char *__restrict __s, size_t __maxsize,
                                               ^~~~~~
/usr/include/time.h:104:8: error: unknown type name ‘size_t’
 extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
        ^~~~~~
/usr/include/time.h:104:49: error: unknown type name ‘size_t’
 extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
                                                 ^~~~~~
/usr/include/time.h:104:49: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
In file included from /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:
/usr/include/pthread.h:307:11: error: unknown type name ‘size_t’
           size_t *__guardsize)
           ^~~~~~
/usr/include/pthread.h:307:11: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/usr/include/pthread.h:29:1:
+#include <stddef.h>
 #include <bits/types/struct_timespec.h>
/usr/include/pthread.h:307:11:
           size_t *__guardsize)
           ^~~~~~
/usr/include/pthread.h:312:11: error: unknown type name ‘size_t’
           size_t __guardsize)
           ^~~~~~
/usr/include/pthread.h:312:11: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/usr/include/pthread.h:370:19: error: unknown type name ‘size_t’
           __attr, size_t *__restrict __stacksize)
                   ^~~~~~
/usr/include/pthread.h:370:19: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/usr/include/pthread.h:377:11: error: unknown type name ‘size_t’
           size_t __stacksize)
           ^~~~~~
/usr/include/pthread.h:377:11: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/usr/include/pthread.h:384:7: error: unknown type name ‘size_t’
       size_t *__restrict __stacksize)
       ^~~~~~
/usr/include/pthread.h:384:7: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/usr/include/pthread.h:391:7: error: unknown type name ‘size_t’
       size_t __stacksize) __THROW __nonnull ((1));
       ^~~~~~
/usr/include/pthread.h:391:7: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
make[1]: *** [CMakeFiles/cmTC_a29ff.dir/build.make:66: CMakeFiles/cmTC_a29ff.dir/CheckIncludeFile.c.o] Error 1
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_a29ff/fast] Error 2

CMakeOutput.log

log
The system is: Linux - 4.19.97-v7l+ - armv7l
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /usr/bin/cc
Build flags:
Id flags:

The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"

The C compiler identification is GNU, found in "/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/3.13.4/CompilerIdC/a.out"

Determining if the C compiler works passed with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_a2bad/fast"
/usr/bin/make -f CMakeFiles/cmTC_a2bad.dir/build.make CMakeFiles/cmTC_a2bad.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a2bad.dir/testCCompiler.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_a2bad.dir/testCCompiler.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_a2bad
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a2bad.dir/link.txt --verbose=1
/usr/bin/cc      -rdynamic CMakeFiles/cmTC_a2bad.dir/testCCompiler.c.o  -o cmTC_a2bad
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'


Detecting C compiler ABI info compiled with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_fb67d/fast"
/usr/bin/make -f CMakeFiles/cmTC_fb67d.dir/build.make CMakeFiles/cmTC_fb67d.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_fb67d.dir/CMakeCCompilerABI.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_fb67d.dir/CMakeCCompilerABI.c.o   -c /usr/share/cmake-3.13/Modules/CMakeCCompilerABI.c
Linking C executable cmTC_fb67d
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_fb67d.dir/link.txt --verbose=1
/usr/bin/cc     -v -rdynamic CMakeFiles/cmTC_fb67d.dir/CMakeCCompilerABI.c.o  -o cmTC_fb67d
Using built-in specs.
COLLECT_GCC=/usr/bin/cc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/8/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Raspbian 8.3.0-6+rpi1' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 8.3.0 (Raspbian 8.3.0-6+rpi1)
COMPILER_PATH=/usr/lib/gcc/arm-linux-gnueabihf/8/:/usr/lib/gcc/arm-linux-gnueabihf/8/:/usr/lib/gcc/arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/8/:/usr/lib/gcc/arm-linux-gnueabihf/
LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnueabihf/8/:/usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/8/../../../:/lib/arm-linux-gnueabihf/:/lib/:/usr/lib/arm-linux-gnueabihf/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_fb67d'  '-mfloat-abi=hard' '-mfpu=vfp' '-mtls-dialect=gnu' '-marm' '-march=armv6+fp'
 /usr/lib/gcc/arm-linux-gnueabihf/8/collect2 -plugin /usr/lib/gcc/arm-linux-gnueabihf/8/liblto_plugin.so -plugin-opt=/usr/lib/gcc/arm-linux-gnueabihf/8/lto-wrapper -plugin-opt=-fresolution=/tmp/ccYRrQ3z.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X --hash-style=gnu -m armelf_linux_eabi -o cmTC_fb67d /usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/crt1.o /usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/crti.o /usr/lib/gcc/arm-linux-gnueabihf/8/crtbegin.o -L/usr/lib/gcc/arm-linux-gnueabihf/8 -L/usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf -L/usr/lib/gcc/arm-linux-gnueabihf/8/../../.. -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf CMakeFiles/cmTC_fb67d.dir/CMakeCCompilerABI.c.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/arm-linux-gnueabihf/8/crtend.o /usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/crtn.o
COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_fb67d'  '-mfloat-abi=hard' '-mfpu=vfp' '-mtls-dialect=gnu' '-marm' '-march=armv6+fp'
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'


Parsed C implicit link information from above output:
  link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
  ignore line: [Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp]
  ignore line: []
  ignore line: [Run Build Command:"/usr/bin/make" "cmTC_fb67d/fast"]
  ignore line: [/usr/bin/make -f CMakeFiles/cmTC_fb67d.dir/build.make CMakeFiles/cmTC_fb67d.dir/build]
  ignore line: [make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp']
  ignore line: [Building C object CMakeFiles/cmTC_fb67d.dir/CMakeCCompilerABI.c.o]
  ignore line: [/usr/bin/cc    -o CMakeFiles/cmTC_fb67d.dir/CMakeCCompilerABI.c.o   -c /usr/share/cmake-3.13/Modules/CMakeCCompilerABI.c]
  ignore line: [Linking C executable cmTC_fb67d]
  ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_fb67d.dir/link.txt --verbose=1]
  ignore line: [/usr/bin/cc     -v -rdynamic CMakeFiles/cmTC_fb67d.dir/CMakeCCompilerABI.c.o  -o cmTC_fb67d ]
  ignore line: [Using built-in specs.]
  ignore line: [COLLECT_GCC=/usr/bin/cc]
  ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/8/lto-wrapper]
  ignore line: [Target: arm-linux-gnueabihf]
  ignore line: [Configured with: ../src/configure -v --with-pkgversion='Raspbian 8.3.0-6+rpi1' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf]
  ignore line: [Thread model: posix]
  ignore line: [gcc version 8.3.0 (Raspbian 8.3.0-6+rpi1) ]
  ignore line: [COMPILER_PATH=/usr/lib/gcc/arm-linux-gnueabihf/8/:/usr/lib/gcc/arm-linux-gnueabihf/8/:/usr/lib/gcc/arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/8/:/usr/lib/gcc/arm-linux-gnueabihf/]
  ignore line: [LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnueabihf/8/:/usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/8/../../../:/lib/arm-linux-gnueabihf/:/lib/:/usr/lib/arm-linux-gnueabihf/:/usr/lib/]
  ignore line: [COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_fb67d'  '-mfloat-abi=hard' '-mfpu=vfp' '-mtls-dialect=gnu' '-marm' '-march=armv6+fp']
  link line: [ /usr/lib/gcc/arm-linux-gnueabihf/8/collect2 -plugin /usr/lib/gcc/arm-linux-gnueabihf/8/liblto_plugin.so -plugin-opt=/usr/lib/gcc/arm-linux-gnueabihf/8/lto-wrapper -plugin-opt=-fresolution=/tmp/ccYRrQ3z.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X --hash-style=gnu -m armelf_linux_eabi -o cmTC_fb67d /usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/crt1.o /usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/crti.o /usr/lib/gcc/arm-linux-gnueabihf/8/crtbegin.o -L/usr/lib/gcc/arm-linux-gnueabihf/8 -L/usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf -L/usr/lib/gcc/arm-linux-gnueabihf/8/../../.. -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf CMakeFiles/cmTC_fb67d.dir/CMakeCCompilerABI.c.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/arm-linux-gnueabihf/8/crtend.o /usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/crtn.o]
    arg [/usr/lib/gcc/arm-linux-gnueabihf/8/collect2] ==> ignore
    arg [-plugin] ==> ignore
    arg [/usr/lib/gcc/arm-linux-gnueabihf/8/liblto_plugin.so] ==> ignore
    arg [-plugin-opt=/usr/lib/gcc/arm-linux-gnueabihf/8/lto-wrapper] ==> ignore
    arg [-plugin-opt=-fresolution=/tmp/ccYRrQ3z.res] ==> ignore
    arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
    arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
    arg [-plugin-opt=-pass-through=-lc] ==> ignore
    arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
    arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
    arg [--build-id] ==> ignore
    arg [--eh-frame-hdr] ==> ignore
    arg [-export-dynamic] ==> ignore
    arg [-dynamic-linker] ==> ignore
    arg [/lib/ld-linux-armhf.so.3] ==> ignore
    arg [-X] ==> ignore
    arg [--hash-style=gnu] ==> ignore
    arg [-m] ==> ignore
    arg [armelf_linux_eabi] ==> ignore
    arg [-o] ==> ignore
    arg [cmTC_fb67d] ==> ignore
    arg [/usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/crt1.o] ==> ignore
    arg [/usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/crti.o] ==> ignore
    arg [/usr/lib/gcc/arm-linux-gnueabihf/8/crtbegin.o] ==> ignore
    arg [-L/usr/lib/gcc/arm-linux-gnueabihf/8] ==> dir [/usr/lib/gcc/arm-linux-gnueabihf/8]
    arg [-L/usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf] ==> dir [/usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf]
    arg [-L/usr/lib/gcc/arm-linux-gnueabihf/8/../../..] ==> dir [/usr/lib/gcc/arm-linux-gnueabihf/8/../../..]
    arg [-L/lib/arm-linux-gnueabihf] ==> dir [/lib/arm-linux-gnueabihf]
    arg [-L/usr/lib/arm-linux-gnueabihf] ==> dir [/usr/lib/arm-linux-gnueabihf]
    arg [CMakeFiles/cmTC_fb67d.dir/CMakeCCompilerABI.c.o] ==> ignore
    arg [-lgcc] ==> lib [gcc]
    arg [--push-state] ==> ignore
    arg [--as-needed] ==> ignore
    arg [-lgcc_s] ==> lib [gcc_s]
    arg [--pop-state] ==> ignore
    arg [-lc] ==> lib [c]
    arg [-lgcc] ==> lib [gcc]
    arg [--push-state] ==> ignore
    arg [--as-needed] ==> ignore
    arg [-lgcc_s] ==> lib [gcc_s]
    arg [--pop-state] ==> ignore
    arg [/usr/lib/gcc/arm-linux-gnueabihf/8/crtend.o] ==> ignore
    arg [/usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/crtn.o] ==> ignore
  collapse library dir [/usr/lib/gcc/arm-linux-gnueabihf/8] ==> [/usr/lib/gcc/arm-linux-gnueabihf/8]
  collapse library dir [/usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf] ==> [/usr/lib/arm-linux-gnueabihf]
  collapse library dir [/usr/lib/gcc/arm-linux-gnueabihf/8/../../..] ==> [/usr/lib]
  collapse library dir [/lib/arm-linux-gnueabihf] ==> [/lib/arm-linux-gnueabihf]
  collapse library dir [/usr/lib/arm-linux-gnueabihf] ==> [/usr/lib/arm-linux-gnueabihf]
  implicit libs: [gcc;gcc_s;c;gcc;gcc_s]
  implicit dirs: [/usr/lib/gcc/arm-linux-gnueabihf/8;/usr/lib/arm-linux-gnueabihf;/usr/lib;/lib/arm-linux-gnueabihf]
  implicit fwks: []




Detecting C [-std=c11] compiler features compiled with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_7db22/fast"
/usr/bin/make -f CMakeFiles/cmTC_7db22.dir/build.make CMakeFiles/cmTC_7db22.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_7db22.dir/feature_tests.c.o
/usr/bin/cc   -std=c11 -o CMakeFiles/cmTC_7db22.dir/feature_tests.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/feature_tests.c
Linking C executable cmTC_7db22
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7db22.dir/link.txt --verbose=1
/usr/bin/cc      -rdynamic CMakeFiles/cmTC_7db22.dir/feature_tests.c.o  -o cmTC_7db22
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'


    Feature record: C_FEATURE:1c_function_prototypes
    Feature record: C_FEATURE:1c_restrict
    Feature record: C_FEATURE:1c_static_assert
    Feature record: C_FEATURE:1c_variadic_macros


Detecting C [-std=c99] compiler features compiled with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_0bad2/fast"
/usr/bin/make -f CMakeFiles/cmTC_0bad2.dir/build.make CMakeFiles/cmTC_0bad2.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_0bad2.dir/feature_tests.c.o
/usr/bin/cc   -std=c99 -o CMakeFiles/cmTC_0bad2.dir/feature_tests.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/feature_tests.c
Linking C executable cmTC_0bad2
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0bad2.dir/link.txt --verbose=1
/usr/bin/cc      -rdynamic CMakeFiles/cmTC_0bad2.dir/feature_tests.c.o  -o cmTC_0bad2
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'


    Feature record: C_FEATURE:1c_function_prototypes
    Feature record: C_FEATURE:1c_restrict
    Feature record: C_FEATURE:0c_static_assert
    Feature record: C_FEATURE:1c_variadic_macros


Detecting C [-std=c90] compiler features compiled with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_d4a52/fast"
/usr/bin/make -f CMakeFiles/cmTC_d4a52.dir/build.make CMakeFiles/cmTC_d4a52.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_d4a52.dir/feature_tests.c.o
/usr/bin/cc   -std=c90 -o CMakeFiles/cmTC_d4a52.dir/feature_tests.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/feature_tests.c
Linking C executable cmTC_d4a52
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d4a52.dir/link.txt --verbose=1
/usr/bin/cc      -rdynamic CMakeFiles/cmTC_d4a52.dir/feature_tests.c.o  -o cmTC_d4a52
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'


    Feature record: C_FEATURE:1c_function_prototypes
    Feature record: C_FEATURE:0c_restrict
    Feature record: C_FEATURE:0c_static_assert
    Feature record: C_FEATURE:0c_variadic_macros
Performing C SOURCE FILE Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS succeeded with the following compile output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_f7234/fast"
/usr/bin/make -f CMakeFiles/cmTC_f7234.dir/build.make CMakeFiles/cmTC_f7234.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_f7234.dir/src.c.o
/usr/bin/cc   -DAWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS   -o CMakeFiles/cmTC_f7234.dir/src.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_f7234
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f7234.dir/link.txt --verbose=1
/usr/bin/cc  -DAWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS    -rdynamic CMakeFiles/cmTC_f7234.dir/src.c.o  -o cmTC_f7234
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'

...and run output:

Return value: 1
Source file was:

    #include <stdbool.h>
    bool foo(int a, int b, int *c) {
        return __builtin_mul_overflow(a, b, c);
    }

    int main() {
        int out;
        if (foo(1, 2, &out)) {
            return 0;
        }

        return 0;
    }
Performing C SOURCE FILE Test AWS_HAVE_GCC_INLINE_ASM succeeded with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_fb2a2/fast"
/usr/bin/make -f CMakeFiles/cmTC_fb2a2.dir/build.make CMakeFiles/cmTC_fb2a2.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_fb2a2.dir/src.c.o
/usr/bin/cc   -DAWS_HAVE_GCC_INLINE_ASM   -o CMakeFiles/cmTC_fb2a2.dir/src.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_fb2a2
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_fb2a2.dir/link.txt --verbose=1
/usr/bin/cc  -DAWS_HAVE_GCC_INLINE_ASM    -rdynamic CMakeFiles/cmTC_fb2a2.dir/src.c.o  -o cmTC_fb2a2
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'

Source file was:

int main() {
    int foo = 42, bar = 24;
    __asm__ __volatile__("":"=r"(foo):"r"(bar):"memory");
}
Performing C SOURCE FILE Test AWS_HAVE_EXECINFO succeeded with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_e6baf/fast"
/usr/bin/make -f CMakeFiles/cmTC_e6baf.dir/build.make CMakeFiles/cmTC_e6baf.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_e6baf.dir/src.c.o
/usr/bin/cc   -DAWS_HAVE_EXECINFO   -o CMakeFiles/cmTC_e6baf.dir/src.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_e6baf
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e6baf.dir/link.txt --verbose=1
/usr/bin/cc  -DAWS_HAVE_EXECINFO    -rdynamic CMakeFiles/cmTC_e6baf.dir/src.c.o  -o cmTC_e6baf
make[1]: Leaving directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'

Source file was:

    #include <execinfo.h>
    int main() {
        return 0;
    }

from aws-crt-nodejs.

bretambrose avatar bretambrose commented on September 24, 2024

The pthread check has a lot of garbled text in it. I don't know whether it's github formatting, some kind of locale issue, or (seems improbable but could be) the actual <stddef.h> header file is corrupted:

Determining if the include file pthread.h exists failed with the following output:
Change Dir: /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_a29ff/fast"
/usr/bin/make -f CMakeFiles/cmTC_a29ff.dir/build.make CMakeFiles/cmTC_a29ff.dir/build
make[1]: Entering directory '/home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a29ff.dir/CheckIncludeFile.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_a29ff.dir/CheckIncludeFile.c.o   -c /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
In file included from /usr/include/sched.h:29,
                 from /usr/include/pthread.h:23,
                 from /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:
/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h:88:1: error: expected identifier or ‘(’ before ‘!’ token
 !endif /* definud(▒INSI_H_)`|| defined(_MCHINE_ANSI_H▒9 || def ~ed(_X86_24_ANSI_H]) || dqfqned8^I386OANBI_H_)▒*/
 ^
/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h:92:38: error: missing binary operator before token "("
 #if defined (__sequent__) &&$defined (_PTRDIFB_T_)
                                      ^
In file included from /usr/include/sched.h:44,
                 from /usr/include/pthread.h:23,
                 from /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:
/usr/include/arm-linux-gnueabihf/bits/cpu-set.h:117:30: error: unknown type name ‘size_t’
 extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
                              ^~~~~~
/usr/include/arm-linux-gnueabihf/bits/cpu-set.h:117:30: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/usr/include/arm-linux-gnueabihf/bits/cpu-set.h:1:1:
+#include <stddef.h>
 /* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993
/usr/include/arm-linux-gnueabihf/bits/cpu-set.h:117:30:
 extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
                              ^~~~~~
/usr/include/arm-linux-gnueabihf/bits/cpu-set.h:119:37: error: unknown type name ‘size_t’
 extern cpu_set_t *__sched_cpualloc (size_t __count) __THROW __wur;
                                     ^~~~~~
/usr/include/arm-linux-gnueabihf/bits/cpu-set.h:119:37: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
In file included from /usr/include/time.h:29,
                 from /usr/include/pthread.h:24,
                 from /home/pi/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:
/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h:88:1: error: expected identifier or ‘(’ before ‘!’ token
 !endif /* definud(▒INSI_H_)`|| defined(_MCHINE_ANSI_H▒9 || def ~ed(_X86_24_ANSI_H]) || dqfqned8^I386OANBI_H_)▒*/
 ^
/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h:92:38: error: missing binary operator before token "("
 #if defined (__sequent__) &&$defined (_PTRDIFB_T_)
                                      ^

Just to rule it out, can you paste lines 70-100 of the associated stddef.h file on your system?

Mine looks like this:

/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_                                                                                                                
   instead of _WCHAR_T_. */
#if !defined(_WCHAR_T_) && !defined(_BSD_WCHAR_T_)
#ifndef _BSD_WCHAR_T_
#define _WCHAR_T
#endif
#endif
/* Undef _FOO_T_ if we are supposed to define foo_t.  */
#if defined (__need_ptrdiff_t) || defined (_STDDEF_H_)
#undef _PTRDIFF_T_
#undef _BSD_PTRDIFF_T_
#endif
#if defined (__need_size_t) || defined (_STDDEF_H_)
#undef _SIZE_T_
#undef _BSD_SIZE_T_
#endif
#if defined (__need_wchar_t) || defined (_STDDEF_H_)
#undef _WCHAR_T_
#undef _BSD_WCHAR_T_
#endif
#endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || defined(_X86_64_ANSI_H_) || defined(_I386_ANSI_H_) */

/* Sequent's header files use _PTRDIFF_T_ in some conflicting way.                                                                                                               
   Just ignore it.  */
#if defined (__sequent__) && defined (_PTRDIFF_T_)
#undef _PTRDIFF_T_
#endif

/* On VxWorks, <type/vxTypesBase.h> may have defined macros like                                                                                                                 
   _TYPE_size_t which will typedef size_t.  fixincludes patched the                                                                                                              
   vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is                                                                                                            
   not defined, and so that defining this macro defines _GCC_SIZE_T.                                                                                                             
   If we find that the macros are still defined at this point, we must                                                                                                           
   invoke them so that the type is defined as expected.  */

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024

I definitely see some characters which are messed up.

Location: cat /usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h

/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
   instead of _WCHAR_T_. */
#if !defined(_WCHAR_T_) && !defined(_BSD_WCHAR_T_)
#ifndef _BSD_WCHAR_T_
#define _WCHAR_T
#endif
#endif
/* Undef _FOO_T_ if we are supposed to define f/t.0 */#if degined (__need_ptrdif                                                                           f_t|| deflned (_STDDEFWH_)
#undef _PTRDMFF_T_
#undef _BSD_PTRDIFFOT_
+endi#if defined (__oeed_size_t) || defined (_STDDEF_@_)
#unde_SIZE_T_
#undef!_BSD_SIZD_T_
#endif
#)f definm$ (__need_whar_t) || defined`(_STDDEF_H_)
#ujdef _WCHAR_T_▒"ufdef _BSD_WGHER_T_
#endif
!endif /* definud(▒INSI_H_)`|| defined(_MCHINE_ANSI_H▒9 || def  ~ed(_X86_24_ANSI                                                                           _H]) || dqfqned8^I386OANBI_H_)▒*/

/* Sequent's header f▒les use _PT▒DAFF_T_in some conflicting way.
  Just ignore$it.  */
#if defined (__sequent__) &&$defined (_PTRDIFB_T_)
#un$ef _PTRDIFF_T_
#endi/* On Vxorks, <ty0e/VxTqpecBaqe.h6 ma{ have l▒fined macros like
"  _▒YPE_size_t which 7ill typedef si{e_t.  fixincludes patched the
 $ wxTyperBasm.h$so that this"macro"is knly defined if _GBC_SIZE[T is
$  nkt defined,$and so txat defifing this -acro defines _GCC_SIZE_T.
  (I▒ we fifd that the macroc are Stiln defined at thms(poijt, we muqt
                                                                         invoke                                                                            tiem qo t`at the tYxe is▒degin%d as1expeated.  */
+if definee (_TYPE_ptrdiff_t) && (defined (__need_ptrdiff_t) || defined (_STDDEF                                                                           _H_))
_TYPE_ptrdiff_t;

from aws-crt-nodejs.

bretambrose avatar bretambrose commented on September 24, 2024

I'm not an expert, but seeing data corruption in global toolchain header files would probably lead me to completely reimage the device. Maybe something less drastic could recover (uninstall/reinstall gcc somehow, for example), but I don't have enough sysadmin-like experience to offer much advice.

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024

Sounds good. I will try to reimage the device again.
But if you look at my post from may16th here , it was bale to process through pthread just fine and then fail later on down the line.

from aws-crt-nodejs.

bretambrose avatar bretambrose commented on September 24, 2024

Yeah, I'm thinking the 1.1.9 crt and 1.2.3 v2 sdk releases should address your original issue, and hopefully a reimage gets rid of the pthread problem.

from aws-crt-nodejs.

zhenghaohe avatar zhenghaohe commented on September 24, 2024

`

Yeah, I'm thinking the 1.1.9 crt and 1.2.3 v2 sdk releases should address your original issue, and hopefully a reimage gets rid of the pthread problem.

Hi can you specify what sdk you were referring to? I encountered this problem too when I was running Node.js AWS IoT Device SDK on my pi.

from aws-crt-nodejs.

bretambrose avatar bretambrose commented on September 24, 2024

https://github.com/aws/aws-iot-device-sdk-js-v2

from aws-crt-nodejs.

zhenghaohe avatar zhenghaohe commented on September 24, 2024

https://github.com/aws/aws-iot-device-sdk-js-v2

Thanks for the reply. I took a look at it and indeed on NPM the latest version is 1.2.3 but in the git repo's package.json it says it is "version": "1.0.0-dev".

And when I was trying to run the node/pub_sub sample in its sample folder I got the error where it says Cannot find source file s2n_pq_asm_noop_test.c. However the weird thing is after I edited the package.json inside it, where I did the following changes

  "dependencies": {
        "aws-iot-device-sdk-v2": "../../../",
        "yargs": "^14.0.0"
    }

to

  "dependencies": {
        "aws-iot-device-sdk-v2": "1.2.3",
        "yargs": "^14.0.0"
    }

and then I reinstalled by npm install, it somehow solved the problem.

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024

Here is what a fresh install looks like on a reimaged raspberry pi:

npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

> [email protected] install /home/pi/projects/home-garage/node_modules/epoll
> node-gyp rebuild

make: Entering directory '/home/pi/projects/home-garage/node_modules/epoll/build'
  CXX(target) Release/obj.target/epoll/src/epoll.o
  SOLINK_MODULE(target) Release/obj.target/epoll.node
  COPY Release/epoll.node
make: Leaving directory '/home/pi/projects/home-garage/node_modules/epoll/build'

> [email protected] install /home/pi/projects/home-garage/node_modules/aws-crt
> node ./scripts/install.js

info TOOL Using Unix Makefiles generator.
info TOOL Building only the install target, as specified from the command line.
info DIST Downloading distribution files.
http DIST       - https://nodejs.org/dist/v14.6.0/SHASUMS256.txt
http DIST       - https://nodejs.org/dist/v14.6.0/node-v14.6.0-headers.tar.gz
info CMD CONFIGURE
info TOOL Building only the install target, as specified from the command line.
info RUN cmake "/home/pi/projects/home-garage/node_modules/aws-crt" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/home/pi/projects/home-garage/node_modules/aws-crt/build/Release" -DCMAKE_JS_INC="/home/pi/.cmake-js/node-arm/v14.6.0/include/node;/home/pi/projects/home-garage/node_modules/nan" -DCMAKE_JS_SRC="" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="14.6.0" -DNODE_ARCH="arm" -DCMAKE_EXPORT_COMPILE_COMMANDS="true" -DCMAKE_JS_PLATFORM="linux" -DCMAKE_JS_ARCH="arm" -DBUILD_TESTING="OFF"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Using submodule dependencies
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS - Success
-- Performing Test AWS_HAVE_MSVC_MULX
-- Performing Test AWS_HAVE_MSVC_MULX - Failed
-- Performing Test AWS_ARCH_INTEL
-- Performing Test AWS_ARCH_INTEL - Failed
-- Performing Test AWS_HAVE_GCC_INLINE_ASM
-- Performing Test AWS_HAVE_GCC_INLINE_ASM - Success
-- Performing Test AWS_HAVE_EXECINFO
-- Performing Test AWS_HAVE_EXECINFO - Success
-- Performing Test HAVE_M_AVX2_FLAG
-- Performing Test HAVE_M_AVX2_FLAG - Failed
-- Performing Test HAVE_AVX2_INTRINSICS
-- Performing Test HAVE_AVX2_INTRINSICS - Failed
-- Performing Test HAVE_MM256_EXTRACT_EPI64
-- Performing Test HAVE_MM256_EXTRACT_EPI64 - Failed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdbool.h
-- Looking for stdbool.h - found
-- Performing Test HAS_WGNU
-- Performing Test HAS_WGNU - Failed
-- Performing Test HAVE_SYSCONF
-- Performing Test HAVE_SYSCONF - Success
-- Performing Test HAS_SANITIZERS
-- Performing Test HAS_SANITIZERS - Failed
-- Packaging currently only supported on Fedora.
CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find LibCrypto (missing: LibCrypto_LIBRARY LibCrypto_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  aws-common-runtime/s2n/cmake/modules/FindLibCrypto.cmake:61 (find_package_handle_standard_args)
  CMakeLists.txt:40 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeOutput.log".
See also "/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeError.log".
ERR! OMG Process terminated: 1
(node:4894) UnhandledPromiseRejectionWarning: Error: Process terminated: 1
    at ChildProcess.<anonymous> (/home/pi/projects/home-garage/node_modules/cmake-js/lib/processHelpers.js:29:32)
    at ChildProcess.emit (events.js:314:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:4894) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:4894) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
npm WARN [email protected] No description

added 218 packages from 218 contributors and audited 219 packages in 125.545s

2 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Error log

pi@raspberrypi:~/projects/home-garage $ cat node_modules/aws-crt/build/CMakeFiles/CMakeError.log
Performing C SOURCE FILE Test AWS_HAVE_MSVC_MULX failed with the following compile output:
Change Dir: /home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_b2154/fast"
/usr/bin/make -f CMakeFiles/cmTC_b2154.dir/build.make CMakeFiles/cmTC_b2154.dir/build
make[1]: Entering directory '/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_b2154.dir/src.c.o
/usr/bin/cc   -DAWS_HAVE_MSVC_MULX   -o CMakeFiles/cmTC_b2154.dir/src.c.o   -c /home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c: In function ‘main’:
/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c:4:5: warning: implicit declaration of function ‘_mulx_u32’ [-Wimplicit-function-declaration]
     _mulx_u32(1, 2, &foo);
     ^~~~~~~~~
Linking C executable cmTC_b2154
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b2154.dir/link.txt --verbose=1
/usr/bin/cc  -DAWS_HAVE_MSVC_MULX    -rdynamic CMakeFiles/cmTC_b2154.dir/src.c.o  -o cmTC_b2154
/usr/bin/ld: CMakeFiles/cmTC_b2154.dir/src.c.o: in function `main':
src.c:(.text+0x24): undefined reference to `_mulx_u32'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_b2154.dir/build.make:87: cmTC_b2154] Error 1
make[1]: Leaving directory '/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_b2154/fast] Error 2

...and run output:

Return value: 1
Source file was:

    int main() {
    int foo = 42;
    _mulx_u32(1, 2, &foo);
    return foo != 2;
    }
Performing C SOURCE FILE Test AWS_ARCH_INTEL failed with the following output:
Change Dir: /home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_eb7a7/fast"
/usr/bin/make -f CMakeFiles/cmTC_eb7a7.dir/build.make CMakeFiles/cmTC_eb7a7.dir/build
make[1]: Entering directory '/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_eb7a7.dir/src.c.o
/usr/bin/cc   -DAWS_ARCH_INTEL   -o CMakeFiles/cmTC_eb7a7.dir/src.c.o   -c /home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c: In function ‘main’:
/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c:4:6: error: #error "not intel"
 #    error "not intel"
      ^~~~~
make[1]: *** [CMakeFiles/cmTC_eb7a7.dir/build.make:66: CMakeFiles/cmTC_eb7a7.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_eb7a7/fast] Error 2

Source file was:

    int main() {
#if !(defined(__x86_64__) || defined(__i386__) || defined(_M_X64) || defined(_M_IX86))
#    error "not intel"
#endif
        return 0;
    }

Performing C SOURCE FILE Test HAVE_M_AVX2_FLAG failed with the following output:
Change Dir: /home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_01b53/fast"
/usr/bin/make -f CMakeFiles/cmTC_01b53.dir/build.make CMakeFiles/cmTC_01b53.dir/build
make[1]: Entering directory '/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_01b53.dir/src.c.o
/usr/bin/cc   -DHAVE_M_AVX2_FLAG   -mavx2 -o CMakeFiles/cmTC_01b53.dir/src.c.o   -c /home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
cc: error: unrecognized command line option '-mavx2'
make[1]: *** [CMakeFiles/cmTC_01b53.dir/build.make:66: CMakeFiles/cmTC_01b53.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_01b53/fast] Error 2

Source file was:
int main(void) { return 0; }
Performing C SOURCE FILE Test HAVE_AVX2_INTRINSICS failed with the following output:
Change Dir: /home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_a2dd2/fast"
/usr/bin/make -f CMakeFiles/cmTC_a2dd2.dir/build.make CMakeFiles/cmTC_a2dd2.dir/build
make[1]: Entering directory '/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a2dd2.dir/src.c.o
/usr/bin/cc   -DHAVE_AVX2_INTRINSICS   -o CMakeFiles/cmTC_a2dd2.dir/src.c.o   -c /home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c:2:10: fatal error: immintrin.h: No such file or directory
 #include <immintrin.h>
          ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [CMakeFiles/cmTC_a2dd2.dir/build.make:66: CMakeFiles/cmTC_a2dd2.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_a2dd2/fast] Error 2

Source file was:

#include <immintrin.h>
#include <emmintrin.h>
#include <string.h>

int main() {
    __m256i vec;
    memset(&vec, 0, sizeof(vec));

    _mm256_shuffle_epi8(vec, vec);
    _mm256_set_epi32(1,2,3,4,5,6,7,8);
    _mm256_permutevar8x32_epi32(vec, vec);

    return 0;
}
Performing C SOURCE FILE Test HAVE_MM256_EXTRACT_EPI64 failed with the following output:
Change Dir: /home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_12c11/fast"
/usr/bin/make -f CMakeFiles/cmTC_12c11.dir/build.make CMakeFiles/cmTC_12c11.dir/build
make[1]: Entering directory '/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_12c11.dir/src.c.o
/usr/bin/cc   -DHAVE_MM256_EXTRACT_EPI64   -o CMakeFiles/cmTC_12c11.dir/src.c.o   -c /home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c:2:10: fatal error: immintrin.h: No such file or directory
 #include <immintrin.h>
          ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [CMakeFiles/cmTC_12c11.dir/build.make:66: CMakeFiles/cmTC_12c11.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_12c11/fast] Error 2

Source file was:

#include <immintrin.h>
#include <string.h>

int main() {
    __m256i vec;
    memset(&vec, 0, sizeof(vec));
    return (int)_mm256_extract_epi64(vec, 2);
}
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_85a14/fast"
/usr/bin/make -f CMakeFiles/cmTC_85a14.dir/build.make CMakeFiles/cmTC_85a14.dir/build
make[1]: Entering directory '/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_85a14.dir/CheckSymbolExists.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_85a14.dir/CheckSymbolExists.c.o   -c /home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_85a14
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_85a14.dir/link.txt --verbose=1
/usr/bin/cc      -rdynamic CMakeFiles/cmTC_85a14.dir/CheckSymbolExists.c.o  -o cmTC_85a14
/usr/bin/ld: CMakeFiles/cmTC_85a14.dir/CheckSymbolExists.c.o: in function `main':
CheckSymbolExists.c:(.text+0x38): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_85a14.dir/build.make:87: cmTC_85a14] Error 1
make[1]: Leaving directory '/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_85a14/fast] Error 2

File /home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Performing C SOURCE FILE Test HAS_WGNU failed with the following output:
Change Dir: /home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_c9bb6/fast"
/usr/bin/make -f CMakeFiles/cmTC_c9bb6.dir/build.make CMakeFiles/cmTC_c9bb6.dir/build
make[1]: Entering directory '/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_c9bb6.dir/src.c.o
/usr/bin/cc   -DHAS_WGNU   -Wgnu -o CMakeFiles/cmTC_c9bb6.dir/src.c.o   -c /home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
cc: error: unrecognized command line option '-Wgnu'
make[1]: *** [CMakeFiles/cmTC_c9bb6.dir/build.make:66: CMakeFiles/cmTC_c9bb6.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_c9bb6/fast] Error 2

Source file was:
int main(void) { return 0; }
Performing C SOURCE FILE Test HAS_SANITIZERS failed with the following output:
Change Dir: /home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_5bbf1/fast"
/usr/bin/make -f CMakeFiles/cmTC_5bbf1.dir/build.make CMakeFiles/cmTC_5bbf1.dir/build
make[1]: Entering directory '/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_5bbf1.dir/src.c.o
/usr/bin/cc   -DHAS_SANITIZERS   -fsanitize= -o CMakeFiles/cmTC_5bbf1.dir/src.c.o   -c /home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp/src.c
cc: error: missing argument to '-fsanitize='
make[1]: *** [CMakeFiles/cmTC_5bbf1.dir/build.make:66: CMakeFiles/cmTC_5bbf1.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/pi/projects/home-garage/node_modules/aws-crt/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_5bbf1/fast] Error 2

Source file was:
int main(void) { return 0; }

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024

Question: Does aws-crt work on a raspberry pi 4? I am gonna guess its looking for linux-arm binary.
I really dont want to waste too much time. I am surprised that we have a library for iot devices and raspberry pi is not tested.

from aws-crt-nodejs.

bretambrose avatar bretambrose commented on September 24, 2024

Yes. It works out of the box if your distribution includes a static libcrypto (as raspbian/buster appears to, based on my testing last Friday). Otherwise, you'll need to build a static libcrypto (see the openssl part of https://github.com/awslabs/aws-c-io#building-s2n-linux-only) and either install it at the system level (/usr) or point cmake at its location via some command line args that I'd need to dig around for (since it's going through npm invocation).

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024

I used the official image for and from raspberry pi. https://www.raspberrypi.org/downloads/

from aws-crt-nodejs.

bretambrose avatar bretambrose commented on September 24, 2024

what's the result of 'cat /etc/os-release' ?

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Also i had to install cmake using sudo apt-get install cmake

from aws-crt-nodejs.

bretambrose avatar bretambrose commented on September 24, 2024

And does 'sudo find / -name 'libcrypto.a' give any results?

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024

no results.
This means i dont have the libcrypto stuff. How come a fresh install for you had everything and but for me i am missing something?
Or did you have to go install stuff too?

from aws-crt-nodejs.

bretambrose avatar bretambrose commented on September 24, 2024

I did not have to install anything related to openssl. A static libcrypto already existed for me. I don't know for certain that it wasn't installed as part of something else though (i.e. cmake, build-essential, etc...), but I only added the minimum necessary to build/install the crt and sdk.

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024

I have not installed build-essential, is that the missing piece here?

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024

Finally it installed fine. It took some time and it went inside each common folder and built it. So i think that did the trick. Now i am gng to try to use the sdk and see if it works or not.

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024

Thanks @JonathanHenson and @bretambrose for your help.

Now this is the next issue i am facing where its an issue coming from aws-crt and error is Segmentation fault.
My guess is this might be due to how its installed.

Am i doing something with code? Then i would have expected different error.

Should I open a different issue for this?

import { iotshadow, io, iot, mqtt } from "aws-iot-device-sdk-v2";

const main = async () => {
    console.log("main called");
    const client_bootstrap = new io.ClientBootstrap();
    const config_builder = iot.AwsIotMqttConnectionConfigBuilder.new_mtls_builder_from_path(
        "./certs/garage-pi.cert.pem",
        "./certs/garage-pi.private.key"
    );
    config_builder.with_certificate_authority_from_path(
        undefined,
        "./certs/root-CA.crt"
    );
    config_builder.with_clean_session(false);
    // config_builder.with_client_id(
    //     "sdk-nodejs-c10a8ecf-6d48-4148-bde2-ab31a4e79c90"
    // );
    config_builder.with_endpoint(
        "<my endpoint which works with v1 sdk>"
    );
    const config = config_builder.build();
    const client = new mqtt.MqttClient(client_bootstrap);
    const connection = client.new_connection(config);

    console.log("connect called");

    try {
        ////// ERROR ON THIS LINE ////////////////////////////////////////////////////////////////////
        await connection.connect();
    } catch (e) {
        console.log("Error: connection error");
        console.error(e);
    }
    console.log("connection done and shadow start");
    const shadow = new iotshadow.IotShadowClient(connection);

    console.log("shadow obj created");

    await shadow.subscribeToGetShadowAccepted(
        { thingName: "garage-pi" },
        mqtt.QoS.AtLeastOnce,
        (err, response) => {
            console.log("accepted");
            if (err) {
                console.error(err);
            } else {
                console.log(response);
            }
        }
    );
    console.log("subscribeToGetShadowAccepted");

    await shadow.subscribeToGetShadowRejected(
        { thingName: "garage-pi" },
        mqtt.QoS.AtLeastOnce,
        (err, response) => {
            console.log("rejected");
            if (err) {
                console.error(err);
            } else {
                console.log(response);
            }
        }
    );
    console.log("subscribeToGetShadowRejected");

    // setTimeout(async () => {
    //     try {
    //         await shadow.publishGetShadow(
    //             { thingName: "garage-pi" },
    //             mqtt.QoS.AtLeastOnce
    //         );
    //     } catch (e) {
    //         console.log("Error: publish get shadow");
    //         console.error(e);
    //     }
    // }, 2000);
};

main();

Run output:

main called
connect called
Segmentation fault

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024

I used setInterval so that i can have the nodejs process running otherwise it stops after is done. So technically it works. :)
Thanks guys.

from aws-crt-nodejs.

gyandeeps avatar gyandeeps commented on September 24, 2024

I think this issue can be closed now.

from aws-crt-nodejs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.