Giter Site home page Giter Site logo

aws-c-event-stream's Introduction

AWS C Event Stream

C99 implementation of the vnd.amazon.event-stream content-type.

License

This library is licensed under the Apache 2.0 License.

Usage

Building

CMake 3.1+ is required to build.

<install-path> must be an absolute path in the following instructions.

Linux-Only Dependencies

If you are building on Linux, you will need to build aws-lc and s2n-tls first.

git clone [email protected]:awslabs/aws-lc.git
cmake -S aws-lc -B aws-lc/build -DCMAKE_INSTALL_PREFIX=<install-path>
cmake --build aws-lc/build --target install

git clone [email protected]:aws/s2n-tls.git
cmake -S s2n-tls -B s2n-tls/build -DCMAKE_INSTALL_PREFIX=<install-path> -DCMAKE_PREFIX_PATH=<install-path>
cmake --build s2n-tls/build --target install

Building aws-c-event-stream and Remaining Dependencies

git clone [email protected]:awslabs/aws-c-common.git
cmake -S aws-c-common -B aws-c-common/build -DCMAKE_INSTALL_PREFIX=<install-path>
cmake --build aws-c-common/build --target install

git clone [email protected]:awslabs/aws-checksums.git
cmake -S aws-checksums -B aws-checksums/build -DCMAKE_INSTALL_PREFIX=<install-path> -DCMAKE_PREFIX_PATH=<install-path>
cmake --build aws-checksums/build --target install

git clone [email protected]:awslabs/aws-c-cal.git
cmake -S aws-c-cal -B aws-c-cal/build -DCMAKE_INSTALL_PREFIX=<install-path> -DCMAKE_PREFIX_PATH=<install-path>
cmake --build aws-c-cal/build --target install

git clone [email protected]:awslabs/aws-c-io.git
cmake -S aws-c-io -B aws-c-io/build -DCMAKE_INSTALL_PREFIX=<install-path> -DCMAKE_PREFIX_PATH=<install-path>
cmake --build aws-c-io/build --target install

git clone [email protected]:awslabs/aws-c-event-stream.git
cmake -S aws-c-event-stream -B aws-c-event-stream/build -DCMAKE_INSTALL_PREFIX=<install-path> -DCMAKE_PREFIX_PATH=<install-path>
cmake --build aws-c-event-stream/build --target install

aws-c-event-stream's People

Contributors

bretambrose avatar coldencullen avatar dmitriymusatkin avatar graebm avatar jmklix avatar jonathanhenson avatar justinboswell avatar marcomagdy avatar mattparks avatar rccarper avatar singku avatar singku-china avatar tingdaok avatar twistedtwigleg avatar waahm7 avatar wps132230 avatar yasminetalby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-c-event-stream's Issues

aws-c-event-stream not found

I'm attempting to use dynamodb on a NVIDIA Jetson NX which runs the ARM version of Ubuntu 18.04.

I've built and installed the AWS SDK CPP v1.8.174. But when I attempt to use FIND_PACKAGE (AWSSDK COMPONENTS dynamodb REQUIRED) in my CMakeLists.txt file, I've run into this error:

-- Found AWS SDK for C++, Version: 1.8.174, Install Root:/usr, Platform Prefix:, Platform Dependent Libraries: pthread;crypto;ssl;z;curl
-- Components specified for AWSSDK: dynamodb, application will be depending on libs: aws-cpp-sdk-dynamodb;aws-cpp-sdk-core
-- Try finding aws-cpp-sdk-core
CMake Error at /snap/cmake/847/share/cmake-3.20/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
  Found package configuration file:

    /usr/lib/aws-c-event-stream/cmake/aws-c-event-stream-config.cmake

  but it set aws-c-event-stream_FOUND to FALSE so package
  "aws-c-event-stream" is considered to be NOT FOUND.  Reason given by
  package:

  The following imported targets are referenced, but are missing:
  AWS::aws-c-io

Call Stack (most recent call first):
  /usr/lib/cmake/aws-cpp-sdk-core/aws-cpp-sdk-core-config.cmake:2 (find_dependency)
  /usr/lib/cmake/AWSSDK/AWSSDKConfig.cmake:292 (find_package)
  CMakeLists.txt:48 (FIND_PACKAGE)

Being unfamiliar with the AWS SDK, I could use some assistance. Is aws-c-event-stream supposed to be part of the AWS SDK? Anyone know how to fix this problem?

