Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 788274 - media-gfx/freecad fails to configure with sci-libs/opencascade:7.5
Summary: media-gfx/freecad fails to configure with sci-libs/opencascade:7.5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernd
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-05-05 05:50 UTC by ppdplayer
Modified: 2021-06-01 17:25 UTC (History)
6 users (show)

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


Attachments
Gcc-11 -pthread fail build log (pthread.log,343.91 KB, text/plain)
2021-05-05 05:51 UTC, ppdplayer
Details
HDF5 USE="-mpi" fail build log (hdf5mpi.log,343.91 KB, text/plain)
2021-05-05 05:52 UTC, ppdplayer
Details
opencascade:7.5 fail build log (opencascade.log,343.74 KB, text/plain)
2021-05-05 05:53 UTC, ppdplayer
Details
emerge --info freecad after fixing (emergeinfo.log,8.72 KB, text/plain)
2021-05-05 05:57 UTC, ppdplayer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ppdplayer 2021-05-05 05:50:37 UTC
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
Comment 1 ppdplayer 2021-05-05 05:51:39 UTC
Created attachment 706101 [details]
Gcc-11 -pthread fail build log
Comment 2 ppdplayer 2021-05-05 05:52:42 UTC
Created attachment 706104 [details]
HDF5 USE="-mpi" fail build log
Comment 3 ppdplayer 2021-05-05 05:53:18 UTC
Created attachment 706107 [details]
opencascade:7.5 fail build log
Comment 4 ppdplayer 2021-05-05 05:57:15 UTC
Created attachment 706110 [details]
emerge --info freecad after fixing
Comment 5 Bernd 2021-05-05 22:22:32 UTC
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.
Comment 6 Christoph Loehr 2021-05-06 19:06:21 UTC
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
Comment 7 Bernd 2021-05-06 19:17:39 UTC
(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.
Comment 8 Bernd 2021-05-06 19:30:28 UTC
You also need to append "/opencascade-7.5.1" to the line -DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir).
Comment 9 Bernd 2021-05-06 21:30:35 UTC
Removing the gcc-11 blocker. After fixing the opencascade configure check, the package builds fine with gcc-11
Comment 10 Larry the Git Cow gentoo-dev 2021-05-06 21:45:20 UTC
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(+)
Comment 11 ppdplayer 2021-05-06 22:50:40 UTC
Sorry that I erroneously filed multiple bugs when it was just opencascade. I should have tested this more.
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-05-06 22:53:40 UTC
(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!
Comment 13 Bernd 2021-05-07 06:28:12 UTC
(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!
Comment 14 Stephen Cavilia 2021-05-27 17:04:09 UTC
freecad-9999 is still failing, looks like the live ebuild needs a similar patch
Comment 15 Bernd 2021-05-27 17:50:22 UTC
(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.
Comment 16 Bernd 2021-06-01 17:25:19 UTC
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.