[ 
https://issues.apache.org/jira/browse/AVRO-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16715531#comment-16715531
 ] 

ASF GitHub Bot commented on AVRO-1844:
--------------------------------------

dkulp closed pull request #225: AVRO-1844: set correct header searching path 
for zlib, snappy & jansson.
URL: https://github.com/apache/avro/pull/225
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/lang/c/CMakeLists.txt b/lang/c/CMakeLists.txt
index fda4382a2..b8c94847b 100644
--- a/lang/c/CMakeLists.txt
+++ b/lang/c/CMakeLists.txt
@@ -131,7 +131,7 @@ find_package(ZLIB)
 if (ZLIB_FOUND)
     set(ZLIB_PKG zlib)
     add_definitions(-DDEFLATE_CODEC)
-    include_directories(${ZLIB_INCLUDE_DIR})
+    include_directories(${ZLIB_INCLUDE_DIRS})
     message("Enabled deflate codec")
 else (ZLIB_FOUND)
     set(ZLIB_PKG "")
@@ -143,7 +143,7 @@ find_package(Snappy)
 if (SNAPPY_FOUND AND ZLIB_FOUND)  # Snappy borrows crc32 from zlib
     set(SNAPPY_PKG libsnappy)
     add_definitions(-DSNAPPY_CODEC)
-    include_directories(${SNAPPY_INCLUDE_DIR})
+    include_directories(${SNAPPY_INCLUDE_DIRS})
     message("Enabled snappy codec")
 else (SNAPPY_FOUND AND ZLIB_FOUND)
     set(SNAPPY_PKG "")
@@ -172,7 +172,7 @@ set(CODEC_PKG "@ZLIB_PKG@ @LZMA_PKG@ @SNAPPY_PKG@")
 pkg_check_modules(JANSSON jansson>=2.3)
 if (JANSSON_FOUND)
     set(JANSSON_PKG libjansson)
-    include_directories(${JANSSON_INCLUDE_DIR})
+    include_directories(${JANSSON_INCLUDE_DIRS})
     link_directories(${JANSSON_LIBRARY_DIRS})
 else (JANSSON_FOUND)
     message(FATAL_ERROR "libjansson >=2.3 not found")


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Avro-C build procedure doesn't set include paths for Jansson
> ------------------------------------------------------------
>
>                 Key: AVRO-1844
>                 URL: https://issues.apache.org/jira/browse/AVRO-1844
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.8.0
>         Environment: gcc 4.9.3, Scientific Linux Fermi release 6.7
>            Reporter: Jim Pivarski
>            Priority: Major
>             Fix For: 1.9.0
>
>
> I `configure` Jansson with a user-space `PREFIX` because I don't have root 
> access, and when I `make install`, the Jansson includes and libs appear in 
> new `include` and `lib` directories, as expected.
> I `cmake` with `-DCMAKE_INSTALL_PREFIX:PATH=` the same path as `PREFIX` and 
> CMake is successful: it finds Jansson and makes the Makefiles.
> BUT, when I `make`, it fails because it can't find `jansson.h`. The same is 
> true if I explicitly set `PKG_CONFIG_PATH` to point to 
> `$PREFIX/lib/pkgconfig` and `pkg-config jansson --cflags --libs` works.
> If I explicitly add full paths to Avro's and Jansson's `#include <jansson.h>` 
> lines in the source code, Avro compiles without trouble. 
> (`avro-c-1.8.0/src/schema.c`, `avro-c-1.8.0/src/value-json.c`, 
> `include/jansson.h`)
> Presumably, the Jansson part of the build process is only partly implemented, 
> such that the CMake script searches for the appropriate version but `-I` 
> flags are not generated for the compiler. I don't know enough CMake to know 
> where to insert these.
> Fixing this issue is the only way I know of to make Avro-C installable on a 
> system without root access, apart from the hack I described above.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to