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

Alan Burlison commented on HADOOP-12036:
----------------------------------------

The workaround is to set CMAKE_LIBRARY_ARCHITECTURE to the correct value for 
the LP64 library location on the platform "amd64" or "sparcv9".

Before:

    Found ZLIB: /usr/lib/libz.so.1 (found version "1.2.8")
    Looking for BZ2_bzCompressInit in /usr/lib/libbz2.so.1
    Looking for BZ2_bzCompressInit in /usr/lib/libbz2.so.1 - not found

Which is wrong as it's finding the 32 bit and not the 64 bit library, then 
feeding it into a 64-bit test compile which not surprisingly blows up.

After:

    Found ZLIB: /usr/lib/amd64/libz.so.1 (found version "1.2.8")
    Looking for BZ2_bzCompressInit in /usr/lib/amd64/libbz2.so.1
    Looking for BZ2_bzCompressInit in /usr/lib/amd64/libbz2.so.1 - found

which is correct.

This and the other architecture-related stuff needs moving from HadoopJNI.cmake 
into HadoopCommon.cmake as all compilations need the tweaks, not just JNI code. 
I believe the same move is also needed for the Linux equivalents.

The other issue of warnings such as "Manually-specified variables were not used 
by the project ... REQUIRE_BZIP2" is because when the library *is* found the 
REQUIRE_BZIP2 variable isn't tested and CMake isn't smart enough to see it's 
used down a different code path. The easiest way of stopping the warnings is to 
put a dummy assignment to REQUIRE_BZIP2 in the "library found" code path.

> Consolidate all of the cmake extensions in one directory
> --------------------------------------------------------
>
>                 Key: HADOOP-12036
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12036
>             Project: Hadoop Common
>          Issue Type: Sub-task
>            Reporter: Allen Wittenauer
>            Assignee: Alan Burlison
>         Attachments: HADOOP-12036.001.patch
>
>
> Rather than have a half-dozen redefinitions, custom extensions, etc, we 
> should move them all to one location so that the cmake environment is 
> consistent between the various native components.



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

Reply via email to