Make Aws::S3::S3Client::ComputeEndpointString() public

Could you please change Aws::S3::S3Client::ComputeEndpointString() from private to public? It is useful in troubleshooting endpoints for disconnected systems.

File: aws-cpp-sdk-s3/include/aws/s3/S3Client.h

Thanks,

The cmake build of the library is not working, it keep breaking as there are missing includes

The building of the aws-c-event-stream library is breaking as a result of missing includes and libraries. Googling the issue does not return any issues relating to the error messages generated. The build is not possible without the following:

CMake Error at CMakeLists.txt:17 (include):
include could not find load file:

AwsCFlags

CMake Error at CMakeLists.txt:18 (include):
include could not find load file:

Sanitizers

CMake Error at CMakeLists.txt:55 (aws_set_common_properties):
Unknown CMake command "aws_set_common_properties".

I am attaching the cmake logs relating to this issue:

CMakeOutput.log

I need this library to build the aws-sdk-cpp library. Your urgent attention to this issue is appreciated.

Rebecca Lim.

I can not compile aws-c-event-stream, how to solve the problem?

lumenle@lumenle-virtual-machine:~/lib/aws-c-event-stream/build$ cmake ..
CMake Error at /home/lumenle/lib/aws-c-common/cmake/aws-c-common-config.cmake:10 (include):
include could not find load file:

/home/lumenle/lib/aws-c-common/cmake/static/@[email protected]

Call Stack (most recent call first):
CMakeLists.txt:87 (find_package)

CMake Error at /home/lumenle/lib/aws-checksums/cmake/aws-checksums-config.cmake:4 (include):
include could not find load file:

/home/lumenle/lib/aws-checksums/cmake/static/@[email protected]

Call Stack (most recent call first):
CMakeLists.txt:88 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/lumenle/lib/aws-c-event-stream/build/CMakeFiles/CMakeOutput.log".
See also "/home/lumenle/lib/aws-c-event-stream/build/CMakeFiles/CMakeError.log".

Are aws_write_* being used properly?

They are defined here as:
AWS_STATIC_IMPL void aws_write_u64(uint64_t value, uint8_t *buffer)
AWS_STATIC_IMPL void aws_write_u32(uint32_t value, uint8_t *buffer)
AWS_STATIC_IMPL void aws_write_u24(uint32_t value, uint8_t *buffer)
AWS_STATIC_IMPL void aws_write_u16(uint16_t value, uint8_t *buffer)

But used here as:

aws_write_u16(buffer_alias, header->header_value_len);
aws_write_u32(message->message_buffer, total_length);
aws_write_u32(buffer_offset, headers_length);
aws_write_u32(buffer_offset, running_crc);
aws_write_u32(buffer_offset, running_crc);
aws_write_u16(header.header_value.static_val, (uint16_t)value);
aws_write_u32(header.header_value.static_val, (uint32_t)value);
aws_write_u64(header.header_value.static_val, (uint64_t)value);
aws_write_u64(header.header_value.static_val, (uint64_t)value);

The build is failing as you can see here https://gist.github.com/daniloegea/3858685358f64104b7bbe4cad6005dd7

Thanks!

make error

