Skip to content

[Windows] <filesystem> doesn't work in interpreted code #23664

Open

Description

@guitargeek

Reminder from the discussion in #23649 (comment): an interpreted macro using std::filesystem fails on Windows with [runStaticInitializersOnce]: Failed to materialize symbols: { ... }. The failure is visible in this CI log; the full output is in the test results artifact. That macro also used <regex>, and the symbol list contains regex internals too, so it may be affected as well.

Once this is fixed, the hand-written path helpers in roottest/root/meta/checkRuntimeIncludePaths.C can be replaced with lexically_normal() and weakly_canonical().

Reproducer

// repro.C, run with: root -b -q repro.C
#include <filesystem>
#include <iostream>

void repro()
{
   std::cout << std::filesystem::path("C:/a//b/./c").lexically_normal().string() << std::endl;
}

Activity

  1. bellenot commented on Oct 9, 2026

    @bellenot
    Member

    Tested locally, with the latest version of VS 2026 (v18.10.3) and VS 2022 (v17.14.41):

    C:\Users\bellenot\rootdev>root -b -q repro.C
    Processing repro.C...
    C:\a\b\c
    
  2. guitargeek commented on Oct 9, 2026

    @guitargeek
    ContributorAuthor

    Oh, okay then give me some hours to update the reproducer before closing this issue

  3. bellenot commented on Oct 9, 2026

    @bellenot
    Member

    Oh, okay then give me some hours to update the reproducer before closing this issue

    It's maybe only an issue with older versions of Visual Studio (the CI is using quite some old versions...)

  4. guitargeek commented on Oct 9, 2026

    @guitargeek
    ContributorAuthor

    I have opened PR with the exact situation where I originally saw the problem:

    Let's see what happens!

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

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions