You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Allen Wittenauer (JIRA)" <ji...@apache.org> on 2015/05/27 05:20:17 UTC

[jira] [Comment Edited] (HADOOP-12027) enable bzip2 on OS X

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

Allen Wittenauer edited comment on HADOOP-12027 at 5/27/15 3:19 AM:
--------------------------------------------------------------------

This is way simpler than what I thought:

The CMakeList.txt needs to get changed to be:
{code}
SET(STORED_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  # No effect. bzip2 not built as a shared lib 
ELSE()
  set_find_shared_library_version("1")
ENDIF()
find_package(BZip2 QUIET)
{code}

and then it appears that setting env vars, etc, works as expected.  (e.g., BZIP2_PREFIX_DIR=/usr/local/opt/bzip2 should make cmake pick it up from homebrew)


was (Author: aw):
This is way simpler than what I thought:

The CMakeList.txt needs to get changed to be:
{code}
SET(STORED_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  # No effect. bzip2 not built as a shared lib 
ELSE()
  set_find_shared_library_version("1")
ENDIF()
find_package(BZip2 QUIET)
{code}

and then it appears that setting env vars, etc, works as expected.

> enable bzip2 on OS X
> --------------------
>
>                 Key: HADOOP-12027
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12027
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: native
>            Reporter: Allen Wittenauer
>
> OS X Mavericks + homebrew could compile bzip2 bits if there was a way to expose the bzip2 headers+lib location to CMake like we do for snappy, OpenSSL, etc.  Additionally, bzip2 only comes as a static library on Darwin, so we need to escape out the forced shared library bit.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)