-
Notifications
You must be signed in to change notification settings - Fork 99
Description
Describe the bug
When building Basilisk on Windows with Visual Studio 2022 (Visual Studio 2022 Developer Command Prompt v17.11.4, MSVC 19.41.34120), the build fails during the linking phase of the vizInterface module. The linker reports unresolved external symbols related to vectorized STL algorithms (e.g., __std_search_1, __std_find_end_1) originating from libprotobuf.lib.
This appears to be an ABI incompatibility issue between the pre-built Conan binaries for protobuf (likely built with an older MSVC version) and the newer MSVC STL implementation in VS 2022 17.10+, which introduced AVX-optimized vectorized algorithm implementations. Even forcing a rebuild with --build=protobuf does not seem to fully resolve the issue in the current configuration.
To reproduce
Steps to reproduce the behavior:
Clone the Basilisk repository on a Windows machine.
Ensure Visual Studio 2022 (version 17.10 or newer) is installed.
Run the build command with vizInterface enabled:
python conanfile.py --vizInterface True --opNav True
See the linker error during the compilation of vizInterface.
The project should compile and link successfully, producing the _vizInterface.pyd extension module without unresolved external symbol errors.
but:
libprotobuf.lib(strutil.cc.obj) : error LNK2019: unresolved external symbol __std_search_1 referenced in function "char const * __cdecl std::_Search_vectorized<char const ,char const >..."
libprotobuf.lib(stringpiece.cc.obj) : error LNK2001: unresolved external symbol __std_search_1
libprotobuf.lib(stringpiece.cc.obj) : error LNK2019: unresolved external symbol __std_find_end_1 ...
libprotobuf.lib(io_win32.cc.obj) : error LNK2019: unresolved external symbol __std_find_first_of_trivial_pos_1 ...
libprotobuf.lib(io_win32.cc.obj) : error LNK2019: unresolved external symbol __std_find_last_of_trivial_pos_1 ...
E:\py_project\basilisk\dist3\Basilisk\simulation_vizInterface.pyd : fatal error LNK1120: 4 unresolved externals
Desktop (please complete the following information):
OS: Windows 10
Compiler: Visual Studio 2022 (MSVC v19.4x / VS 17.11.4)
Python version: [Insert your Python version, e.g., 3.12]
Conan version: [Insert your Conan version if known, e.g., 2.x]
Additional context
The error symbols (__std_search_1, etc.) are internal MSVC STL symbols used for vectorized algorithms. These were introduced/changed in recent VS 2022 updates.
I have tried modifying conanfile.py to force a rebuild of dependencies using:
conanInstallList.append(f'{sys.executable} -m conans.conan install . --build=missing --build=protobuf --build=opencv --build=cppzmq')
However, the error persists. This suggests that either the Conan recipe for protobuf needs to be updated to explicitly handle the C++ standard or runtime