Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • hdfs-client
    • None

    Description

      I recently encountered a few portability issues with libhdfs++ while trying to build it as a stand alone project (and also as part of another Apache project).

      1. Method fixCase in configuration.h file produces a warning "conversion to ‘char’ from ‘int’ may alter its value [-Werror=conversion]" which does not allow libhdfs++ to be compiled as part of the codebase that treats such warnings as errors (can be fixed with a simple cast).

      2. In CMakeLists.txt file (in libhdfspp directory) we do find_package(Threads) however we do not link it to the targets (e.g. hdfspp_static), which causes the build to fail with pthread errors. After the Threads package is found we need to link it using ${CMAKE_THREAD_LIBS_INIT}.

      3. All the tools and examples fail to build as part of a standalone libhdfs++ because they are missing multiple libraries such as protobuf, ssl, pthread, etc. This happens because we link them to a shared library hdfspp instead of hdfspp_static library. We should either link all the tools and examples to hdfspp_static library or explicitly add linking to all missing libraries for each tool/example.

      Attachments

        1. HDFS-11971.HDFS-8707.000.patch
          80 kB
          Anatoli Shein
        2. HDFS-11971.HDFS-8707.001.patch
          12 kB
          Anatoli Shein
        3. HDFS-11971.HDFS-8707.002.patch
          12 kB
          Anatoli Shein
        4. HDFS-11971.HDFS-8707.003.patch
          13 kB
          Anatoli Shein

        Activity

          People

            anatoli.shein Anatoli Shein
            anatoli.shein Anatoli Shein
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: