Skip to content

[C++] Linking error with pre-built Boost binaries on Windows #45614

Description

@pitrou

Describe the bug, including details regarding any error messages, version, and platform.

Using pre-built Boost binaries on Windows, I get this linker error:

[128/292] Linking CXX shared library debug\arrow_testing.dll
FAILED: debug/arrow_testing.dll debug/arrow_testing.lib
C:\WINDOWS\system32\cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --msvc-ver=1943 --intdir=src\arrow\CMakeFiles\arrow_testing_shared.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100203~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100203~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1443~1.348\bin\Hostx64\x64\link.exe /nologo src\arrow\CMakeFiles\arrow_testing_shared.dir\io\test_common.cc.obj src\arrow\CMakeFiles\arrow_testing_shared.dir\ipc\test_common.cc.obj src\arrow\CMakeFiles\arrow_testing_shared.dir\testing\fixed_width_test_util.cc.obj src\arrow\CMakeFiles\arrow_testing_shared.dir\testing\generator.cc.obj src\arrow\CMakeFiles\arrow_testing_shared.dir\testing\gtest_util.cc.obj src\arrow\CMakeFiles\arrow_testing_shared.dir\testing\math.cc.obj src\arrow\CMakeFiles\arrow_testing_shared.dir\testing\process.cc.obj src\arrow\CMakeFiles\arrow_testing_shared.dir\testing\random.cc.obj src\arrow\CMakeFiles\arrow_testing_shared.dir\testing\util.cc.obj src\arrow\CMakeFiles\arrow_testing_shared.dir\filesystem\test_util.cc.obj  /out:debug\arrow_testing.dll /implib:debug\arrow_testing.lib /pdb:debug\arrow_testing.pdb /dll /version:2000.0 /machine:x64  /NODEFAULTLIB:LIBCMT /debug /INCREMENTAL  debug\arrow.lib  debug\arrow_gtestd.lib  ws2_32.lib  debug\arrow_gmockd.lib  C:\local\boost_1_87_0\lib64-msvc-14.3\libboost_process-vc143-mt-gd-x64-1_87.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1443~1.348\bin\Hostx64\x64\link.exe /nologo src\arrow\CMakeFiles\arrow_testing_shared.dir\io\test_common.cc.obj src\arrow\CMakeFiles\arrow_testing_shared.dir\ipc\test_common.cc.obj src\arrow\CMakeFiles\arrow_testing_shared.dir\testing\fixed_width_test_util.cc.obj src\arrow\CMakeFiles\arrow_testing_shared.dir\testing\generator.cc.obj src\arrow\CMakeFiles\arrow_testing_shared.dir\testing\gtest_util.cc.obj src\arrow\CMakeFiles\arrow_testing_shared.dir\testing\math.cc.obj src\arrow\CMakeFiles\arrow_testing_shared.dir\testing\process.cc.obj src\arrow\CMakeFiles\arrow_testing_shared.dir\testing\random.cc.obj src\arrow\CMakeFiles\arrow_testing_shared.dir\testing\util.cc.obj src\arrow\CMakeFiles\arrow_testing_shared.dir\filesystem\test_util.cc.obj /out:debug\arrow_testing.dll /implib:debug\arrow_testing.lib /pdb:debug\arrow_testing.pdb /dll /version:2000.0 /machine:x64 /NODEFAULTLIB:LIBCMT /debug /INCREMENTAL debug\arrow.lib debug\arrow_gtestd.lib ws2_32.lib debug\arrow_gmockd.lib C:\local\boost_1_87_0\lib64-msvc-14.3\libboost_process-vc143-mt-gd-x64-1_87.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:src\arrow\CMakeFiles\arrow_testing_shared.dir/intermediate.manifest src\arrow\CMakeFiles\arrow_testing_shared.dir/manifest.res" failed (exit code 1104) with the following output:
LINK : fatal error LNK1104: cannot open file 'libboost_filesystem-vc143-mt-gd-x64-1_87.lib'

This was with the command line:

cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DARROW_BUILD_SHARED=ON -DARROW_BUILD_STATIC=OFF -DBOOST_ROOT=c:/local/boost_1_87_0 -DBOOST_SOURCE=SYSTEM -DARROW_BUILD_TESTS=ON -DARROW_PARQUET=ON -DPARQUET_REQUIRE_ENCRYPTION=ON

Yet the file exists:

dir c:\local\boost_1_87_0\lib64-msvc-14.3\libboost_filesystem-vc143-mt-gd-x64-1_87.lib  Volume in drive C has no label.
 Volume Serial Number is E412-056F

 Directory of c:\local\boost_1_87_0\lib64-msvc-14.3

2024-12-05  21:56         8,844,152 libboost_filesystem-vc143-mt-gd-x64-1_87.lib
               1 File(s)      8,844,152 bytes
               0 Dir(s)  24,412,188,672 bytes free

Component(s)

C++

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions