Qtweb demo Critical error detected c0000374

Please attach the content of

C:/root-6.28.12/installroot/builtins/pcre/PCRE-prefix/src/PCRE-stamp/PCRE-build-err.log

and

C:/root-6.28.12/installroot/builtins/pcre/PCRE-prefix/src/PCRE-stamp/PCRE-build-out.log

everthing is ok when I use the - A W32 option without Qt environment, but when I use - A X64, I execute

cmake --build . --config Release --target install

An error occurred :
D: \ work \ hms root_src \ net \ net \ src \ TS3HTTPRequest.cxx (164,7): error C3861: “gmtime_r”: Unable to find identifier [D: \ work \ hms root_build_64 \ net \ Net. vcxproj]

You cannot mix x64 and Win32. All targets / libraries must be of the same architecture. And with C++ you cannot mix Debug/Release either. They must be the same (in general Release)

I didn’t mix x64 and Win32, It’s just that I had a problem compiling on the X64 version, so I tried compiling with Win32.

Sorry I was confused by too many errors without context. So do I understand correctly that you didn’t manage to build ROOT in 64 bit mode but you did manage in 32 bit (without any Qt involved)?

The reasons for errors when compiling for 64-bit are summarized as follows:

  1. The python environment is not configured correctly.
  2. There are spaces in the path of openssl .

I now try to compile Qt6 and X64 successfully with cmd:

set PATH=%PATH%;C:\Qt6\6.5.3\msvc2019_64\bin 
cmake -G"Visual Studio 16 2019" -A x64 -Thost=x64 -Droot7=ON -Dpython=OFF -DPYTHON_EXECUTABLE=python -Dtesting=ON -DCMAKE_CXX_STANDARD=17 -Dwebgui=ON -Dqt5web=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=../root_install_64 ../root_src

But when I switch to Qt5

set PATH=%PATH%;D:\OSGeo4W\apps\Qt5\bin 
cmake -G"Visual Studio 16 2019" -A x64 -Thost=x64 -Droot7=ON -Dpython=OFF -DPYTHON_EXECUTABLE=python -Dtesting=ON -DCMAKE_CXX_STANDARD=17 -Dwebgui=ON -Dqt5web=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=../root_install_64 ../root_src

the above problem will occur

CMake Warning at cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package):
  Could not find a configuration file for package "Qt5Quick" that is
  compatible with requested version "5.15.9".

  The following configuration files were considered but not accepted:

    D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5Quick/Qt5QuickConfig.cmake, version: 5.15.3

Call Stack (most recent call first):
  D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngineCore/Qt5WebEngineCoreConfig.cmake:105 (find_package)
  cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
  D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngine/Qt5WebEngineConfig.cmake:105 (find_package)
  cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
  D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
  gui/qt5webdisplay/CMakeLists.txt:15 (find_package)


CMake Warning at cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package):
  Found package configuration file:

    D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngineCore/Qt5WebEngineCoreConfig.cmake

  but it set Qt5WebEngineCore_FOUND to FALSE so package "Qt5WebEngineCore" is
  considered to be NOT FOUND.
Call Stack (most recent call first):
  D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngine/Qt5WebEngineConfig.cmake:105 (find_package)
  cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
  D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
  gui/qt5webdisplay/CMakeLists.txt:15 (find_package)


CMake Warning at cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package):
  Found package configuration file:

    D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngine/Qt5WebEngineConfig.cmake

  but it set Qt5WebEngine_FOUND to FALSE so package "Qt5WebEngine" is
  considered to be NOT FOUND.
Call Stack (most recent call first):
  D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
  gui/qt5webdisplay/CMakeLists.txt:15 (find_package)


CMake Warning at cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package):
  Could not find a configuration file for package "Qt5Quick" that is
  compatible with requested version "5.15.9".

  The following configuration files were considered but not accepted:

    D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5Quick/Qt5QuickConfig.cmake, version: 5.15.3

Call Stack (most recent call first):
  D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngineCore/Qt5WebEngineCoreConfig.cmake:105 (find_package)
  cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
  D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngineWidgets/Qt5WebEngineWidgetsConfig.cmake:105 (find_package)
  cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
  D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
  gui/qt5webdisplay/CMakeLists.txt:15 (find_package)


CMake Warning at cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package):
  Found package configuration file:

    D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngineCore/Qt5WebEngineCoreConfig.cmake

  but it set Qt5WebEngineCore_FOUND to FALSE so package "Qt5WebEngineCore" is
  considered to be NOT FOUND.
