Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 831069 - sci-electronics/kicad-6.0.0: Could not find a library for TKOpenGl at /usr/lib64/opencascade with sci-libs/opencascade[gles2]
Summary: sci-electronics/kicad-6.0.0: Could not find a library for TKOpenGl at /usr/li...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Zoltan Puskas
URL:
Whiteboard:
Keywords:
: 831126 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-01-12 10:59 UTC by Michael Moon
Modified: 2022-01-16 01:31 UTC (History)
8 users (show)

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


Attachments
build.log (kicad-6.0.0-build-log.txt,9.04 KB, text/plain)
2022-01-12 10:59 UTC, Michael Moon
Details
emerge --info (emerge-info.txt,9.11 KB, text/plain)
2022-01-12 10:59 UTC, Michael Moon
Details
kicad-6.0.0-r1 build.log (kicad-6.0.0-r1-build-log.txt,9.22 KB, text/plain)
2022-01-13 11:38 UTC, Michael Moon
Details
emerge --info opencascade; ls /usr/lib64/opencascade (bug-831069-info.txt,12.61 KB, text/plain)
2022-01-13 12:33 UTC, Michael Moon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Moon 2022-01-12 10:59:36 UTC
Created attachment 761963 [details]
build.log

sci-electronics/kicad-6.0.0: Could not find a library for TKOpenGl at /usr/lib64/opencascade

libTKOpenGL.so is available at /usr/lib64/libTKOpenGl.so and is provided by sci-libs/oce-0.18.3-r3

/usr/lib64/opencascade belongs to sci-libs/opencascade-7.6.0

Seems like the whole kicad/oce/opencascade build process is a huge mess on all sides, so let me know if this should be reported upstream rather than here.
Comment 1 Michael Moon 2022-01-12 10:59:59 UTC
Created attachment 761964 [details]
emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-12 11:01:13 UTC
Thanks for the report. Suspect it's a duplicate of the other one, think I know the problem but can't look into it again until this evening or so. I think it's on our side.

*** This bug has been marked as a duplicate of bug 831054 ***
Comment 3 Michael Moon 2022-01-12 11:05:13 UTC
I did check that bug, but that looks like a link-time failure whereas this one is cmake looking in the wrong place for something at configure time.

If you think they have the same root cause despite the differing failure messages, I guess we can leave them as duplicates for now
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-12 11:14:24 UTC
(In reply to Michael Moon from comment #3)
> I did check that bug, but that looks like a link-time failure whereas this
> one is cmake looking in the wrong place for something at configure time.
> 
> If you think they have the same root cause despite the differing failure
> messages, I guess we can leave them as duplicates for now

See the See Also on that bug.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-12 11:15:32 UTC
(In reply to Sam James from comment #4)
> (In reply to Michael Moon from comment #3)
> > I did check that bug, but that looks like a link-time failure whereas this
> > one is cmake looking in the wrong place for something at configure time.
> > 
> > If you think they have the same root cause despite the differing failure
> > messages, I guess we can leave them as duplicates for now
> 
> See the See Also on that bug.

...but you did sync after that part was fixed. OK, great, another one :)
Comment 6 Larry the Git Cow gentoo-dev 2022-01-13 01:25:43 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=557e00d429f1249c6a15bc56181f369f087a8545

commit 557e00d429f1249c6a15bc56181f369f087a8545
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-01-13 01:11:22 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-01-13 01:25:33 +0000

    sci-libs/opencascade: block eselect-opencascade
    
    We're no longer pursuing slotted OCC. Please emerge --depclean it
    if you have it installed (eselect-opencascade).
    
    Deslotting of OCC was already completed.
    
    Bug: https://bugs.gentoo.org/831069
    Bug: https://bugs.gentoo.org/831054
    Signed-off-by: Sam James <sam@gentoo.org>

 sci-libs/opencascade/opencascade-7.5.2-r4.ebuild | 1 +
 sci-libs/opencascade/opencascade-7.5.3-r5.ebuild | 1 +
 sci-libs/opencascade/opencascade-7.6.0-r1.ebuild | 1 +
 3 files changed, 3 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4db0fd6113765ff6f6865e47bdbe8f4f2495e4f4

commit 4db0fd6113765ff6f6865e47bdbe8f4f2495e4f4
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-01-13 01:07:53 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-01-13 01:25:32 +0000

    sci-libs/opencascade: fix installed environment file for non-slotted
    
    We're no longer using slotted OCC but I don't think we fully
    completed the version. I was initially going to wait but
    upon reflection, I think this is the only way forward
    that makes sense (updating the env.in to reflect
    the earlier changes).
    
    The old/outdated env file results in build failures
    in e.g. kicad.
    
    (Also, change ESYSROOT -> EPREFIX for the env file
    as the env file is for the end result system.)
    
    Bug: https://bugs.gentoo.org/831069
    Bug: https://bugs.gentoo.org/831054
    Signed-off-by: Sam James <sam@gentoo.org>

 sci-libs/opencascade/files/opencascade.env.in      | 32 +++++++++++-----------
 ...7.5.2-r3.ebuild => opencascade-7.5.2-r4.ebuild} |  5 ++--
 ...7.5.3-r4.ebuild => opencascade-7.5.3-r5.ebuild} |  5 ++--
 ...de-7.6.0.ebuild => opencascade-7.6.0-r1.ebuild} |  5 ++--
 4 files changed, 22 insertions(+), 25 deletions(-)
