Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 884225 - media-gfx/freecad-0.20.1: CMake options to make dev-qt/qtwebengine dependency optional
Summary: media-gfx/freecad-0.20.1: CMake options to make dev-qt/qtwebengine dependency...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Bernd
URL:
Whiteboard:
Keywords:
: 916266 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-12-04 00:10 UTC by Quentin Retornaz
Modified: 2023-10-27 09:27 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
FC-without-qtwebengine.png (FC-without-qtwebengine.png,82.54 KB, image/png)
2022-12-04 06:10 UTC, Ionen Wolkens
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Quentin Retornaz 2022-12-04 00:10:29 UTC
Hello,

I did extract CMake options from FreeCAD as following:

BUILD_ADDONMGR:BOOL=ON
BUILD_ARCH:BOOL=ON
BUILD_CLOUD:BOOL=OFF
BUILD_COMPLETE:BOOL=OFF
BUILD_DESIGNER_PLUGIN:BOOL=OFF
BUILD_DRAFT:BOOL=ON
BUILD_DRAWING:BOOL=ON
BUILD_DYNAMIC_LINK_PYTHON:BOOL=ON
BUILD_ENABLE_CXX_STD:STRING=C++17
BUILD_FEM:BOOL=ON
BUILD_FEM_NETGEN:BOOL=OFF
BUILD_FLAT_MESH:BOOL=OFF
BUILD_FORCE_DIRECTORY:BOOL=OFF
BUILD_GUI:BOOL=ON
BUILD_IDF:BOOL=ON
BUILD_IMAGE:BOOL=ON
BUILD_IMPORT:BOOL=ON
BUILD_INSPECTION:BOOL=ON
BUILD_JTREADER:BOOL=OFF
BUILD_MATERIAL:BOOL=ON
BUILD_MESH:BOOL=ON
BUILD_MESH_PART:BOOL=ON
BUILD_OPENSCAD:BOOL=ON
BUILD_PART:BOOL=ON
BUILD_PART_DESIGN:BOOL=ON
BUILD_PATH:BOOL=ON
BUILD_PLOT:BOOL=ON
BUILD_POINTS:BOOL=ON
BUILD_QT5:BOOL=ON
BUILD_RAYTRACING:BOOL=ON
BUILD_REVERSEENGINEERING:BOOL=ON
BUILD_ROBOT:BOOL=ON
BUILD_SANDBOX:BOOL=OFF
BUILD_SHOW:BOOL=ON
BUILD_SKETCHER:BOOL=ON
BUILD_SPREADSHEET:BOOL=ON
BUILD_START:BOOL=ON
BUILD_SURFACE:BOOL=ON
BUILD_TECHDRAW:BOOL=ON
BUILD_TEMPLATE:BOOL=OFF
BUILD_TEST:BOOL=ON
BUILD_TUX:BOOL=ON
BUILD_VR:BOOL=OFF
BUILD_WEB:BOOL=ON
BUILD_WITH_CONDA:BOOL=OFF
CCACHE_PROGRAM:FILEPATH=CCACHE_PROGRAM-NOTFOUND
CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line
CMAKE_AR:FILEPATH=/usr/bin/ar
CMAKE_BUILD_TYPE:STRING=
CMAKE_COLOR_MAKEFILE:BOOL=ON
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib
CMAKE_CXX_FLAGS:STRING=
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar
CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib
CMAKE_C_FLAGS:STRING=
CMAKE_C_FLAGS_DEBUG:STRING=-g
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_DLLTOOL:FILEPATH=/usr/lib/llvm/15/bin/dlltool
CMAKE_EXE_LINKER_FLAGS:STRING=
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=
CMAKE_INSTALL_BINDIR:PATH=bin
CMAKE_INSTALL_DATADIR:PATH=
CMAKE_INSTALL_DATAROOTDIR:PATH=share
CMAKE_INSTALL_DOCDIR:PATH=
CMAKE_INSTALL_INCLUDEDIR:PATH=include
CMAKE_INSTALL_INFODIR:PATH=
CMAKE_INSTALL_LIBDIR:PATH=lib64
CMAKE_INSTALL_LIBEXECDIR:PATH=libexec
CMAKE_INSTALL_LOCALEDIR:PATH=
CMAKE_INSTALL_LOCALSTATEDIR:PATH=var
CMAKE_INSTALL_MANDIR:PATH=
CMAKE_INSTALL_OLDINCLUDEDIR:PATH=/usr/include
CMAKE_INSTALL_PREFIX:PATH=/usr/local
CMAKE_INSTALL_RUNSTATEDIR:PATH=
CMAKE_INSTALL_SBINDIR:PATH=sbin
CMAKE_INSTALL_SHAREDSTATEDIR:PATH=com
CMAKE_INSTALL_SYSCONFDIR:PATH=etc
CMAKE_LINKER:FILEPATH=/usr/bin/ld
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake
CMAKE_MODULE_LINKER_FLAGS:STRING=
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_NM:FILEPATH=/usr/bin/nm
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
CMAKE_READELF:FILEPATH=/usr/bin/readelf
CMAKE_SHARED_LINKER_FLAGS:STRING=
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
CMAKE_SKIP_RPATH:BOOL=NO
CMAKE_STATIC_LINKER_FLAGS:STRING=
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_STRIP:FILEPATH=/usr/bin/strip
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
DOXYGEN_DOT_EXECUTABLE:FILEPATH=/usr/bin/dot
DOXYGEN_EXECUTABLE:FILEPATH=/usr/bin/doxygen
FREECAD_BUILD_DEBIAN:BOOL=OFF
FREECAD_LIBPACK_DIR:PATH=
FREECAD_LIBPACK_USE:BOOL=OFF
FREECAD_USE_EXTERNAL_KDL:BOOL=OFF
FREECAD_USE_EXTERNAL_SMESH:BOOL=OFF
FREECAD_USE_EXTERNAL_ZIPIOS:BOOL=OFF
FREECAD_USE_FREETYPE:BOOL=ON
FREECAD_USE_OCC_VARIANT:STRING=Community Edition
FREECAD_USE_PCL:BOOL=OFF
FREECAD_USE_PYBIND11:BOOL=OFF
FREECAD_USE_QTWEBMODULE:STRING=Automatic
FREECAD_USE_QT_FILEDIALOG:BOOL=ON
INSTALL_TO_SITEPACKAGES:BOOL=OFF
OCCT_CMAKE_FALLBACK:BOOL=OFF
PYCXX_INCLUDE_DIR:PATH=/home/quentin/Téléchargements/FreeCAD-0.20.1/src
PYCXX_SOURCE_DIR:PATH=/home/quentin/Téléchargements/FreeCAD-0.20.1/src/CXX
XercesC_INCLUDE_DIR:PATH=XercesC_INCLUDE_DIR-NOTFOUND
XercesC_LIBRARY_DEBUG:FILEPATH=XercesC_LIBRARY_DEBUG-NOTFOUND
XercesC_LIBRARY_RELEASE:FILEPATH=XercesC_LIBRARY_RELEASE-NOTFOUND

From FreeCAD community, dev-qt/qtwebengine is used only in Web, Start and AddonManager. For AddonManager it is only used to render Markdown text in Readme files.

Then -DBUILD_ADDONMGR=OFF -DBUILD_START=OFF -DBUILD_WEB=OFF could match a disabled USE for qtwebengine.

I can give you an ebuild if you need.
It would be an interesting improvement since qtwebengine is long to compile.

Reproducible: Always
Comment 1 Ionen Wolkens gentoo-dev 2022-12-04 06:10:17 UTC
Created attachment 839575 [details]
FC-without-qtwebengine.png

Unsure if situation improved, but this came up before in:
https://archives.gentoo.org/gentoo-proxy-maint/message/87cec2d20fa6146427952ed1928c43fc

I'll repost here given ^ may not be readable:

> > Is it possible to have a version of freecad without qtwebengine as
> > dependency? Will it work?
> 
> TLDR; Probably possible and will likely run, but with a very bad user
> experience, and runtime issues might occur, as it's IMO not meant
> to be build that way. TLDR;
> 
> I was able to directly build freecad from git HEAD without using
> qtwebengine with
> ~/FreeCAD/build $ cmake -G Ninja .. -DCMAKE_INSTALL_PREFIX="../dist"
> -DBUILD_ENABLE_CXX_STD="C++17" -DBUILD_QT5=ON -DBUILD_START=OFF
> -DBUILD_WEB=OFF -DFREECAD_USE_EXTERNAL_KDL=ON
> -DFREECAD_USE_OCC_VARIANT="Official Version"
> -DPYTHON_CONFIG_SUFFIX="-python3.9"
> -DPython3_EXECUTABLE="/usr/bin/python3.9"
> 
> Relevant options for running without qtwebengine are -DBUILD_START=OFF
> and -DBUILD_WEB=OFF. The other options are to select proper versions of
> different dependencies.
>
> The package built and ran the test-suite but one test, which tries to
> run the start workbench, which isn't available in this build.
> 
> So the answer is, that it's probably possible to build and run FreeCAD
> without qtwebengine dependency. However, I only used the default build
> options, and only changed the two options BUILD_START and BUILD_WEB.
> I haven't tried to build with any fancy options enabled.
> 
> The interface, however, looks really ugly. There will be no easy access
> to recent files, File menu contains only Exit entry, no icons anywhere
> as long as you don't open a workbench and you can access the
> functionality only by opening a workbench through the menu. I wouldn't
> recommend using FC in this way (see attached image).
> 
> I'd like to point out, that it's questionable how useful FreeCAD will
> be, if a machine has trouble building qtwebengine. The performance will
> probably be poor, especially if you want to use FreeCAD seriously for
> complex real-world drawings or FEM calculations.
> 
> The View->Workbench menu contains the empty Start workbench called FC
> <none>. which IMO shows, that FC isn't meant to be built without this
> workbench. In future versions, the Start workbench will eventually
> additionally be used for help, accessing the FreeCAD wiki.
> 
> If someone really wants this, I'd recommend to copy over the versioned
> or live ebuild, whichever version they prefer, from ::gentoo to their
> local overlay and modify the ebuild by setting the BUILD_START and
> BUILD_WEB options to OFF and removing the global dependency on
> qtwebengine. It's not something, I like to build into the package.
Comment 2 Bernd 2022-12-04 09:49:56 UTC
There was also some talk about this on the PR to implement cmake logic to build with Qt6, starting at[1].

I could, of course, re-add a USE flag for the web module, which leads to a GUI like in the image @ionen attached. This might be a GUI where a veteran FC user sets one of the available workbenches as start workbench, but a first-time user who want's to try out FC will eventually uninstall FC immediately, due to the bad user experience. I really don't like the restrictions which come from this setting.

And I want to repeat what I've already said in the message on the gentoo-proxy-maint ML:

> I'd like to point out, that it's questionable how useful FreeCAD will
> be, if a machine has trouble building qtwebengine. The performance will
> probably be poor, especially if you want to use FreeCAD seriously for
> complex real-world drawings or FEM calculations.

and

> If someone really wants this, I'd recommend to copy over the versioned
> or live ebuild, whichever version they prefer, from ::gentoo to their
> local overlay and modify the ebuild by setting the BUILD_START and
> BUILD_WEB options to OFF and removing the global dependency on
> qtwebengine. It's not something, I like to build into the package.

Additionally, maintaining the freecad ebuild takes considerable time (both on my side, as well as on the devs side, who have to test and merge the PRs). I don't want to take care about bug reports which might come up from such a configuration, draining on my already short time frame for working on my Gentoo packages.

[1] https://github.com/FreeCAD/FreeCAD/pull/7647#discussion_r1008920599
Comment 3 Bernd 2022-12-21 06:52:37 UTC
As there are no more arguments, I'm closing this bug.
Comment 4 Joonas Niilola gentoo-dev 2022-12-31 08:13:37 UTC
Agree. Thanks Bernd for the careful thought! 

Of course if it becomes feasible in future we can revisit this, but I believe many obstacles need to be cleared with upstream first.
Comment 5 Esteve Varela Colominas 2023-10-27 09:27:24 UTC
*** Bug 916266 has been marked as a duplicate of this bug. ***