You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "GupAChup (via GitHub)" <gi...@apache.org> on 2023/06/15 22:48:41 UTC

[GitHub] [arrow] GupAChup opened a new issue, #36117: Linker Error when building arrow bundled dependencies

GupAChup opened a new issue, #36117:
URL: https://github.com/apache/arrow/issues/36117

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   I was trying to do a static build of arrow in my project and ran into a linker error. Here are the exact commands I ran:
   
   ```
   git clone https://github.com/apache/arrow.git
   cd arrow/cpp
   mkdir build
   cd build
   cmake -DARROW_PARQUET=ON -DARROW_CSV=ON -DARROW_BUILD_STATIC=ON ..
   cmake --build . --target install
   ```
   
   After running those commands, during the build process, I get the following error.
   ```
     Performing install step for 'thrift_ep'
     -- thrift_ep install command succeeded.  See also C:/Users/guppy/CLionProjects/NewDataframes/libs/arrow/cpp/build/thrift_ep-prefix/src/thrift_ep-stamp/th
     rift_ep-install-*.log
     Completed 'thrift_ep'
     Bundling C:/Users/guppy/CLionProjects/NewDataframes/libs/arrow/cpp/build/release/arrow_bundled_dependencies.lib
   LINK : fatal error LNK1370: failed to copy file 'C:\Users\guppy\CLionProjects\NewDataframes\libs\arrow\cpp\build\thrift_ep-install\bin\thriftmd.lib'; error
    code 3 [C:\Users\guppy\CLionProjects\NewDataframes\libs\arrow\cpp\build\src\arrow\arrow_bundled_dependencies_merge.vcxproj]
   C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): error MSB8066: Custom build for 'C:\Users\guppy\CLionProjects\NewDataframes\libs\arrow\cpp\build\CMakeFiles\155e07f2be9d7893eea39b427b71fbbb\arrow_bundled_dependencies_merge.rule;C:\Users\guppy\CLionProjects\NewDataframes\libs\arrow\cpp\src\arrow\CMakeLists.txt' exited with code 1370. [C:\Users\guppy\CLionProjects\NewDataframes\libs\arrow\cpp\build\src\arrow\arrow_bundled_dependencies_merge.vcxproj]
   ```
   
   Any help would be greatly appreciated.
   
   ### Component(s)
   
   C++


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #36117: Linker Error when building arrow bundled dependencies

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #36117:
URL: https://github.com/apache/arrow/issues/36117#issuecomment-1593876231

   Could you specify `-DCMAKE_BUILD_TYPE=Release` explicitly?
   
   ```bash
   git clone https://github.com/apache/arrow.git
   cd arrow/cpp
   mkdir build
   cd build
   cmake -DCMAKE_BUILD_TYPE=Release -DARROW_PARQUET=ON -DARROW_CSV=ON -DARROW_BUILD_STATIC=ON ..
   cmake --build . --config Release --target install
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] Jenovesan commented on issue #36117: Linker Error when building arrow bundled dependencies

Posted by "Jenovesan (via GitHub)" <gi...@apache.org>.
Jenovesan commented on issue #36117:
URL: https://github.com/apache/arrow/issues/36117#issuecomment-1594751333

   @kou I got the same exact same error on a fresh windows install


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] GupAChup commented on issue #36117: Linker Error when building arrow bundled dependencies

Posted by "GupAChup (via GitHub)" <gi...@apache.org>.
GupAChup commented on issue #36117:
URL: https://github.com/apache/arrow/issues/36117#issuecomment-1594004110

   Here's the output from that comment:
   
   ```  
   Performing install step for 'thrift_ep'
     -- thrift_ep install command succeeded.  See also C:/Users/guppy/CLionProjects/NewDataframes/libs/arrow/arrow/cpp/build/thrift_ep-prefix/src/thrift_ep-stamp/thr
     ift_ep-install-*.log
     Completed 'thrift_ep'
     Bundling C:/Users/guppy/CLionProjects/NewDataframes/libs/arrow/arrow/cpp/build/release/arrow_bundled_dependencies.lib: C:/Program Files/Microsoft Visual Studio/
     2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/lib.exe;/NOLOGO;/OUT:C:/Users/guppy/CLionProjects/NewDataframes/libs/arrow/arrow/cpp/build/release/arro
     w_bundled_dependencies.lib;C:/Users/guppy/CLionProjects/NewDataframes/libs/arrow/arrow/cpp/build/thrift_ep-install/bin/thriftmd.lib
   LINK : fatal error LNK1370: failed to copy file 'C:\Users\guppy\CLionProjects\NewDataframes\libs\arrow\arrow\cpp\build\thrift_ep-install\bin\thriftmd.lib'; error
   code 3 [C:\Users\guppy\CLionProjects\NewDataframes\libs\arrow\arrow\cpp\build\src\arrow\arrow_bundled_dependencies_merge.vcxproj]
   C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): error MSB8066: Custom build for 'C:\Users\gu
   ppy\CLionProjects\NewDataframes\libs\arrow\arrow\cpp\build\CMakeFiles\294c83af6aef239dd1ca2299792d917b\arrow_bundled_dependencies_merge.rule;C:\Users\guppy\CLionP
   rojects\NewDataframes\libs\arrow\arrow\cpp\src\arrow\CMakeLists.txt' exited with code 1370. [C:\Users\guppy\CLionProjects\NewDataframes\libs\arrow\arrow\cpp\build
   \src\arrow\arrow_bundled_dependencies_merge.vcxproj]
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #36117: Linker Error when building arrow bundled dependencies

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #36117:
URL: https://github.com/apache/arrow/issues/36117#issuecomment-1594007306

   Could you run `C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/lib.exe /NOLOGO /OUT:C:/Users/guppy/CLionProjects/NewDataframes/libs/arrow/arrow/cpp/build/release/arrow_bundled_dependencies.lib C:/Users/guppy/CLionProjects/NewDataframes/libs/arrow/arrow/cpp/build/thrift_ep-install/bin/thriftmd.lib`?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #36117: Linker Error when building arrow bundled dependencies

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #36117:
URL: https://github.com/apache/arrow/issues/36117#issuecomment-1594016345

   Oh... We can't get more information...
   Sorry. I can't help you more without reproduced environment...
   Could you debug the command line on your environment?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] GupAChup commented on issue #36117: Linker Error when building arrow bundled dependencies