Comment 7 Michael Moon 2022-01-13 11:38:02 UTC
Created attachment 762077 [details]
kicad-6.0.0-r1 build.log

Still happening with kicad-6.0.0-r1 and opencascade-7.6.0-r1

Why is it looking for TKOpenGl in /usr/lib64/opencascade when it seems to be provided by oce in /usr/lib64/ ?

    $ ebelongs libTKOpenGl.so
    sci-libs/oce-0.18.3-r3:
      sym /usr/lib64/libTKOpenGl.so -> libTKOpenGl.so.11
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-13 11:40:11 UTC
(In reply to Michael Moon from comment #7)
> Created attachment 762077 [details]
> kicad-6.0.0-r1 build.log
> 
> Still happening with kicad-6.0.0-r1 and opencascade-7.6.0-r1
> 
> Why is it looking for TKOpenGl in /usr/lib64/opencascade when it seems to be
> provided by oce in /usr/lib64/ ?
> 
>     $ ebelongs libTKOpenGl.so
>     sci-libs/oce-0.18.3-r3:
>       sym /usr/lib64/libTKOpenGl.so -> libTKOpenGl.so.11

Well, we're using OCC here, not OCE.

Could you share:
1. emerge --info opencascade
2. ls /usr/lib64/opencascade?

I wonder if this is the same as the bug just filed (bug 831126).
Comment 9 Michael Moon 2022-01-13 12:33:30 UTC
Created attachment 762081 [details]
emerge --info opencascade; ls /usr/lib64/opencascade

Had to make an attachment, info dump was too large for a comment

Yeah, 831126 looks like a dupe of this bug, although I never made the gles2 flag connection
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-13 13:01:23 UTC
*** Bug 831126 has been marked as a duplicate of this bug. ***
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-13 13:01:45 UTC
From other bug (bug 831126):
(In reply to Uladzimir Bely from comment #6)
> I've just done some experiments with opencascade.
> 
> For opencascade-7.5.3, the following files are built:
> USE="gles2":  /usr/lib64/opencascade-7.5.3/libTKOpenGl.so.7.5.3
> USE="-gles2": /usr/lib64/opencascade-7.5.3/libTKOpenGl.so.7.5.3
> 
> In both cased the name of the library is the same (but size differs, of
> course)
> 
> In case of opencascade-7.6.0, the files have different names:
> USE="gles2":  /usr/lib64/opencascade/libTKOpenGles.so.7.6.0
> USE="-gles2": /usr/lib64/opencascade/libTKOpenGl.so.7.6.0
> 
> What I can also see is that ebuild for 7.6.0 includes new configuration line
> -DUSE_OPENGL=$(usex !gles2), which is not used in 7.5.3
Comment 12 Uladzimir Bely 2022-01-13 13:16:23 UTC
Actually, when I remove "-DUSE_OPENGL=$(usex !gles2)" configuration from 7.6.0 ebuild (built from local overlay), the library name always produced as "libTKOpenGl.so" and it doesn't depend on "gles2" enabled or not. So, it acts like 7.5.3 in this case.
Comment 13 Ian Pickworth 2022-01-14 13:42:49 UTC
When I had the gles2 use flag active on sci-libs/opencascade-7.6.0-r1 the build failed in a similar way to the failure reported here for Kicad.

With -gles2 on sci-libs/opencascade-7.6.0-r1, it built, and sci-electronics/kicad-6.0.0-r1 built OK as well.

Hope this helps, happy to get more info if needed.
Comment 14 Bernd 2022-01-15 09:04:15 UTC
I've added the USE_OPENGL in 7.6.0 due to upstream changes in the adm/cmake/occt_csf.cmake file regarding the handling of OpenGL, EGL and GLESv2.

On a review today, it looks like both, OpenGL and GLESv2 can be enabled at the same time, so the logic introduced into the ebuild would be wrong.

I'm gonna check on this today.
Comment 15 Bernd 2022-01-15 14:46:55 UTC
For the 7.5 ebuilds, USE=gles2 links libTKOpenGL.so against libEGL, libGLESv2 and libGLdispatch. Without this setting the library is linked against libGL, libGLX and libGLdispatch.

I assume, this is a case for the gles2-only USE flag then, instead of gles2.
Comment 16 Bernd 2022-01-15 20:47:29 UTC
The 7.6 ebuild behaves differently. If USE_OPENGL=ON is passed (default), the resulting libTKOpenGL library links against libGL, libGLX and libGLdispatch. If USE_GLES2=ON is passed, it builds a libTKOpenGles library, which links against libEGL, libGLESv2 and libGLdispatch.

So the option USE_OPENGL=$(usex !gles2) is wrong and will be removed. The gles2 USE flag with this ebuild is correct and won't be changed.
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-15 22:15:47 UTC
commit 2dcf0c603c3975d7f0c01435d64d2bdeddb6f8db (HEAD -> master, origin/master, origin/HEAD)
Author: Bernd Waibel <waebbl-gentoo@posteo.net>
Date:   Sat Jan 15 21:52:47 2022 +0100

    sci-libs/opencascade: rename gles2 USE flag to gles2-only

    Bugs: https://bugs.gentoo.org/831069
    Bugs: https://bugs.gentoo.org/831126
    Package-Manager: Portage-3.0.30, Repoman-3.0.3
    Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
    Closes: https://github.com/gentoo/gentoo/pull/23814
    Signed-off-by: Sam James <sam@gentoo.org>

commit ec86df92464abd1cd60e9675e9f84f83a9e6e76b
Author: Bernd Waibel <waebbl-gentoo@posteo.net>
Date:   Sat Jan 15 21:50:21 2022 +0100

    sci-libs/opencascade: don't pass USE_OPENGL option

    The option defaults to on and was erroneously passed as with the
    invert value of the gles2 USE flag, which lead to only libTKOpenGles
    library being built, but no libTKOpenGL library, resulting in build
    failures in revdeps.

    Closes: https://bugs.gentoo.rog/831069
    Package-Manager: Portage-3.0.30, Repoman-3.0.3
    Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
    Signed-off-by: Sam James <sam@gentoo.org>

commit 0ea126f6c797701fe675896e6a8bca989d9b82bb
Author: Bernd Waibel <waebbl-gentoo@posteo.net>
Date:   Sat Jan 15 15:52:19 2022 +0100

    sci-libs/opencascade: fix installation paths for 7.5

    Use the same path as for the 7.6 series /usr/$(get_libdir)/${PN}
    instead of /usr/$(get_libdir)/${P}, so the changed environment
    files works for all versions.

    Bugs: https://bugs.gentoo.org/831054
    Bugs: https://bugs.gentoo.org/831069
    Package-Manager: Portage-3.0.30, Repoman-3.0.3
    Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
    Signed-off-by: Sam James <sam@gentoo.org>
Comment 18 Larry the Git Cow gentoo-dev 2022-01-16 01:31:24 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4dd0f6791ebdc200a1e41ffd9b55435d8996b31f

commit 4dd0f6791ebdc200a1e41ffd9b55435d8996b31f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-01-16 01:31:07 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-01-16 01:31:07 +0000

    sci-libs/opencascade: revbump for fixed USE_OPENGL option in 7.6.x
    
    Closes: https://bugs.gentoo.org/831069
    Signed-off-by: Sam James <sam@gentoo.org>

 .../{opencascade-7.6.0-r1.ebuild => opencascade-7.6.0-r2.ebuild}          | 0
 1 file changed, 0 insertions(+), 0 deletions(-)