Announcement

Collapse
No announcement yet.

When installing a Test, its package dependencies fail to install

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

  • When installing a Test, its package dependencies fail to install

    I'll use AIO-Stress as a Test that suffers from this issue. There are a few other Tests that have the same issue of dependencies not being installed, resulting in Test installation failure.

    The command "phoronix-test-suite install aio-stress" is used to attempt installation of the AIO-Stress Test. However, the AIO-Stress test depends on the package libaio-dev, but it fails installation as reported as follows ...

    install-ubuntu-packages.sh: 20: aptitude -y install libaio-dev: not found

    It appears that "install-ubuntu-packages.sh" is missing. The full output of "phoronix-test-suite install aio-stress" with most compiler errors replaced by "..." (due to the 10KB posting limit) is appended below.

    Any help diagnosing this issue or resolving would be very much appreciated.

    Ken

    ----------

    # phoronix-test-suite install aio-stress

    Warning: file_get_contents(http://www.phoronix-test-suite.com/g....0&os=ubuntu): failed to open stream: HTTP request failed! in /usr/share/phoronix-test-suite/pts-core/library/pts-functions_basic.php on line 91

    Warning: file_get_contents(http://www.phoronix-test-suite.com/PTS): failed to open stream: HTTP request failed! in /usr/share/phoronix-test-suite/pts-core/library/pts-functions_basic.php on line 91

    Network Communication Is Disabled.


    Checking For Needed External Dependencies.

    The following dependencies will be installed:
    - libaio-dev

    This process may take several minutes.
    install-ubuntu-packages.sh: 20: aptitude -y install libaio-dev: not found

    ====================================
    Installing Test: aio-stress
    Estimated Install Size: 0.5 MB
    ====================================

    aio-stress.c:58:20: error: libaio.h: No such file or directory
    aio-stress.c:192: error: field ?iocb? has incomplete type
    aio-stress.c:215: error: expected specifier-qualifier-list before ?io_context_t?
    aio-stress.c: In function ?print_latency?:
    aio-stress.c:437: error: ?struct thread_info? has no member named ?io_submit_latency?

    ...

    aio-stress.c: In function ?main?:
    aio-stress.c:1482: error: ?struct thread_info? has no member named ?active_opers?
    aio-stress.c:1483: error: ?struct thread_info? has no member named ?num_files?
    aio-stress.c:1492: error: ?struct thread_info? has no member named ?num_files?

    The aio-stress installer exited with a non-zero exit status. Installation failed.
    #

  • #2
    Hi,

    Do you have aptitude installed? The install-ubuntu-packages.sh is there and that's what's producing the dependency error above. However, I do a majority of my testing on Ubuntu and usually end up running through install and external dependency commands at least a few times per day, but have never encountered the issue you seem to experience.
    Michael Larabel
    https://www.michaellarabel.com/

    Comment


    • #3
      Originally posted by Michael View Post
      Do you have aptitude installed? The install-ubuntu-packages.sh is there and that's what's producing the dependency error above. However, I do a majority of my testing on Ubuntu and usually end up running through install and external dependency commands at least a few times per day, but have never encountered the issue you seem to experience.
      Yes, I have aptitude installed. It's easier to use than apt-get/apt-cache.

      I'm running Ubuntu 9.10 RC and have not upgraded to the official release yet. I'm concerned that upgrading may affect some test results.

      Ken

      Comment


      • #4
        Are you running PTS as a user or under root/sudo?

        Anyways, all that install-ubuntu-packages.sh is doing would be calling:

        gksudo aptitude -y install libaio-dev

        Can you try running that manually and report what happens?
        Michael Larabel
        https://www.michaellarabel.com/

        Comment


        • #5
          I'm running into a similar here. Kubuntu Karmic 64bit PTS 2.2, some tests fail to install because PTS does not install needed dependencies (gtkperf and qgears2 for example). If I install the dependencies on my own test installation works fine though. Oddly enough, this problem does not occur with my laptop running Ubuntu 32bit.
          Last edited by Melcar; 10 December 2009, 10:04 PM.

          Comment


          • #6
            Originally posted by Michael View Post
            Are you running PTS as a user or under root/sudo?
            Several weeks ago, I tried running PTS 2.2.0 beta as a normal user, but had some issues that apparently prevented installation of tests, so I tried via "sudo -s" shells and that worked better but still required work-arounds.

            This "sudo" shell is either a "console" shell or one started from within a Gnome (Login) Session started via Applications -> Accessories -> Terminal menu item.

            Originally posted by Michael View Post
            Anyways, all that install-ubuntu-packages.sh is doing would be calling:

            gksudo aptitude -y install libaio-dev

            Can you try running that manually and report what happens?
            On a system with an active Gnome Session, 'gksudo aptitude -y install libaio-dev' responds with a error saying '-y' is not a valid gksudo option. So, you probably meant to suggest that I try:

            gksudo "aptitude -y install libaio-dev"

            When the aptitude command is contained within double quotes, the installation of libaio-dev works as expected.

            However, on a system with Gnome installed but without an active Gnome Session both of the following fail with the same error:

            gksudo aptitude -y install libaio-dev

            gksudo "aptitude -y install libaio-dev"

            The reported error is:

            Gtk-WARNING **: cannot open display:

            Additional info:

            Some of my systems had PTS 2.2.0b1 installed from a tarball. All systems now have PTS 2.2.0 installed from the Phoronix Ubuntu repositories. A check of one system shows PTS 2.2.0b1 installed in a user account and PTS 2.2.0 installed in the normal system location of /usr/share.

            Ken

            Comment


            • #7
              Here is the exact script that's used for Ubuntu external dependencies:

              Code:
              #!/bin/sh
              if [ `whoami` != "root" ]; then
                  if [ -x /usr/bin/gksudo ] && [ ! -z "$DISPLAY" ]; then
                      ROOT="/usr/bin/gksudo"
                  elif [ -x /usr/bin/kdesu ] && [ ! -z "$DISPLAY" ]; then
                      ROOT="/usr/bin/kdesu"
                  elif [ -x /usr/bin/sudo ]; then
                      ROOT="/usr/bin/sudo"
                  fi
              else
                  ROOT=""
              fi
              
              if [ -x /usr/bin/aptitude ]; then
                  # aptitude is nice since it doesn't fail if a non-existant package is hit
                  # See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503215
                  $ROOT "aptitude -y install $*"
              else
                  $ROOT "apt-get -y --ignore-missing install $*"
              fi
              It covers not using gksudo when the DISPLAY is not set (as no X Server is likely running) and the apt commands are in quotes. Found in pts/distro-scripts/install-ubuntu-packages.sh on all releases prior to 2.4 or with 2.4+ is to be found in pts-core/static/distro-scripts/install-ubuntu-packages.sh.
              Michael Larabel
              https://www.michaellarabel.com/

              Comment


              • #8
                Originally posted by Michael View Post
                Here is the exact script that's used for Ubuntu external dependencies:

                Code:
                #!/bin/sh
                if [ `whoami` != "root" ]; then
                    if [ -x /usr/bin/gksudo ] && [ ! -z "$DISPLAY" ]; then
                        ROOT="/usr/bin/gksudo"
                    elif [ -x /usr/bin/kdesu ] && [ ! -z "$DISPLAY" ]; then
                        ROOT="/usr/bin/kdesu"
                    elif [ -x /usr/bin/sudo ]; then
                        ROOT="/usr/bin/sudo"
                    fi
                else
                    ROOT=""
                fi
                
                if [ -x /usr/bin/aptitude ]; then
                    # aptitude is nice since it doesn't fail if a non-existant package is hit
                    # See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503215
                    $ROOT "aptitude -y install $*"
                else
                    $ROOT "apt-get -y --ignore-missing install $*"
                fi
                It covers not using gksudo when the DISPLAY is not set (as no X Server is likely running) and the apt commands are in quotes. Found in pts/distro-scripts/install-ubuntu-packages.sh on all releases prior to 2.4 or with 2.4+ is to be found in pts-core/static/distro-scripts/install-ubuntu-packages.sh.
                Unfortunately, this script will not install packages when whoami == root. In this case the variable ROOT is set to the empty string and /bin/sh (by default a symbolic link to /bin/dash on Ubuntu 9.10) tries to interpret "aptitude -y install $*" -> "aptitude -y install libaio-dev" as a command with no options or arguments. This is clearly not what was intended. If the double quotes are removed, the command will work as expected.

                I suggest that the line

                ROOT=""

                be replaced by

                ROOT="su -c"

                Since, /bin/su is in the required package login, it should be safe to assume su exists and it is safe to run, since we know whoami == root. Of course it is redundant to invoke "su -c" when the shell already has root access, but other fixes would probably require additional if-then-else-fi logic.

                I have verified that this proposed fix works (on the one system I tried).

                Ken
                Last edited by fuchsk; 14 December 2009, 06:46 PM. Reason: Carification only: empty value -> empty string; no options -> no options or arguments.

                Comment


                • #9
                  Ah, thanks, I will add the su -c line.
                  Michael Larabel
                  https://www.michaellarabel.com/

                  Comment

                  Working...
                  X