media-gfx/freecad fails to build in multiple configurations: * sys-devel/gcc:11's -pthread flag is missing from the build and fails (build log 1) * sci-libs/hdf5 with USE="-mpi" is required to properly configure with cmake (build log 2) * sci-libs/opencascade:7.5 does not allow configuration, and 7.4 is required (build log 3) Reproducible: Always
Created attachment 706101 [details] Gcc-11 -pthread fail build log
Created attachment 706104 [details] HDF5 USE="-mpi" fail build log
Created attachment 706107 [details] opencascade:7.5 fail build log
Created attachment 706110 [details] emerge --info freecad after fixing
The three log files are almost identical (only minor, not relevant differences) and all fail due to not correctly finding opencascade:7.5. The pthread is a warning and pthread is found in all cases, so I doubt there's a gcc-11 issue involved. When I prepared the package, it's possible I was still using gcc-10, but I will check with gcc-11. The hdf5 mpi issue is also only a warning. In earlier versions, I used to have a mpi USE flag for freecad. At one point I talked to upstream about MPI support for freecad, and they told me there's no MPI support in freecad. This warning has always been there, if hdf5 is a serial installation, but it has always worked with parallel and serial installations of hdf5, despite this warning.
I can confirm the problem. With opencascade-7.5 installed I get the same error. With opencascade-7.4 it emerges without any problem. I also tried emerging freecad-0.19.2 with opencascade-7.5 and then running it with opencascade-7.5. It starts but only with an almost empty window without any usable functions. If I could help testing, let me know. CHL
(In reply to Christoph Loehr from comment #6) > If I could help testing, let me know. > > CHL Thanks for the offer, you're welcome. If you have a fast machine, make sure, opencascade-7.5.1 is selected using eselect opencascade and your environment has been re-sourced. Then append "-7.5.1" to the line -DOCC_INCLUDE_DIR="${CASROOT}"/include/opencascade in src_configure and try to build with FEATURES=test enabled, run ebuild test and try if you can load freecad sucessfully and anything works. I'm currently working on such a patch.
You also need to append "/opencascade-7.5.1" to the line -DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir).
Removing the gcc-11 blocker. After fixing the opencascade configure check, the package builds fine with gcc-11
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8e72a84aebb1ac6094257935e5c5a589da1870c commit d8e72a84aebb1ac6094257935e5c5a589da1870c Author: Bernd Waibel <waebbl-gentoo@posteo.net> AuthorDate: 2021-05-06 21:37:40 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-05-06 21:42:42 +0000 media-gfx/freecad: find opencascade-7.5 Correctly find sci-libs/opencascade-7.5.1 header and library locations. Closes: https://bugs.gentoo.org/788274 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net> Closes: https://github.com/gentoo/gentoo/pull/20708 Signed-off-by: Sam James <sam@gentoo.org> media-gfx/freecad/freecad-0.19.2.ebuild | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba902ec3a01181390af7c460b0f07fd9f80f616c commit ba902ec3a01181390af7c460b0f07fd9f80f616c Author: Sam James <sam@gentoo.org> AuthorDate: 2021-05-06 21:43:41 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-05-06 21:44:18 +0000 media-gfx/freecad: add bug reference to opencascade tweak Bug: https://bugs.gentoo.org/788274 Signed-off-by: Sam James <sam@gentoo.org> media-gfx/freecad/freecad-0.19.2.ebuild | 1 + 1 file changed, 1 insertion(+)
Sorry that I erroneously filed multiple bugs when it was just opencascade. I should have tested this more.
(In reply to ppdplayer from comment #11) > Sorry that I erroneously filed multiple bugs when it was just opencascade. I > should have tested this more. Please don’t be sorry for earnestly reporting problems. We can’t always know the true cause immediately :) Thanks for testing and reporting!
(In reply to Sam James from comment #12) > (In reply to ppdplayer from comment #11) > > Sorry that I erroneously filed multiple bugs when it was just opencascade. I > > should have tested this more. > > Please don’t be sorry for earnestly reporting problems. We can’t always know > the true cause immediately :) > > Thanks for testing and reporting! Sam is absolutely right. Working together we eventually get to the root cause and can come to a quick fix. Thanks for the report! Thanks Sam for the quick merge and adding the bug comment!
freecad-9999 is still failing, looks like the live ebuild needs a similar patch
(In reply to Stephen Cavilia from comment #14) > freecad-9999 is still failing, looks like the live ebuild needs a similar > patch Yes, you could be right about this. Accidentally, I didn't port the patch to the live ebuild. I'm gonna re-open this issue and check it.
Should have been fixed now with https://github.com/gentoo/gentoo/pull/20879 for live ebuild as well. Feel free to re-open if this issue persists.