Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-8238

[C++][Compute] Failed to build compute tests on windows with msvc2015

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 0.17.0
    • C++

    Description

      Build Arrow compute tests on Windows10 with MSVC2015:

      cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DARROW_COMPUTE=ON -DARROW_BUILD_TESTS=ON ..
      
      ninja -j3
      

      Build failed with below message:

      [311/405] Linking CXX executable release\arrow-misc-test.exe
      FAILED: release/arrow-misc-test.exe
      cmd.exe /C "cd . && C:\Users\yibcai01\Miniconda3\envs\arrow-dev\Library\bin\cmake.exe -E vs_link_exe --intdir=src\arrow\CMakeFiles\arrow-misc-test.dir --rc=C:\PROGRA~2\WI3CF2~1\8.1\bin\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\8.1\bin\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\link.exe /nologo src\arrow\CMakeFiles\arrow-misc-test.dir\memory_pool_test.cc.obj src\arrow\CMakeFiles\arrow-misc-test.dir\result_test.cc.obj src\arrow\CMakeFiles\arrow-misc-test.dir\pretty_print_test.cc.obj src\arrow\CMakeFiles\arrow-misc-test.dir\status_test.cc.obj  /out:release\arrow-misc-test.exe /implib:release\arrow-misc-test.lib /pdb:release\arrow-misc-test.pdb /version:0.0  /machine:x64  /NODEFAULTLIB:LIBCMT /INCREMENTAL:NO /subsystem:console  release\arrow_testing.lib  release\arrow.lib  googletest_ep-prefix\src\googletest_ep\lib\gtest_main.lib  googletest_ep-prefix\src\googletest_ep\lib\gtest.lib  googletest_ep-prefix\src\googletest_ep\lib\gmock.lib  C:\Users\yibcai01\Miniconda3\envs\arrow-dev\Library\lib\boost_filesystem.lib  C:\Users\yibcai01\Miniconda3\envs\arrow-dev\Library\lib\boost_system.lib  Ws2_32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
      LINK: command "C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\link.exe /nologo src\arrow\CMakeFiles\arrow-misc-test.dir\memory_pool_test.cc.obj src\arrow\CMakeFiles\arrow-misc-test.dir\result_test.cc.obj src\arrow\CMakeFiles\arrow-misc-test.dir\pretty_print_test.cc.obj src\arrow\CMakeFiles\arrow-misc-test.dir\status_test.cc.obj /out:release\arrow-misc-test.exe /implib:release\arrow-misc-test.lib /pdb:release\arrow-misc-test.pdb /version:0.0 /machine:x64 /NODEFAULTLIB:LIBCMT /INCREMENTAL:NO /subsystem:console release\arrow_testing.lib release\arrow.lib googletest_ep-prefix\src\googletest_ep\lib\gtest_main.lib googletest_ep-prefix\src\googletest_ep\lib\gtest.lib googletest_ep-prefix\src\googletest_ep\lib\gmock.lib C:\Users\yibcai01\Miniconda3\envs\arrow-dev\Library\lib\boost_filesystem.lib C:\Users\yibcai01\Miniconda3\envs\arrow-dev\Library\lib\boost_system.lib Ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:release\arrow-misc-test.exe.manifest" failed (exit code 1169) with the following output:
      arrow_testing.lib(arrow_testing.dll) : error LNK2005: "public: __cdecl std::vector<int,class std::allocator<int> >::vector<int,class std::allocator<int> >(class std::initializer_list<int>,class std::allocator<int> const &)" (??0?$vector@HV?$allocator@H@std@@@std@@QEAA@V?$initializer_list@H@1@AEBV?$allocator@H@1@@Z) already defined in result_test.cc.obj
      arrow_testing.lib(arrow_testing.dll) : error LNK2005: "public: __cdecl std::vector<int,class std::allocator<int> >::~vector<int,class std::allocator<int> >(void)" (??1?$vector@HV?$allocator@H@std@@@std@@QEAA@XZ) already defined in result_test.cc.obj
      arrow_testing.lib(arrow_testing.dll) : error LNK2005: "public: unsigned __int64 __cdecl std::vector<int,class std::allocator<int> >::size(void)const " (?size@?$vector@HV?$allocator@H@std@@@std@@QEBA_KXZ) already defined in result_test.cc.obj
      release\arrow-misc-test.exe : fatal error LNK1169: one or more multiply defined symbols found
      [313/405] Building CXX object src\arrow\CMakeFiles\arrow-table-test.dir\table_builder_test.cc.obj
      ninja: build stopped: subcommand failed.
      

      Attachments

        1. fieldpath.diff
          5 kB
          Yibo Cai

        Issue Links

          Activity

            People

              yibocai Yibo Cai
              yibocai Yibo Cai
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m