Project

General

Profile

Actions

Bug #7499

closed

4.3.0rc1: MinGW Linker Error in libwtdbo.dll

Added by Stefan Bn about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
03/23/2020
Due date:
% Done:

0%

Estimated time:

Description

There is a linker error when building Wt 4.3.0-rc1 using MinGW:

[ 88%] Linking CXX shared library libwtdbo.dll
D:/Dev/Tools/MinGW_9_64bit/bin/../lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\wtdbo.dir/objects.a(SqlQueryParse.C.obj): in function `boost::filesystem::path::generic_string[abi:cxx11]() const':
D:/Dev/Tools/MinGW_9_64bit/include/boost/filesystem/path.hpp:496: undefined reference to `boost::filesystem::path::generic_path() const'
D:/Dev/Tools/MinGW_9_64bit/bin/../lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\wtdbo.dir/objects.a(SqlQueryParse.C.obj): in function `boost::filesystem::path_traits::convert(char const*, char const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&)':
D:/Dev/Tools/MinGW_9_64bit/include/boost/filesystem/path.hpp:1005: undefined reference to `boost::filesystem::path::codecvt()'
D:/Dev/Tools/MinGW_9_64bit/bin/../lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/Dev/Tools/MinGW_9_64bit/include/boost/filesystem/path.hpp:1005: undefined reference to `boost::filesystem::path_traits::convert(char const*, char const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&, std::codecvt<wchar_t, char, int> const&)'
D:/Dev/Tools/MinGW_9_64bit/bin/../lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\wtdbo.dir/objects.a(SqlQueryParse.C.obj): in function `boost::filesystem::path_traits::convert(wchar_t const*, wchar_t const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
D:/Dev/Tools/MinGW_9_64bit/include/boost/filesystem/path.hpp:1013: undefined reference to `boost::filesystem::path::codecvt()'
D:/Dev/Tools/MinGW_9_64bit/bin/../lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/Dev/Tools/MinGW_9_64bit/include/boost/filesystem/path.hpp:1013: undefined reference to `boost::filesystem::path_traits::convert(wchar_t const*, wchar_t const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::codecvt<wchar_t, char, int> const&)'
collect2.exe: error: ld returned 1 exit status
mingw32-make[2]: *** [src\Wt\Dbo\CMakeFiles\wtdbo.dir\build.make:397: src/Wt/Dbo/libwtdbo.dll] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:566: src/Wt/Dbo/CMakeFiles/wtdbo.dir/all] Error 2
mingw32-make: *** [Makefile:129: all] Error 2

I managed to fix it by adding BOOST FS Lib to file \src\Wt\Dbo\CMakeLists.txt:

IF(TARGET Boost::headers)
TARGET_LINK_LIBRARIES(wtdbo PRIVATE Boost::headers ${BOOST_FS_LIB})
ENDIF()

Using this fix, building 4.3.0rc1 is fine. (But I assume there is a higher level setting where this has to be adjusted)

Actions #1

Updated by Roel Standaert about 4 years ago

Yeah, I noticed it when making the Windows (MSVC) builds, and disabled X3 on Windows for the time being. It's really strange to me that it's trying to link with boost_filesystem, since that should not have anything to do with it at all. I might just disable it (and keep the Qi parser) for the actual release.

Actions #2

Updated by Roel Standaert about 4 years ago

I had to dig into the source code to find that error_reporting.hpp uses Boost filesystem in exactly one location, and it can be disabled with BOOST_SPIRIT_X3_NO_FILESYSTEM.

Actions #3

Updated by Roel Standaert about 4 years ago

  • Status changed from New to Resolved

I pushed a commit that should fix it, so it should be fine in the final Wt 4.3.0 release.

Actions #4

Updated by Roel Standaert about 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF