Project

General

Profile

Actions

Bug #12676

closed

Boost 1.8x.0 causes Wt compilation errors from boost::filesystem

Added by Stefan Bn 5 months ago. Updated 4 months ago.

Status:
Rejected
Priority:
High
Assignee:
-
Target version:
-
Start date:
05/21/2024
Due date:
% Done:

0%

Estimated time:

Description

There seem to be changes in Boost 1.8x.x boost::filesystem that break the compilation of Wt 4.1x.x library and some Wt examples (on Windows using clang):

D:\Dev\Tools\msys64\clang64\bin\clang++.exe -DBOOST_ATOMIC_NO_LIB -DBOOST_CHRONO_NO_LIB -DBOOST_FILESYSTEM_NO_LIB -DBOOST_SPIRIT_THREADSAFE -DBOOST_THREAD_NO_LIB -DBOOST_THREAD_USE_LIB -DHAVE_PDF_IMAGE -DWT_BUILDING -DWT_FONTSUPPORT_
DIRECTWRITE -DWT_WITH_OLD_INTERNALPATH_API -D_CRT_SECURE_NO_WARNINGS -D_REENTRANT -D_SCL_SECURE_NO_WARNINGS -D_WIN32_WINNT=0x0600 -Dwt_EXPORTS -ID:/Dev/BuildLibs/wt/build-wt -ID:/Dev/BuildLibs/wt/wt-4.10.4/src/web -ID:/Dev/BuildLibs/
wt/wt-4.10.4/src -ID:/Dev/BuildLibs/wt/wt-4.10.4/src/Wt/Date/include -ID:/Dev/BuildLibs/wt/build-wt/src -ID:/Dev/BuildLibs/wt/wt-4.10.4/src/Wt/Dbo/backend/amalgamation -O2 -g -DNDEBUG -std=c++17 -fvisibility=hidden -fvisibility-inlin
es-hidden -MD -MT src/CMakeFiles/wt.dir/web/FileUtils.C.obj -MF src\CMakeFiles\wt.dir\web\FileUtils.C.obj.d -o src/CMakeFiles/wt.dir/web/FileUtils.C.obj -c D:/Dev/BuildLibs/wt/wt-4.10.4/src/web/FileUtils.C
D:/Dev/BuildLibs/wt/wt-4.10.4/src/web/FileUtils.C:82:7: error: no type named 'directory_iterator' in namespace 'boost::filesystem'; did you mean 'std::filesystem::directory_iterator'?
82 | boost::filesystem::directory_iterator end_itr;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| std::filesystem::directory_iterator

After investigating forever, fortunately I found out that this can be fixed easily:

In file src/web/FileUtils.C just add the missing include:

#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/directory.hpp>

The same goes for examples/filetreetable/FileTreeTableNode.C and there is an error that I could not resolve:

FAILED: examples/filetreetable/CMakeFiles/filetreetable.wt.dir/FileTreeTableNode.C.obj
D:\Dev\Tools\msys64\clang64\bin\clang++.exe -DBOOST_ATOMIC_NO_LIB -DBOOST_FILESYSTEM_NO_LIB -DBOOST_SPIRIT_THREADSAFE -DBOOST_THREAD_USE_LIB -DWT_WITH_OLD_INTERNALPATH_API -D_CRT_SECURE_NO_WARNINGS -D_REENTRANT -D_SCL_SECURE_NO_WARNI
NGS -D_WIN32_WINNT=0x0600 -ID:/Dev/BuildLibs/wt/build-wt -ID:/Dev/BuildLibs/wt/wt-4.10.4/src -O2 -g -DNDEBUG -std=c++17 -MD -MT examples/filetreetable/CMakeFiles/filetreetable.wt.dir/FileTreeTableNode.C.obj -MF examples\filetreetable
\CMakeFiles\filetreetable.wt.dir\FileTreeTableNode.C.obj.d -o examples/filetreetable/CMakeFiles/filetreetable.wt.dir/FileTreeTableNode.C.obj -c D:/Dev/BuildLibs/wt/wt-4.10.4/examples/filetreetable/FileTreeTableNode.C
D:/Dev/BuildLibs/wt/wt-4.10.4/examples/filetreetable/FileTreeTableNode.C:28:25: error: no member named 'leaf' in 'boost::filesystem::path'
28 | : WTreeTableNode(path.leaf().string(), createIcon(path)),
| ~~~~ ^
1 error generated.

Also the header boost/filesystem/convenience.hpp was removed with boost 1.85.0, which affects:

examples/wt-homepage/SourceView.C
examples/wt-homepage/ExampleSourceViewer.C


Related issues 1 (0 open1 closed)

Related to Bug #12615: Boost 1.85 dropped directory_iteratorClosedMatthias Van Ceulebroeck04/17/2024

Actions
Actions #1

Updated by Stefan Bn 5 months ago

Just found out: this has also been reported here:

https://redmine.emweb.be/issues/12615

Actions #2

Updated by Matthias Van Ceulebroeck 4 months ago

  • Status changed from New to Rejected

Hello Stefan,

thanks for the report. I'll be rejecting this issue (since it's a duplicate), and attaching it to the first report.

Actions #3

Updated by Matthias Van Ceulebroeck 4 months ago

  • Related to Bug #12615: Boost 1.85 dropped directory_iterator added
Actions

Also available in: Atom PDF