[ 9%] Building C object CMakeFiles/aws-c-event-stream.dir/source/event_stream.c.o
/home/ubuntu/aws-c-event-stream/source/event_stream.c: In function ‘add_headers_to_buffer’:
/home/ubuntu/aws-c-event-stream/source/event_stream.c:156:31: error: passing argument 1 of ‘aws_write_u16’ makes integer from pointer without a cast [-Werror=int-conversion]
aws_write_u16(buffer_alias, header->header_value_len);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:154:22: note: expected ‘uint16_t {aka short unsigned int}’ but argument is of type ‘uint8_t * {aka unsigned char *}’
AWS_STATIC_IMPL void aws_write_u16(uint16_t value, uint8_t *buffer) {
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c:156:45: error: passing argument 2 of ‘aws_write_u16’ makes pointer from integer without a cast [-Werror=int-conversion]
aws_write_u16(buffer_alias, header->header_value_len);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:154:22: note: expected ‘uint8_t * {aka unsigned char *}’ but argument is of type ‘uint16_t {aka short unsigned int}’
AWS_STATIC_IMPL void aws_write_u16(uint16_t value, uint8_t *buffer) {
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c: In function ‘aws_event_stream_message_init’:
/home/ubuntu/aws-c-event-stream/source/event_stream.c:280:23: error: passing argument 1 of ‘aws_write_u32’ makes integer from pointer without a cast [-Werror=int-conversion]
aws_write_u32(message->message_buffer, total_length);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:110:22: note: expected ‘uint32_t {aka unsigned int}’ but argument is of type ‘uint8_t * {aka unsigned char *}’
AWS_STATIC_IMPL void aws_write_u32(uint32_t value, uint8_t *buffer) {
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c:280:48: error: passing argument 2 of ‘aws_write_u32’ makes pointer from integer without a cast [-Werror=int-conversion]
aws_write_u32(message->message_buffer, total_length);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:110:22: note: expected ‘uint8_t * {aka unsigned char *}’ but argument is of type ‘uint32_t {aka unsigned int}’
AWS_STATIC_IMPL void aws_write_u32(uint32_t value, uint8_t *buffer) {
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c:282:23: error: passing argument 1 of ‘aws_write_u32’ makes integer from pointer without a cast [-Werror=int-conversion]
aws_write_u32(buffer_offset, headers_length);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:110:22: note: expected ‘uint32_t {aka unsigned int}’ but argument is of type ‘uint8_t * {aka unsigned char *}’
AWS_STATIC_IMPL void aws_write_u32(uint32_t value, uint8_t *buffer) {
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c:282:38: error: passing argument 2 of ‘aws_write_u32’ makes pointer from integer without a cast [-Werror=int-conversion]
aws_write_u32(buffer_offset, headers_length);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:110:22: note: expected ‘uint8_t * {aka unsigned char *}’ but argument is of type ‘uint32_t {aka unsigned int}’
AWS_STATIC_IMPL void aws_write_u32(uint32_t value, uint8_t *buffer) {
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c:289:23: error: passing argument 1 of ‘aws_write_u32’ makes integer from pointer without a cast [-Werror=int-conversion]
aws_write_u32(buffer_offset, running_crc);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:110:22: note: expected ‘uint32_t {aka unsigned int}’ but argument is of type ‘uint8_t * {aka unsigned char *}’
AWS_STATIC_IMPL void aws_write_u32(uint32_t value, uint8_t *buffer) {
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c:289:38: error: passing argument 2 of ‘aws_write_u32’ makes pointer from integer without a cast [-Werror=int-conversion]
aws_write_u32(buffer_offset, running_crc);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:110:22: note: expected ‘uint8_t * {aka unsigned char *}’ but argument is of type ‘uint32_t {aka unsigned int}’
AWS_STATIC_IMPL void aws_write_u32(uint32_t value, uint8_t *buffer) {
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c:303:23: error: passing argument 1 of ‘aws_write_u32’ makes integer from pointer without a cast [-Werror=int-conversion]
aws_write_u32(buffer_offset, running_crc);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:110:22: note: expected ‘uint32_t {aka unsigned int}’ but argument is of type ‘uint8_t * {aka unsigned char *}’
AWS_STATIC_IMPL void aws_write_u32(uint32_t value, uint8_t *buffer) {
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c:303:38: error: passing argument 2 of ‘aws_write_u32’ makes pointer from integer without a cast [-Werror=int-conversion]
aws_write_u32(buffer_offset, running_crc);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:110:22: note: expected ‘uint8_t * {aka unsigned char *}’ but argument is of type ‘uint32_t {aka unsigned int}’
AWS_STATIC_IMPL void aws_write_u32(uint32_t value, uint8_t *buffer) {
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c: In function ‘aws_event_stream_message_to_debug_str’:
/home/ubuntu/aws-c-event-stream/source/event_stream.c:504:35: error: passing argument 1 of ‘aws_base64_encode’ from incompatible pointer type [-Werror=incompatible-pointer-types]
aws_base64_encode(&to_encode, &encode_output);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:69:5: note: expected ‘const struct aws_byte_cursor * restrict’ but argument is of type ‘struct aws_byte_buf *’
int aws_base64_encode(const struct aws_byte_cursor *AWS_RESTRICT to_encode, struct aws_byte_buf *AWS_RESTRICT output);
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c:508:35: error: passing argument 1 of ‘aws_base64_encode’ from incompatible pointer type [-Werror=incompatible-pointer-types]
aws_base64_encode(&to_encode, &encode_output);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:69:5: note: expected ‘const struct aws_byte_cursor * restrict’ but argument is of type ‘struct aws_byte_buf *’
int aws_base64_encode(const struct aws_byte_cursor *AWS_RESTRICT to_encode, struct aws_byte_buf *AWS_RESTRICT output);
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c:539:23: error: passing argument 1 of ‘aws_base64_encode’ from incompatible pointer type [-Werror=incompatible-pointer-types]
aws_base64_encode(&payload_buffer, &encoded_payload_buffer);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:69:5: note: expected ‘const struct aws_byte_cursor * restrict’ but argument is of type ‘struct aws_byte_buf *’
int aws_base64_encode(const struct aws_byte_cursor *AWS_RESTRICT to_encode, struct aws_byte_buf *AWS_RESTRICT output);
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c: In function ‘aws_event_stream_add_int16_header’:
/home/ubuntu/aws-c-event-stream/source/event_stream.c:655:19: error: passing argument 1 of ‘aws_write_u16’ makes integer from pointer without a cast [-Werror=int-conversion]
aws_write_u16(header.header_value.static_val, (uint16_t)value);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:154:22: note: expected ‘uint16_t {aka short unsigned int}’ but argument is of type ‘uint8_t * {aka unsigned char *}’
AWS_STATIC_IMPL void aws_write_u16(uint16_t value, uint8_t *buffer) {
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c:655:51: error: passing argument 2 of ‘aws_write_u16’ makes pointer from integer without a cast [-Werror=int-conversion]
aws_write_u16(header.header_value.static_val, (uint16_t)value);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:154:22: note: expected ‘uint8_t * {aka unsigned char *}’ but argument is of type ‘short unsigned int’
AWS_STATIC_IMPL void aws_write_u16(uint16_t value, uint8_t *buffer) {
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c: In function ‘aws_event_stream_add_int32_header’:
/home/ubuntu/aws-c-event-stream/source/event_stream.c:673:19: error: passing argument 1 of ‘aws_write_u32’ makes integer from pointer without a cast [-Werror=int-conversion]
aws_write_u32(header.header_value.static_val, (uint32_t)value);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:110:22: note: expected ‘uint32_t {aka unsigned int}’ but argument is of type ‘uint8_t * {aka unsigned char *}’
AWS_STATIC_IMPL void aws_write_u32(uint32_t value, uint8_t *buffer) {
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c:673:51: error: passing argument 2 of ‘aws_write_u32’ makes pointer from integer without a cast [-Werror=int-conversion]
aws_write_u32(header.header_value.static_val, (uint32_t)value);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:110:22: note: expected ‘uint8_t * {aka unsigned char *}’ but argument is of type ‘unsigned int’
AWS_STATIC_IMPL void aws_write_u32(uint32_t value, uint8_t *buffer) {
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c: In function ‘aws_event_stream_add_int64_header’:
/home/ubuntu/aws-c-event-stream/source/event_stream.c:691:19: error: passing argument 1 of ‘aws_write_u64’ makes integer from pointer without a cast [-Werror=int-conversion]
aws_write_u64(header.header_value.static_val, (uint64_t)value);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:89:22: note: expected ‘uint64_t {aka long unsigned int}’ but argument is of type ‘uint8_t * {aka unsigned char *}’
AWS_STATIC_IMPL void aws_write_u64(uint64_t value, uint8_t *buffer) {
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c:691:51: error: passing argument 2 of ‘aws_write_u64’ makes pointer from integer without a cast [-Werror=int-conversion]
aws_write_u64(header.header_value.static_val, (uint64_t)value);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:89:22: note: expected ‘uint8_t * {aka unsigned char *}’ but argument is of type ‘long unsigned int’
AWS_STATIC_IMPL void aws_write_u64(uint64_t value, uint8_t *buffer) {
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c: In function ‘aws_event_stream_add_timestamp_header’:
/home/ubuntu/aws-c-event-stream/source/event_stream.c:724:19: error: passing argument 1 of ‘aws_write_u64’ makes integer from pointer without a cast [-Werror=int-conversion]
aws_write_u64(header.header_value.static_val, (uint64_t)value);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:89:22: note: expected ‘uint64_t {aka long unsigned int}’ but argument is of type ‘uint8_t * {aka unsigned char *}’
AWS_STATIC_IMPL void aws_write_u64(uint64_t value, uint8_t *buffer) {
^
/home/ubuntu/aws-c-event-stream/source/event_stream.c:724:51: error: passing argument 2 of ‘aws_write_u64’ makes pointer from integer without a cast [-Werror=int-conversion]
aws_write_u64(header.header_value.static_val, (uint64_t)value);
^
In file included from /home/ubuntu/aws-c-event-stream/source/event_stream.c:20:0:
/home/ubuntu/install/include/aws/common/encoding.h:89:22: note: expected ‘uint8_t * {aka unsigned char *}’ but argument is of type ‘long unsigned int’
AWS_STATIC_IMPL void aws_write_u64(uint64_t value, uint8_t *buffer) {
^
cc1: all warnings being treated as errors
CMakeFiles/aws-c-event-stream.dir/build.make:62: recipe for target 'CMakeFiles/aws-c-event-stream.dir/source/event_stream.c.o' failed
make[2]: *** [CMakeFiles/aws-c-event-stream.dir/source/event_stream.c.o] Error 1
CMakeFiles/Makefile2:355: recipe for target 'CMakeFiles/aws-c-event-stream.dir/all' failed
make[1]: *** [CMakeFiles/aws-c-event-stream.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

aws-sdk-cpp dependent aws-c-event-stream but it Compile error

[ 75%] Performing download step (git clone) for 'AwsCEventStream'
正克隆到 'AwsCEventStream'...
已经位于 'master'
您的分支与上游分支 'origin/master' 一致。
[ 79%] No patch step for 'AwsCEventStream'
[ 83%] No update step for 'AwsCEventStream'
[ 87%] Performing configure step for 'AwsCEventStream'
-- The C compiler identification is GNU 5.4.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
CMake Error at CMakeLists.txt:30 (include):
include could not find load file:

AwsFindPackage

-- 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
CMake Error at CMakeLists.txt:77 (aws_use_package):
Unknown CMake command "aws_use_package".

Shall we not call on_prelude() if received prelude is incorrect.

decoder->on_prelude(decoder, &decoder->prelude, decoder->user_context);
decoder->running_crc = aws_checksums_crc32(decoder->working_buffer, PRELUDE_CRC_OFFSET, 0);

If service encountered error and respond error as xml document (in several cases like s3 select and transcribe streaming). The prelude resolution logic in above code will try to translate xml document as prelude bytes, result in random values, but on_prelude callback in customer application don't know if those prelude data is correct or not. Customer will have to verify the prelude crc by themselves. If they don't do(know) that, there is potential risk of crash.

My question is shall aws-c-event-stream not call on_prelude if crc check failed.

AWS C/C++ packages use non-standard cmake module paths breaking most distributions

I am currently packaging aws-c-common, aws-checkums and aws-c-event-stream for openSUSE as these packages are now required for the aws-sdk-cpp which is already part of openSUSE and SLE.

While packaging, I have run into the problem that the cmake configuration in aws-c-event-stream couldn't find AwsCFlags and AwsSanitizers:

[    5s] CMake Error at CMakeLists.txt:17 (include):
[    5s]   include could not find load file:
[    5s] 
[    5s]     AwsCFlags
[    5s] 
[    5s] 
[    5s] CMake Error at CMakeLists.txt:18 (include):
[    5s]   include could not find load file:
[    5s] 
[    5s]     AwsSanitizers
[    5s] 
[    5s] 
[    5s] CMake Error at CMakeLists.txt:54 (aws_set_common_properties):
[    5s]   Unknown CMake command "aws_set_common_properties".
[    5s] 
[    5s] 
[    5s] -- Configuring incomplete, errors occurred!
[    5s] See also "/home/abuild/rpmbuild/BUILD/aws-c-event-stream-0.1.0/build/CMakeFiles/CMakeOutput.log".
[    5s] error: Bad exit status from /var/tmp/rpm-tmp.QpHCox (%build)

A simple workaround fixes the problem for me:

diff -Nru aws-c-event-stream-0.1.0.orig/CMakeLists.txt aws-c-event-stream-0.1.0/CMakeLists.txt
--- aws-c-event-stream-0.1.0.orig/CMakeLists.txt        2018-12-18 04:15:43.000000000 +0100
+++ aws-c-event-stream-0.1.0/CMakeLists.txt     2019-02-08 14:56:12.388040665 +0100
@@ -13,7 +13,7 @@
 cmake_minimum_required (VERSION 3.1)
 project (aws-c-event-stream C)
 
-list(APPEND CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/lib/cmake")
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/lib64/cmake")
 include(AwsCFlags)
 include(AwsSanitizers)
 include(CheckCCompilerFlag)

The proper fix is certainly to use find_library() instead of include() in this case.

Shared libary without SO version

With the last release, aws-c-event-stream dropped its SO version.

However, this is not allowed according to spec as SO versions are mandatory for shared libraries.

Please see the full explanation that I gave for aws-c-common here: awslabs/aws-c-common#698

aws-c-event-stream error during cmake

I have installed aws-c-common and aws-c-checksum.

Now I am trying to install aws-c-event-stream but getting the error. Steps I am following after installing aws-c-common and aws-c-checksum

  1. git clone https://github.com/awslabs/aws-c-event-stream
  2. mkdir build && cd build
  3. cmake .. -DCMAKE_INSTALL_PREFIX= -DCMAKE_PREFIX_PATH=

I am getting this error after command 3

CMake Error at /home/dev/share/cmake/lib64/cmake/AwsFindPackage.cmake:19 (find_package):
By not providing "Findaws-c-io.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "aws-c-io",
but CMake did not find one.

Could not find a package configuration file provided by "aws-c-io" with any
of the following names:

aws-c-ioConfig.cmake
aws-c-io-config.cmake

Add the installation prefix of "aws-c-io" to CMAKE_PREFIX_PATH or set
"aws-c-io_DIR" to a directory containing one of the above files. If
"aws-c-io" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:75 (aws_use_package)

-- Configuring incomplete, errors occurred!

Project is not buildable: AwsCFlags & Co not found

Hello,

a project is not buildable due to error:

CMake Error at CMakeLists.txt:24 (include):
  include could not find load file:

    AwsCFlags


CMake Error at CMakeLists.txt:25 (include):
  include could not find load file:

    AwsSharedLibSetup


CMake Error at CMakeLists.txt:26 (include):
  include could not find load file:

    AwsSanitizers


CMake Error at CMakeLists.txt:62 (aws_set_common_properties):
  Unknown CMake command "aws_set_common_properties".

This is due to use include() cmake command which is designed to load cmake file or systemwide provided by cmake project as far as I know.

Latest master causes build error due to not finding `AWS_ASSERT`

When trying to build the AWS C++ SDK, it uses the master branch of this repo (because of aws/aws-sdk-cpp#1145). I am seeing this build error:

Cloning into 'AwsCEventStream'...
Already on 'master'
CMake Warning:
  Manually-specified variables were not used by the project:

    STATIC_CRT


/Users/tyler/tiledb/TileDB/build/externals/src/ep_awssdk-build/.deps/build/src/AwsCEventStream/source/event_stream.c:315:5: error: implicit declaration of function 'AWS_ASSERT' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    AWS_ASSERT(buffer);
    ^
/Users/tyler/tiledb/TileDB/build/externals/src/ep_awssdk-build/.deps/build/src/AwsCEventStream/source/event_stream.c:315:5: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
/Users/tyler/tiledb/TileDB/build/externals/src/ep_awssdk-build/.deps/build/src/AwsCEventStream/source/event_stream.c:546:5: error: implicit declaration of function 'AWS_ASSERT' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    AWS_ASSERT(headers);

Some system information: macOS 10.13.6, compiler:

$ g++ --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Let me know if you need more information.

Error implicit declaration of function aws_common_library

Hi all,

I am trying to build aws-c-event-stream v0.1.3

I have already built aws-c-common v0.4.3 and aws-checksums v0.1.3.

The CMAKE_PREFIX_PATH used in my cmake command is the following:

CMAKE_PREFIX_PATH="/S:/aws-c-common/;/S:/aws-checksums/

When building on Linux, I get the following errors:

/aws-c-event-stream/source/event_stream.c:71:9: error: implicit declaration of function âaws_common_library_initâ [-Werror=implicit-function-declaration]
aws_common_library_init(allocator);

/aws-c-event-stream/source/event_stream.c:79:9: error: implicit declaration of function âaws_unregister_error_infoâ [-Werror=implicit-function-declaration]
aws_unregister_error_info(&s_list);

/aws-c-event-stream/source/event_stream.c:80:9: error: implicit declaration of function âaws_common_library_clean_upâ [-Werror=implicit-function-declaration]
aws_common_library_clean_up();

cc1: all warnings being treated as errors

Do I have to use the latest versions of aws-c-common and aws-checksums ?

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.