Announcement

Collapse
No announcement yet.

strange package situation -- virtual packages installed but not providing packages? how to fix?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    strange package situation -- virtual packages installed but not providing packages? how to fix?

    I use kicad and after an upgrade from 23.10 to 24.04 it's no longer working. It's installed via the official kicad ppa.

    When I try to run the pcb editor, it complains of a missing library file which I know to be supplied by libocct-modeling-algorithms-7.6t64. I've been trying to sort it out on the kicad forums to no success.

    Package kicad depends on libocct-modeling-data-7.6 (>= 1:7.6.3+dfsg1).

    libocct-modeling-data-7.6 is a virtual package, according to the ubuntu package list:

    libocct-modeling-algorithms-7.6 (= 7.6.3+dfsg1-7.1build1)
    virtual package provided by libocct-modeling-algorithms-7.6t64
    libocct-modeling-algorithms-7.6t64 (7.6.3+dfsg1-7.1build1) [universe]
    Open CASCADE Technology geometrical & topological algorithms module
    ...but when I run
    Code:
    aptitude search '?virtual' | grep libocct
    it does not appear.

    I currently have version 1:7.6.3+dfsg1-8~ubuntu24.04.1 installed of libocct-modeling-algorithms-7.6. That AFAIK-virtual package is only satisfied by one package, AFAICT:

    Code:
    $ aptitude search '?provides(^libocct-modeling-algorithms)'
    p libocct-modeling-algorithms-7.6t64 - Open CASCADE Technology geometrical & topological algorithms module​
    ...this package is not installed in my system. So this is a weird (to me?) case where the virtual package is installed but somehow not the package that satisfies that virtual package?

    If I do
    Code:
    dpkg -L
    you can see that there are no .so files installed via that package:

    Code:
    $ dpkg -L libocct-modeling-algorithms-7.6
    
    /.
    /usr
    /usr/lib
    /usr/lib/x86_64-linux-gnu
    /usr/share
    /usr/share/doc
    /usr/share/doc/libocct-modeling-algorithms-7.6
    /usr/share/doc/libocct-modeling-algorithms-7.6/changelog.Debian.gz
    /usr/share/doc/libocct-modeling-algorithms-7.6/copyright
    /usr/share/lintian
    /usr/share/lintian/overrides
    /usr/share/lintian/overrides/libocct-modeling-algorithms-7.6​
    Now, I could very likely just install the "t64" package that satisfies the virtual package, but there is further weirdness: I ran
    Code:
    apt reinstall kicad
    and
    Code:
    apt reinstall libocct-modeling-algorithms-7.6
    and I didn't think it changed anything, but it apparently did because now when I run
    Code:
    dpkg -L libocct-modeling-data-7.6​
    it does show the .so files as being installed by that package.

    However, now the kicad pcb editor just fails to start because of the next missing .so file, which is missing from libocct-modeling-data-7.6 in the exact same kind of situation: there are no .so files installed from that package, it is not currently actually "virtual" even though the ubuntu package list describes it as a virtual package, and there is a "t64" version that is not installed that has the .so files in it. I assume that if I
    Code:
    apt reinstall
    it that will fix it as well, but I'd rather not chase down these dependencies one at a time, and would prefer to understand what the heck is going on here to effect a "proper" solution.

    Any ideas? Thanks!


    #2
    Sounds like the PPA has messed up packaging to me.

    a virtual package isn't really a physical one - a real-life set of packages can provide the virtual dependency.

    For example, the virtual package www-browser dependency can be satisfied by a large number of real packages that are explicit set to fulfill this.
    I am guessing, without looking at the PPA packaging, that their relevant stuff isn't marked to fulfill this virtual dependency, or not properly.

    The proper solution is to get the PPA's owner to fix things, if this is the case. Otherwise, you do need to install the real packages manually till you have all the correct stuff the thing needs. Or use the flatpak, which won't have this sort of issue.

    The 't64' stuff are things that have been fixed for that future time bug , a lot of which was fixed at the last minute in 24.04 proper, and I will guess this may be part of the issue.
    Last edited by claydoh; Jul 23, 2024, 11:17 PM.

    Comment


      #3
      Thanks for the thoughts claydoh -- in this case would the ppa maintainer to talk to be the Ubuntu repo maintainers (or the libocct team that handles it for them), or the kicad folks? When I download the kicad .deb file from their repo, it states the maybe-virtual-maybe-not libocct-modeling-algorithms-7.6 as a dependency, but libocct* is, AFAICT, part of the main ubuntu repo...

      So, naively, if libocct-modeling-algorithms-7.6 isn't really a "virtual" package (because aptitude search '?virtual' | grep libocct returns nothing) but is more "virtual-ish" (I guess sometimes they sloppily refer to packages that serve more as pointers to sub-packages as "virtual"?), then shouldn't it have a dependency for the associated *t64 package? If this is correct, the Ubuntu repo maintainers would be the place to report this, yeah?

      I'd love to figure out where the issue is so it can be fixed for other hapless users like me, but I don't quite have the know-how. :-)

      Comment


        #4
        Originally posted by chconnor View Post
        When I download the kicad .deb
        What do you mean by this? Are you manually downloading a deb file, as opposed to adding the PPA as a source?

        But I don't know where to go to, I assume everyone would have the same issue.

        Originally posted by chconnor View Post
        I currently have version 1:7.6.3+dfsg1-8~ubuntu24.04.1 installed of libocct-modeling-algorithms-7.6.
        the package name is libocct-modeling-algorithms-7.6. The deb filename is currently 1:7.6.3+dfsg1-8~ubuntu24.04.1 This is correct.

        I am confused already, to be honest. An other thing to remember is that packages like these (Universe) are usually direct package imports from Debian, not packaged by Ubuntu proper. They can have packaging bugs or other things that may not quite fit a normal Ubuntu system, and few people report them, especially for something as niche as this.

        so lets look back at the basics:

        apt policy libocct-modeling-algorithms-7.6
        - the virtual package, which is supposed to be satisfied by libocct-modeling-algorithms-7.6t64
        apt policy libocct-modeling-algorithms-7.6t64

        I don't have a 24.04 system or virtual machine handy at the moment, which makes it harder as well.
        The easiest fix imo would be for the PPA to depend on a physical package, though the problem is for those who upgrade from previous releases would not get the 't64' stuff, I think.

        Comment


          #5
          I installed kicad from the ppa as one normally would, but just to check the dependencies I downloaded the .deb from here and ran dpkg -I on the .deb file... that's how I confirmed that it was depending on libocct-modeling-algorithms-7.6 (>= 1:7.6.3+dfsg1)

          So I don't mean to beat this to death if it's just a case of "eh, packaging bugs happen and it's never worth trying to track down the exact source". Just trying to be a good netizen. :-)

          So, in case you have any time to check it out:

          Let me switch the focus from *-modeling-algorithms-* to *-modeling-data-* because the former has now somehow been "fixed" and no longer represents the state things were in before I started poking around. The modeling-data package is still in the original weird state:

          Code:
          $ apt policy libocct-modeling-data-7.6
          libocct-modeling-data-7.6:
            Installed: 1:7.6.3+dfsg1-8~ubuntu24.04.1
            Candidate: 1:7.6.3+dfsg1-8~ubuntu24.04.1
            Version table:
           *** 1:7.6.3+dfsg1-8~ubuntu24.04.1 500
                  500 https://ppa.launchpadcontent.net/kicad/kicad-8.0-releases/ubuntu noble/main amd64 Packages
                  100 /var/lib/dpkg/status
          
          $ apt policy libocct-modeling-data-7.6t64
          libocct-modeling-data-7.6t64:
            Installed: (none)
            Candidate: 7.6.3+dfsg1-7.1build1
            Version table:
               7.6.3+dfsg1-7.1build1 500
                  500 http://us.archive.ubuntu.com/ubuntu noble/universe amd64 Packages​
          The contents of the installed package:

          Code:
          $ dpkg -L libocct-modeling-data-7.6
          /.
          /usr
          /usr/lib
          /usr/lib/x86_64-linux-gnu
          /usr/share
          /usr/share/doc
          /usr/share/doc/libocct-modeling-data-7.6
          /usr/share/doc/libocct-modeling-data-7.6/changelog.Debian.gz
          /usr/share/doc/libocct-modeling-data-7.6/copyright
          /usr/share/lintian
          /usr/share/lintian/overrides
          /usr/share/lintian/overrides/libocct-modeling-data-7.6​
          That's a package that this ubuntu all-packages list calls "virtual". But this should show it if it was a virtual pacakge, AFAIK:

          Code:
          aptitude search '?virtual' | grep libocct
          ...and it shows nothing. If I do a package search at packages.ubuntu.com in noble for "libocct" the virtual package does not appear (only the "real" t64 version) even though it was listed in the "all packages" list for Ubuntu here. However clicking on the link for the virtual package just leads to an error page.

          The package on my system is not installed from the ubuntu repo though, it's from the kicad PPA. It does not depend on the t64 package:

          Code:
          $ apt show libocct-modeling-data-7.6
          Package: libocct-modeling-data-7.6
          Version: 1:7.6.3+dfsg1-8~ubuntu24.04.1
          Priority: optional
          Section: libs
          Source: opencascade
          Maintainer: Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
          Installed-Size: 7,346 kB
          Depends: libc6 (>= 2.38), libgcc-s1 (>= 3.3.1), libocct-foundation-7.6 (>= 1:7.6.3+dfsg1), libstdc++6 (>= 13.1)
          Breaks: libocct-modeling-data-7.4, libocct-modeling-data-7.5
          Replaces: libocct-modeling-data-7.4, libocct-modeling-data-7.5
          Download-Size: 2,638 kB
          APT-Manual-Installed: no
          APT-Sources: https://ppa.launchpadcontent.net/kicad/kicad-8.0-releases/ubuntu noble/main amd64 Packages
          Description: Open CASCADE Technology 2D/3D geometric primitives data structures
           Open CASCADE Technology is a suite for 3D surface and solid modeling,
           visualization, data exchange and rapid application development.  It is an
           excellent platform for development of numerical simulation software including
           CAD/CAM/CAE, AEC and GIS, as well as PDM applications.
           .
           This package supplies data structures to represent 2D and 3D geometric models.
           .
           This package contains the following shared libraries:
           TKG2d TKG3d TKGeomBase TKBRep​
          The .deb file for libocct-modeling-data-7.6 from the kicad PPA is here, and when I download that .deb and inspect it for the TKBRep.so.7 file that kicad is complaining about missing this is what I see:

          Code:
          $ dpkg -c /tmp/libocct-modeling-data-dev_7.6.3+dfsg1-8~ubuntu24.04.1_amd64.deb | grep TKBRep.so
          lrwxrwxrwx root/root         0 2024-02-08 05:13 ./usr/lib/x86_64-linux-gnu/libTKBRep.so -> libTKBRep.so.7​
          ...I'm not quite sure how to interpret that -- it looks naively as if it includes symlinks but not the actual .so file? But I'll assume that's OK for now. However, note: the installed files from the dpkg -L command earlier is 12 lines long. The dpkg -c command here shows 744 lines... tons of files, etc. So, clearly the installed package is missing almost all the required contents from the current .deb file. [Edit: that may be an inaccurate way to determine files actually installed by the .deb... but still, it's clear it has more content than what is actually installed...]
          Last edited by chconnor; Jul 24, 2024, 11:12 AM.

          Comment


            #6
            Originally posted by chconnor View Post
            Let me switch the focus from *-modeling-algorithms-* to *-modeling-data-* because the former has now somehow been "fixed" and no longer represents the state things were in before I started poking around. The modeling-data package is still in the original weird state:
            Code:


            $ apt policy libocct-modeling-data-7.6 libocct-modeling-data-7.6: Installed: 1:7.6.3+dfsg1-8~ubuntu24.04.1 Candidate: 1:7.6.3+dfsg1-8~ubuntu24.04.1 Version table: *** 1:7.6.3+dfsg1-8~ubuntu24.04.1 500 500 https://ppa.launchpadcontent.net/kic...eleases/ubuntu noble/main amd64 Packages 100 /var/lib/dpkg/status $ apt policy libocct-modeling-data-7.6t64 libocct-modeling-data-7.6t64: Installed: (none) Candidate: 7.6.3+dfsg1-7.1build1 Version table: 7.6.3+dfsg1-7.1build1 500 500 http://us.archive.ubuntu.com/ubuntu noble/universe amd64 Packages​
            First guess: the package versioning from the Ubuntu archives :
            libocct-modeling-data-7.6t64 (, released *after* the version in the PPA may be seen as newer than the PPA version:
            ibocct-modeling-data-7.6
            Though the package file names, you would think the PPA is newer (1:7.6.3+dfsg1-8~ubuntu24.04.1 vs 7.6.3+dfsg1-7.1build1)
            But despite my minimal-ish packaging skills, this is all incredibly confusing.

            The file contents of the actual debs make zero difference, it is the dependencies as defined in the control file for the package, which can be found in the deb file, or the related file from the package sources: opencascade_7.6.3+dfsg1-8~ubuntu24.04.1.debian.tar.xz

            In the PPA , the package libocct-modeling-data-7.6 is NOT a virtual package at all.
            I think this is all related to the newer t64 packages in the ubuntu archive, and the virtual packages defined there, all "newer" than the stuff from the PPA.

            I haven't had the time or disk space to set up virt-manager on my desktop yet

            I do suggest at least temporarily trying the flatpak, or appimage if one is available.

            Comment


              #7
              Originally posted by claydoh View Post
              In the PPA , the package libocct-modeling-data-7.6 is NOT a virtual package at all.
              Yeah, and that's the weirdest part to me: I apparently have the PPA package installed but the files installed on my system by that package don't match the packages that the associated .deb would install (as further evidenced by the apt-get reinstall "fixing" the issue for the other package).

              I do suggest at least temporarily trying the flatpak, or appimage if one is available.
              I think I will next just do a reinstall of the -modeling-data- package and see if that fixes things up... I'm not worried about getting kicad running so much as wanting to know what happened, but it sounds like it's lost in the sauce at this point.

              I appreciate the brainstorms!

              Comment


                #8
                Just reinstalling modeling-data didn't fix it -- still had missing .so's, and rather than track down each required library I went with a recommended more complete solution which I post here in case anyone comes across this:

                Code:
                sudo apt remove "libocct*"
                sudo apt install kicad
                (when executing first command, it will tell you what will be removed; if it includes any packages besides kicad and libocct* packages, take note: either don't proceed or be prepared to reinstall those packages as well.)

                See other thread here.
                Last edited by chconnor; Jul 26, 2024, 02:10 PM.

                Comment


                  #9
                  Originally posted by chconnor View Post
                  Code:
                  sudo apt remove libocct*
                  That won't work exactly as typed, at least with most shells, because that shell will attempt to expand libocct*. One would need to use, for example,
                  Code:
                  sudo apt remove "libocct*"

                  Maybe you use some other shell that doesn't do that, but if you're giving commands on a forum, IMO it's best to give commands that will work with the default shell.
                  Regards, John Little

                  Comment


                    #10
                    Ah, right, thanks. I'll correct it.

                    Comment


                      #11
                      Originally posted by chconnor View Post
                      Just reinstalling modeling-data didn't fix it -- still had missing .so's, and rather than track down each required library I went with a recommended more complete solution which I post here in case anyone comes across this:

                      Code:
                      sudo apt remove "libocct*"
                      sudo apt install kicad
                      (when executing first command, it will tell you what will be removed; if it includes any packages besides kicad and libocct* packages, take note: either don't proceed or be prepared to reinstall those packages as well.)

                      See other thread here.
                      I am guessing that removing the libocct* stuff removed the offending package(s), and reinstalling kicad pulled in the correct ones - an artifact from the upgrade from 23,10, which I for some reason did not notice or take into account. I wager some package in this batch, or one of its lower level deps, was still a 23.10 package, perhaps. And your action here removed this, and caused correct ones to be installed.

                      Comment


                        #12
                        Yeah that's my impression too. There were packages of the same name in 23.10 that are no longer present in 24.04 (e.g. libocct-modeling-data-7.6 existed as a real package in 23.10 but does not exist in 24.04, though it is listed as a virtual package in the full ubuntu 24.04 packages list, as described above.) At any rate, yeah, just uninstalling the messed up packages and kicad and reinstalling got everything in its current, correct state, and it works now.

                        Comment

                        Working...
                        X