[
https://issues.apache.org/jira/browse/HTRACE-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14491815#comment-14491815
]
Masatake Iwasaki commented on HTRACE-106:
-----------------------------------------
Thanks for working on this, [~cmccabe]!
I am trying 007 on CentOS 7 and got some error while building. Build
instrunctions should be added in follow-ups.
{noformat}
[exec] CMake Error at
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
[exec] Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
[exec] Call Stack (most recent call first):
[exec] /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315
(_FPHSA_FAILURE_MESSAGE)
[exec] /usr/share/cmake/Modules/FindCURL.cmake:54
(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
[exec] CMakeLists.txt:51 (find_package)
{noformat}
I had to {{yum install libcurl-devel}} for above.
{noformat}
main:
[exec] -- Found CURL: /usr/lib64/libcurl.so (found version "7.29.0")
[exec] -- Configuring incomplete, errors occurred!
[exec] CMake Error at CMakeLists.txt:57 (MESSAGE):
[exec] Failed to find libjson-c. Try installing libjson-c with apt-get
or yum, or
[exec] install it manually from http://oss.metaparadigm.com/json-c/
{noformat}
I had to {{yum install json-c-devel}} for above.
{noformat}
[exec] [ 77%] Building C object
CMakeFiles/htraced_rcv-unit.dir/test/htraced_rcv-unit.c.o
[exec] /usr/bin/cc -g -Wall -O2 -fno-strict-aliasing -D_REENTRANT
-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fvisibility=hidden
-I/iwasakims/srcs/htrace/htrace-c/target/build
-I/iwasakims/srcs/htrace/htrace-c/src -o
CMakeFiles/htraced_rcv-unit.dir/test/htraced_rcv-unit.c.o -c
/iwasakims/srcs/htrace/htrace-c/src/test/htraced_rcv-unit.c
[exec] /usr/bin/ld: libhtrace_test.a(span_util.c.o): undefined reference
to symbol 'json_object_array_get_idx'
[exec] /usr/bin/ld: note: 'json_object_array_get_idx' is defined in DSO
/lib64/libjson-c.so.2 so try adding it to the linker command line
[exec] /lib64/libjson-c.so.2: could not read symbols: Invalid operation
[exec] collect2: error: ld returned 1 exit status
[exec] make[2]: *** [htraced_rcv-unit] Error 1
[exec] make[1]: *** [CMakeFiles/htraced_rcv-unit.dir/all] Error 2
[exec] make: *** [all] Error 2
{noformat}
Changing CMakeLists.txt as below fixed the error above.
{noformat}
diff --git a/htrace-c/src/CMakeLists.txt b/htrace-c/src/CMakeLists.txt
index 65a162a..11a7c31 100644
--- a/htrace-c/src/CMakeLists.txt
+++ b/htrace-c/src/CMakeLists.txt
@@ -51,7 +51,7 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/test/test_config.h.cmake
${CMAKE_BINARY_DIR}/
find_package(CURL REQUIRED)
find_path(JSON_C_INCLUDE_DIR "json/json.h")
-find_library(JSON_C_LIBRARY json)
+find_library(JSON_C_LIBRARY json-c)
IF(JSON_C_INCLUDE_DIR AND JSON_C_LIBRARY)
ELSE(JSON_C_INCLUDE_DIR AND JSON_C_LIBRARY)
MESSAGE(FATAL_ERROR "Failed to find libjson-c. Try installing libjson-c
with apt-get or yum, or install it manually from
http://oss.metaparadigm.com/json-c/")
{noformat}
> htrace: add C / C++ native client
> ---------------------------------
>
> Key: HTRACE-106
> URL: https://issues.apache.org/jira/browse/HTRACE-106
> Project: HTrace
> Issue Type: New Feature
> Affects Versions: 3.2.0
> Reporter: Colin Patrick McCabe
> Assignee: Colin Patrick McCabe
> Attachments: HTRACE-106.001.patch, HTRACE-106.002.patch,
> HTRACE-106.003.patch, HTRACE-106.005.patch, HTRACE-106.006.patch,
> HTRACE-106.007.patch
>
>
> Add a native client that is usable by C / C++ programs. This client would
> also be useful for building other things on top of, like a Python client.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)