-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Labels
bugWe can reproduce the issue and confirmed it is a bug.We can reproduce the issue and confirmed it is a bug.needs-reviewThis issue or pull request needs review from a core team member.This issue or pull request needs review from a core team member.p2This is a standard priority issueThis is a standard priority issue
Description
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.
Metadata
Metadata
Assignees
Labels
bugWe can reproduce the issue and confirmed it is a bug.We can reproduce the issue and confirmed it is a bug.needs-reviewThis issue or pull request needs review from a core team member.This issue or pull request needs review from a core team member.p2This is a standard priority issueThis is a standard priority issue