Call Stack (most recent call first):
  D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngineWidgets/Qt5WebEngineWidgetsConfig.cmake:105 (find_package)
  cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
  D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
  gui/qt5webdisplay/CMakeLists.txt:15 (find_package)


CMake Warning at cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package):
  Found package configuration file:

    D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngineWidgets/Qt5WebEngineWidgetsConfig.cmake

  but it set Qt5WebEngineWidgets_FOUND to FALSE so package
  "Qt5WebEngineWidgets" is considered to be NOT FOUND.
Call Stack (most recent call first):
  D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
  gui/qt5webdisplay/CMakeLists.txt:15 (find_package)


CMake Warning at cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package):
  Found package configuration file:

    D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5/Qt5Config.cmake

  but it set Qt5_FOUND to FALSE so package "Qt5" is considered to be NOT
  FOUND.  Reason given by package:

  Failed to find Qt5 component "WebEngine" config file at
  "D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngine/Qt5WebEngineConfig.cmake"

  Failed to find Qt5 component "WebEngineWidgets" config file at
  "D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngineWidgets/Qt5WebEngineWidgetsConfig.cmake"




Call Stack (most recent call first):
  gui/qt5webdisplay/CMakeLists.txt:15 (find_package)


CMake Warning at gui/qt5webdisplay/CMakeLists.txt:21 (message):
  Qt5 (WebEngine, WebEngineWidgets) not found, disabling option 'qt5web'

Is there something wrong with my Qt5 environment?

As the error message says, it looks like you’re missing WebEngine

I installed Qt5WebEngine,but my Qt version is 5.15.3 , Qt5WebEngine is 5.15.9. I don’t know if the inconsistent version of Qt5WebEngine and Qt is the cause of the error.

Could well be… Maybe @linev knows better

One should install all qt components from the same version.

Okay, I have now recompiled the source code of Qt5.15.3 to get Qt components with the same version, and then I also successfully compiled root, but how do I run qtweb now? Do I need to compile qtweb through cmake again?

Yes, tutorials/webgui/qtweb is standalone application and need to be compiled separately

Thank you very much for your help, now I successfully compiled and ran the qtweb example.
There are a few things I’m more concerned about right now:

  1. What is the difference between RCanvas and TCanvas?
  2. Through RCanvas, can I use an API similar to C++ to directly set the parameters required for drawing? Such as X-axis range, font, etc.? If so, is there any corresponding sample code?
  3. Can I export to pdf format through RCanvas? When I use save as in standalone to export pdf, the console prompts :
Error in <[ROOT.WebGUI] Error D:\work\hms\root_src\gui\webdisplay\src\RWebDisplayHandle.cxx:859 in bool __cdecl ROOT::RWebDisplayHandle::ProduceImages(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &,const class std::vector<int,class std::allocator<int> > &,const class std::vector<int,class std::allocator<int> > &,const char *)>: Creation of PDF files supported only by Chrome-based browser

Hi,

RCanvas is prototype of new graphics organization in the ROOT.
It is in experimental state and may be changed at any time.
For the moment I do not recommend to take it for real applications.

Creation of PDF is only working when normal chrome browser is configured as web display.
QWebEngine does not support headless mode and therefore cannot be used for this purposes.

In very recent JSROOT 7.6.0 I integrate jsPDF package, which can produce PDF directly from SVG.
Therefore very soon it will be possible to save PDF directly from the canvas - which will also work with qtweb.

Regards,
Sergey

So if I want to integrate root into Qt, are there any other stable solutions? Or is the only way to do it is Qtweb’s way.

So if I want to integrate root into Qt, are there any other stable solutions?

TWebCanvas is implementation class for TCanvas.
It works in all kinds of web displays - including qt5/qt6 QWebEngine.

tutorials/webgui/qtweb demonstrate usage of both TWebCanvas and RCanvas,
also geometry viewer is shown. For now I recommend to use TWebCanvas for graphics display.

Thank you for your enthusiastic help. The reason for “Qtweb demo Critical error detected c0000374” is the lack of libROOTQt5WebDisplay.dll. You need to compile root from the source code. Please pay attention to the following during the compilation process:

  1. The correct python environment must be configured
  2. The installation path of openssl cannot have spaces.
  3. All Qt components need to have the same version.
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.