Posted by "GupAChup (via GitHub)" <gi...@apache.org>.
GupAChup commented on issue #36117:
URL: https://github.com/apache/arrow/issues/36117#issuecomment-1593886343

   I ran each of those commands specifically while explicitly stating the build type and It seems to produce the same error.
   
   ```
     Performing install step for 'thrift_ep'
     -- thrift_ep install command succeeded.  See also C:/Users/guppy/CLionProjects/NewDataframes/libs/arrow/arrow/cpp/build/thrift_ep-prefix/src/thrift_ep-stamp/thr
     ift_ep-install-*.log
     Completed 'thrift_ep'
     Bundling C:/Users/guppy/CLionProjects/NewDataframes/libs/arrow/arrow/cpp/build/release/arrow_bundled_dependencies.lib
   LINK : fatal error LNK1370: failed to copy file 'C:\Users\guppy\CLionProjects\NewDataframes\libs\arrow\arrow\cpp\build\thrift_ep-install\bin\thriftmd.lib'; error
   code 3 [C:\Users\guppy\CLionProjects\NewDataframes\libs\arrow\arrow\cpp\build\src\arrow\arrow_bundled_dependencies_merge.vcxproj]
   C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): error MSB8066: Custom build for 'C:\Users\gu
   ppy\CLionProjects\NewDataframes\libs\arrow\arrow\cpp\build\CMakeFiles\294c83af6aef239dd1ca2299792d917b\arrow_bundled_dependencies_merge.rule;C:\Users\guppy\CLionP
   rojects\NewDataframes\libs\arrow\arrow\cpp\src\arrow\CMakeLists.txt' exited with code 1370. [C:\Users\guppy\CLionProjects\NewDataframes\libs\arrow\arrow\cpp\build
   \src\arrow\arrow_bundled_dependencies_merge.vcxproj]
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] GupAChup commented on issue #36117: Linker Error when building arrow bundled dependencies

Posted by "GupAChup (via GitHub)" <gi...@apache.org>.
GupAChup commented on issue #36117:
URL: https://github.com/apache/arrow/issues/36117#issuecomment-1594013964

   Hopefully, I ran this correctly, but I'm uncertain because I got an error. I navigated to the folder 
   
   ```
   C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64>
   ```
   
   and then ran the following command:
   ```
   lib.exe /NOLOGO /OUT:C:/Users/guppy/CLionProjects/NewDataframes/libs/arrow/arrow/cpp/build/release/arrow_bundled_dependencies.lib C:/Users/guppy/CLionProjects/NewDataframes/libs/arrow/arrow/cpp/build/thrift_ep-install/bin/thriftmd.lib
   ```
   
   and i got this error:
   ```
   LINK : fatal error LNK1370: failed to copy file 'C:\Users\guppy\CLionProjects\NewDataframes\libs\arrow\arrow\cpp\build\thrift_ep-install\bin\thriftmd.lib'; error code 3
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #36117: [C++] Linker Error when building arrow bundled dependencies with MSVC

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #36117:
URL: https://github.com/apache/arrow/issues/36117#issuecomment-1595331637

   Does this work?
   
   ```diff
   diff --git a/cpp/cmake_modules/BuildUtils.cmake b/cpp/cmake_modules/BuildUtils.cmake
   index aaf4b0bb5..a9bdd0391 100644
   --- a/cpp/cmake_modules/BuildUtils.cmake
   +++ b/cpp/cmake_modules/BuildUtils.cmake
   @@ -86,6 +86,7 @@ function(arrow_create_merged_static_lib output_target)
        message(SEND_ERROR "Error: unrecognized arguments: ${ARG_UNPARSED_ARGUMENTS}")
      endif()
    
   +  file(MAKE_DIRECTORY ${BUILD_OUTPUT_ROOT_DIRECTORY})
      set(output_lib_path
          ${BUILD_OUTPUT_ROOT_DIRECTORY}${CMAKE_STATIC_LIBRARY_PREFIX}${ARG_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
      )
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] GupAChup commented on issue #36117: Linker Error when building arrow bundled dependencies

Posted by "GupAChup (via GitHub)" <gi...@apache.org>.
GupAChup commented on issue #36117:
URL: https://github.com/apache/arrow/issues/36117#issuecomment-1593946699

   This is the output:
   
   ```
    Directory of C:\Users\guppy\CLionProjects\NewDataframes\libs\arrow\arrow\cpp\build\thrift_ep-install\bin
   
   06/15/2023  05:35 PM    <DIR>          .
   06/15/2023  05:35 PM    <DIR>          ..
   06/15/2023  05:35 PM         4,586,458 thriftmd.lib
                  1 File(s)      4,586,458 bytes
                  2 Dir(s)  289,212,059,648 bytes free
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #36117: Linker Error when building arrow bundled dependencies

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #36117:
URL: https://github.com/apache/arrow/issues/36117#issuecomment-1593940480

   Could you show the outpuf of `dir C:\Users\guppy\CLionProjects\NewDataframes\libs\arrow\arrow\cpp\build\thrift_ep-install\bin\`?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #36117: Linker Error when building arrow bundled dependencies

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #36117:
URL: https://github.com/apache/arrow/issues/36117#issuecomment-1593958331

   Hmm... Could you add a debug message and run again?
   
   ```diff
   diff --git a/cpp/cmake_modules/BuildUtils.cmake b/cpp/cmake_modules/BuildUtils.cmake
   index aaf4b0bb5..3bf44c4d2 100644
   --- a/cpp/cmake_modules/BuildUtils.cmake
   +++ b/cpp/cmake_modules/BuildUtils.cmake
   @@ -140,7 +140,7 @@ function(arrow_create_merged_static_lib output_target)
                        ${BUNDLE_COMMAND}
                        DEPENDS ${ARG_ROOT} ${ARG_TO_MERGE}
                        BYPRODUCTS ${output_lib_path}
   -                    COMMENT "Bundling ${output_lib_path}"
   +                    COMMENT "Bundling ${output_lib_path}: ${BUNDLE_COMMAND}"
                        VERBATIM)
    
      message(STATUS "Creating bundled static library target ${output_target} at ${output_lib_path}"
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou closed issue #36117: [C++] Linker Error when building arrow bundled dependencies with MSVC

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou closed issue #36117: [C++] Linker Error when building arrow bundled dependencies with MSVC
URL: https://github.com/apache/arrow/issues/36117


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org