Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-9319

Fix compilation issue of handling typedef an existing name by gcc compiler

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 3.3.0
    • 3.3.0
    • None
    • None
    •  RHEL 6.8, CMake 3.2.0, Java 8u151, gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC)

    • Reviewed

    Description

      When I do: 

      mvn clean install -DskipTests -Pdist,native  -Dmaven.javadoc.skip=true

      It does not compile on my machine (RHEL 6.8, CMake 3.2.0, Java 8u151, gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC))

      [WARNING] [ 54%] Built target test-container-executor
      [WARNING] Linking CXX static library libgtest.a
      [WARNING] /opt/toolchain/cmake-3.2.0/bin/cmake -P CMakeFiles/gtest.dir/cmake_clean_target.cmake
      [WARNING] /opt/toolchain/cmake-3.2.0/bin/cmake -E cmake_link_script CMakeFiles/gtest.dir/link.txt --verbose=1
      [WARNING] /usr/bin/ar cq libgtest.a  CMakeFiles/gtest.dir/data/4/weichiu/hadoop/hadoop-common-project/hadoop-common/src/main/native/gtest/gtest-all.cc.o
      [WARNING] /usr/bin/ranlib libgtest.a
      [WARNING] make[2]: Leaving directory `/data/4/weichiu/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/target/native'
      [WARNING] /opt/toolchain/cmake-3.2.0/bin/cmake -E cmake_progress_report /data/4/weichiu/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/target/native/CMakeFiles  26
      [WARNING] [ 54%] Built target gtest
      [WARNING] make[1]: Leaving directory `/data/4/weichiu/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/target/native'
      [WARNING] In file included from /data/4/weichiu/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/main.c:27:
      [WARNING] /data/4/weichiu/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/modules/devices/devices-module.h:31: error: redefinition of typedef 'update_cgroups_parameters_function'
      [WARNING] /data/4/weichiu/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/modules/fpga/fpga-module.h:31: note: previous declaration of 'update_cgroups_parameters_function' was here
      [WARNING] make[2]: *** [CMakeFiles/container-executor.dir/main/native/container-executor/impl/main.c.o] Error 1
      [WARNING] make[1]: *** [CMakeFiles/container-executor.dir/all] Error 2
      [WARNING] make[1]: *** Waiting for unfinished jobs....
      [WARNING] make: *** [all] Error 2
      

      The code compiles once I revert YARN-9060.

      tangzhankunsunilg care to take a look?

      Attachments

        1. YARN-9319-trunk.001.patch
          3 kB
          Zhankun Tang

        Issue Links

          Activity

            People

              tangzhankun Zhankun Tang
              weichiu Wei-Chiu Chuang
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: