It will take a little bit of time. I need to regenerate.
[Update] I did a complete fresh start and did not see any problems at all. I always start completely clean, so I do not know what went wrong the first time.
Gene
It will take a little bit of time. I need to regenerate.
[Update] I did a complete fresh start and did not see any problems at all. I always start completely clean, so I do not know what went wrong the first time.
Gene
Gremlins.
(Or, you got caught in the middle of one of the eight thousand updates I pushed to that PR as I worked to get it functional across the various systems… anyway, I’m glad it was resolved, but if the issue recurs please let me know)
How can you judge this? Ridiculous is not appropriate. We have set a goal for the current release cycle. This thread is not the right place to go to the details, but I think to manage the release it is important to set focus. You might have read this:
https://devtalk.freecad.org/t/freecad-day-2023-report-and-continued-discussion/67115/8
There are different interests. Users like new releases more frequently, annoying bugs fixed etc. New features are necessary to one day reach a 1.0 release. We are no company, where a boss can say “Our customers reported that the Image WB has some annoyances. Bernie, please work the next week on this.” But sure something should be done to step by step reduce the reported list of annoyances.
The development cycle has a certain time-span and we agreed that the last cycle was a bit long. We should stay with 12 months. Also the feature freeze period last time was quite long.
Since the release goal is to address Toponaming. Code refactorings without new features or bugfixes at the current development cycle time makes it harder to achieve this. Therefore it is fair and even important to say “wait, reconsider, because…” And this is what I did. I asked for good arguments, and got one. So let’s move on. But you can understand that refactoring without adding a new feature or fixing bugs is at the moment not helpful to reach the release goal.
Everything worked fine with latest MSVC 2022 and CMake 3.25.2.
Many thanks!
Fmt library is already included in vtk-9
vtkfmt-9.1.dll is in FreeCAD_weekly-builds-…-conda-Windows-x86_64-py310.7z
It can be used.
Two DLLs are always better than one!
I think we should be independent from VTK. In the past we had several issues with VTK 9, therefore in the LibPack for Windows we purposely still use VTK 8.2. This might happen again, therefore it is good to be independent.
As chennes solutions works, it should be used.
I have fmt installed on linux but the build seems to still be fetching it from github, how do I make it use a local copy? This is also relevant for flatpak where the build environment does not have access to the internet so I need to add have it there already. Is there a cmake flag I should be aware of? For the flatpak situation, is it preferable to build fmt first and point freecad to it or should I just point freecad to it’s source?
It was my understanding that cMake was supposed to be using the local copy if it was there. If that’s not the case I’ll have to hand-code the call to find_package. Not a big deal, but I hadn’t done it.
I looked at the PR and to my untrained eyes it doesn’t look like it’s doing a system search for the library, I mean the first line is checking connection with github
https://github.com/chennes/FreeCAD/blob/b6d186ef730d05796d1d3582db3d223e6256b85b/cMake/FreeCAD_Helpers/SetupLibFmt.cmake#L6
besides that, where can I put a local copy? Is there a cmake flag to point it to the repository?
My reading of the documentation for FetchContent_MakeAvailable(fmt) was that it would use find_package(fmt) first, and only do the download if it couldn’t find it. I check for a connection in any case.
from what I reading, the problem seems to be that it first try to download and only if it’s not downloaded looks for a local copy, besides that whatever is using to check for connection doesn’t seems to be very good, what’s the point of checking connection anyway? if there is it’ll work if there isn’t it won’t, as is it hangs for a couple of minutes here when I disconnect from wifi and try to do a clean build:
-- Checking for connection to GitHub...
-- GitHub connection established for FetchContent
only to then give me this error:
[1/9] Creating directories for 'fmt-populate'
[1/9] Performing download step (download, verify and extract) for 'fmt-populate'
-- Downloading...
dst='/home/adrian/Documents/Repos/freecad/FreeCAD/build/_deps/fmt-subbuild/fmt-populate-prefix/src/9.1.0.zip'
timeout='none'
inactivity timeout='none'
-- Using src='https://github.com/fmtlib/fmt/archive/refs/tags/9.1.0.zip'
-- Retrying...
-- Using src='https://github.com/fmtlib/fmt/archive/refs/tags/9.1.0.zip'
-- Retry after 5 seconds (attempt #2) ...
-- Using src='https://github.com/fmtlib/fmt/archive/refs/tags/9.1.0.zip'
-- Retry after 5 seconds (attempt #3) ...
-- Using src='https://github.com/fmtlib/fmt/archive/refs/tags/9.1.0.zip'
-- Retry after 15 seconds (attempt #4) ...
-- Using src='https://github.com/fmtlib/fmt/archive/refs/tags/9.1.0.zip'
-- Retry after 60 seconds (attempt #5) ...
-- Using src='https://github.com/fmtlib/fmt/archive/refs/tags/9.1.0.zip'
CMake Error at fmt-subbuild/fmt-populate-prefix/src/fmt-populate-stamp/download-fmt-populate.cmake:170 (message):
Each download failed!
error: downloading 'https://github.com/fmtlib/fmt/archive/refs/tags/9.1.0.zip' failed
status_code: 6
status_string: "Couldn't resolve host name"
log:
--- LOG BEGIN ---
Could not resolve host: github.com
Closing connection 0
--- LOG END ---
error: downloading 'https://github.com/fmtlib/fmt/archive/refs/tags/9.1.0.zip' failed
status_code: 6
status_string: "Couldn't resolve host name"
log:
--- LOG BEGIN ---
Could not resolve host: github.com
Closing connection 0
--- LOG END ---
error: downloading 'https://github.com/fmtlib/fmt/archive/refs/tags/9.1.0.zip' failed
status_code: 6
status_string: "Couldn't resolve host name"
log:
--- LOG BEGIN ---
Could not resolve host: github.com
Closing connection 0
--- LOG END ---
error: downloading 'https://github.com/fmtlib/fmt/archive/refs/tags/9.1.0.zip' failed
status_code: 6
status_string: "Couldn't resolve host name"
log:
--- LOG BEGIN ---
Could not resolve host: github.com
Closing connection 0
--- LOG END ---
error: downloading 'https://github.com/fmtlib/fmt/archive/refs/tags/9.1.0.zip' failed
status_code: 6
status_string: "Couldn't resolve host name"
log:
--- LOG BEGIN ---
Could not resolve host: github.com
Closing connection 0
--- LOG END ---
error: downloading 'https://github.com/fmtlib/fmt/archive/refs/tags/9.1.0.zip' failed
status_code: 6
status_string: "Couldn't resolve host name"
log:
--- LOG BEGIN ---
Could not resolve host: github.com
Closing connection 0
--- LOG END ---
FAILED: fmt-populate-prefix/src/fmt-populate-stamp/fmt-populate-download /home/adrian/Documents/Repos/freecad/FreeCAD/build/_deps/fmt-subbuild/fmt-populate-prefix/src/fmt-populate-stamp/fmt-populate-download
cd /home/adrian/Documents/Repos/freecad/freecad-pkgbuild/src/FreeCAD/build/_deps && /usr/bin/cmake -P /home/adrian/Documents/Repos/freecad/FreeCAD/build/_deps/fmt-subbuild/fmt-populate-prefix/src/fmt-populate-stamp/download-fmt-populate.cmake && /usr/bin/cmake -P /home/adrian/Documents/Repos/freecad/FreeCAD/build/_deps/fmt-subbuild/fmt-populate-prefix/src/fmt-populate-stamp/verify-fmt-populate.cmake && /usr/bin/cmake -P /home/adrian/Documents/Repos/freecad/FreeCAD/build/_deps/fmt-subbuild/fmt-populate-prefix/src/fmt-populate-stamp/extract-fmt-populate.cmake && /usr/bin/cmake -E touch /home/adrian/Documents/Repos/freecad/FreeCAD/build/_deps/fmt-subbuild/fmt-populate-prefix/src/fmt-populate-stamp/fmt-populate-download
ninja: build stopped: subcommand failed.
CMake Error at /usr/share/cmake/Modules/FetchContent.cmake:1624 (message):
Build step for fmt failed: 1
Call Stack (most recent call first):
/usr/share/cmake/Modules/FetchContent.cmake:1764:EVAL:2 (__FetchContent_directPopulate)
/usr/share/cmake/Modules/FetchContent.cmake:1764 (cmake_language)
/usr/share/cmake/Modules/FetchContent.cmake:1978 (FetchContent_Populate)
cMake/FreeCAD_Helpers/SetupLibFmt.cmake:32 (FetchContent_MakeAvailable)
CMakeLists.txt:45 (SetupLibFmt)
-- Configuring incomplete, errors occurred!
See also "/home/adrian/Documents/Repos/freecad/freecad-pkgbuild/src/FreeCAD/build/CMakeFiles/CMakeOutput.log".
==> ERROR: A failure occurred in build().
Aborting...
and I have fmt installed on my system, I don’t need it redownloaded, so it isn’t even falling back to look for a local copy properly
and I don’t know how I can point it to a manually downloaded copy for flatpak? cmake is called while offline on a clean environment, I can’t rely on a previous cached call of this
wasn’t it easier to just have added a git submodule?
According to the CMake documentation the find_package option requires version 3.24
Compare https://cmake.org/cmake/help/v3.23/module/FetchContent.html with https://cmake.org/cmake/help/v3.24/module/FetchContent.html
https://cmake.org/cmake/help/v3.24/module/FetchContent.html#variable:FETCHCONTENT_TRY_FIND_PACKAGE_MODE explicitly says it’s new since 3.24
I’m running archlinux so almost always running latest stable of most things, cmake --version says 3.25.2
not sure what’s the version for flatpak, what’s our minimum required cmake version?
FIND_PACKAGE_ARGS is missing from FetchContent_Declare if we want to allow using system installation, adding it does the trick for archlinux but the report output is weird:
-- Eigen3: 3.4.0
-- fmt: Source located in
-- Freetype: 2.13.0
would like to have some indications on how to point freecad to a local copy for flatpak
flatpak also has cmake version 3.25.2 btw
I’ll just add a manual call to find_package before all this code and bail out of it is found… give me a bit, I am away from a computer right now.
ignore this, I forgot I had replaced SetupLibFmt with find_package(fmt) in the cmake file
I’ve made a couple of tweaks to the cMake file: you can see the result in PR 8568. I had thought that what was new in cMake 3.24 was just some options controlling the find_package() calls, not their presence at all. So to support older cMakes, I have now added in a manual call to find_package. I have also reduced the ping wait time to three seconds, and fixed the mistake in my final report output.
IMHO, you are over-complicating this ![]()
Download of extra sources during configure/make stage, which is, AFAICT, what you are doing, is a bad practice,
mostly because build workers have no network connectivity(that’s the case on build.opensuse.org, at least).
That’s what makes packaging Golang/Rust on Linux so ‘fun’.
Since this library will be used all over the code (eventually), vendoring known/tested working version, building it with known configuration and using it as default makes most sense to me.
Upsides: CI should catch issues with code using it, no need to add yet another dependency to Windows devpack thingie
Downsides: someone™️ will have to maintain vendored version, and it’ll add some more code to the tree.
As for the option to use system library instead of internal…TBH, I wouldn’t,
that can be out-of-date, built ‘wrong’, or just too new (I’ve seen applications failing to build because of that),
Cmake check that would, if the system version is ‘problematic’, fall-back to using internal,
is an option, but that complicates things, for no gain I can see,
Then again, I could be wrong(often am).
Just my opinion as long-time Linux packager ![]()
whispers: we could use a git submodule