On Tue, 12 Mar 2019 at 23:45, Samuel Gaist <samuel.ga...@idiap.ch> wrote:
>
> Hi,
>
> I’ve been hit by this surprising error when building QtWebEngine.

I had this issue too, i fixed it by patching chromium build system,
see attached patch (i'm not the author and i don't have the original
url).
This was with Qt-5.11, with Qt-5.12 this patch is not needed anymore.

Chris
diff --git qt-everywhere-src-5.11.0/qtwebengine/src/3rdparty/chromium/tools/gn/ninja_action_target_writer.cc qt-everywhere-src-5.11.0/qtwebengine/src/3rdparty/chromium/tools/gn/ninja_action_target_writer.cc
index a5bc6cd..5cefbfe 100644
--- qt-everywhere-src-5.11.0/qtwebengine/src/3rdparty/chromium/tools/gn/ninja_action_target_writer.cc
+++ qt-everywhere-src-5.11.0/qtwebengine/src/3rdparty/chromium/tools/gn/ninja_action_target_writer.cc
@@ -115,9 +115,18 @@ std::string NinjaActionTargetWriter::WriteRuleDefinition() {
     // strictly necessary for regular one-shot actions, but it's easier to
     // just always define unique_name.
     std::string rspfile = custom_rule_name;
+
+    //quick workaround if filename length > 255 - ".rsp", just cut the dirs starting from the end
+    //please note ".$unique_name" is not used at the moment
+    int pos = 0;
+    std::string delimiter("_");
+    while (rspfile.length() > 251 && (pos = rspfile.find_last_of(delimiter)) != std::string::npos)
+        rspfile = rspfile.substr(0,pos);
+
     if (!target_->sources().empty())
       rspfile += ".$unique_name";
     rspfile += ".rsp";
+
     out_ << "  rspfile = " << rspfile << std::endl;
 
     // Response file contents.
_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to