Vrui Installation Problems

Home Forums AR Sandbox Forum Vrui Installation Problems

Viewing 15 posts - 1 through 15 (of 31 total)
  • Author
    Posts
  • #124075
    rpjasper
    Participant

    Hello,

    I am having an issue in step 3 of the software installation guide (https://web.cs.ucdavis.edu/~okreylos/ResDev/SARndbox/). When I go to run Build-Ubuntu.sh, it spits out an error (output after all the compiling stuff):

    In file included from /home/arsandbox/src/Vrui-4.6-005/Images/Image.h:30:0,
                     from Images/Image.cpp:24:
    /home/arsandbox/src/Vrui-4.6-005/Images/BaseImage.h:157:2: error: ‘ptrdiff_t’ does not name a type
      ptrdiff_t getRowStride(void) const // Returns the offset between adjacent pixel rows in bytes
      ^~~~~~~~~
    /home/arsandbox/src/Vrui-4.6-005/Images/BaseImage.h: In member function ‘const void* Images::BaseImage::getPixelRow(unsigned int) const’:
    /home/arsandbox/src/Vrui-4.6-005/Images/BaseImage.h:177:47: error: ‘ptrdiff_t’ was not declared in this scope
       return static_cast<const char*>(rep->image)+ptrdiff_t(y)*getRowStride();
                                                   ^~~~~~~~~
    /home/arsandbox/src/Vrui-4.6-005/Images/BaseImage.h:177:47: note: suggested alternative:
    In file included from /usr/include/c++/7/cmath:41:0,
                     from /usr/include/c++/7/math.h:36,
                     from /home/arsandbox/src/Vrui-4.6-005/Math/Math.h:25,
                     from /home/arsandbox/src/Vrui-4.6-005/GL/GLScalarLimits.h:27,
                     from /home/arsandbox/src/Vrui-4.6-005/Images/Image.h:28,
                     from Images/Image.cpp:24:
    /usr/include/x86_64-linux-gnu/c++/7/bits/c++config.h:232:28: note:   ‘std::ptrdiff_t’
       typedef __PTRDIFF_TYPE__ ptrdiff_t;
                                ^~~~~~~~~
    In file included from /home/arsandbox/src/Vrui-4.6-005/Images/Image.h:30:0,
                     from Images/Image.cpp:24:
    /home/arsandbox/src/Vrui-4.6-005/Images/BaseImage.h:177:60: error: ‘getRowStride’ was not declared in this scope
       return static_cast<const char*>(rep->image)+ptrdiff_t(y)*getRowStride();
                                                                ^~~~~~~~~~~~
    /home/arsandbox/src/Vrui-4.6-005/Images/BaseImage.h:177:60: note: suggested alternative: ‘getSize’
       return static_cast<const char*>(rep->image)+ptrdiff_t(y)*getRowStride();
                                                                ^~~~~~~~~~~~
                                                                getSize
    Compiling Images/ReadPNMImage.cpp...
    Compiling Images/BaseImage.cpp...
    /home/arsandbox/src/Vrui-4.6-005/BuildRoot/BasicMakefile:128: recipe for target 'o/g++-3.g0.O3/Images/Image.o' failed
    make: *** [o/g++-3.g0.O3/Images/Image.o] Error 1
    make: *** Waiting for unfinished jobs....
    In file included from Images/BaseImage.cpp:24:0:
    /home/arsandbox/src/Vrui-4.6-005/Images/BaseImage.h:157:2: error: ‘ptrdiff_t’ does not name a type
      ptrdiff_t getRowStride(void) const // Returns the offset between adjacent pixel rows in bytes
      ^~~~~~~~~
    /home/arsandbox/src/Vrui-4.6-005/Images/BaseImage.h: In member function ‘const void* Images::BaseImage::getPixelRow(unsigned int) const’:
    /home/arsandbox/src/Vrui-4.6-005/Images/BaseImage.h:177:47: error: ‘ptrdiff_t’ was not declared in this scope
       return static_cast<const char*>(rep->image)+ptrdiff_t(y)*getRowStride();
                                                   ^~~~~~~~~
    /home/arsandbox/src/Vrui-4.6-005/Images/BaseImage.h:177:60: error: ‘getRowStride’ was not declared in this scope
       return static_cast<const char*>(rep->image)+ptrdiff_t(y)*getRowStride();
                                                                ^~~~~~~~~~~~
    /home/arsandbox/src/Vrui-4.6-005/Images/BaseImage.h:177:60: note: suggested alternative: ‘getSize’
       return static_cast<const char*>(rep->image)+ptrdiff_t(y)*getRowStride();
                                                                ^~~~~~~~~~~~
                                                                getSize
    /home/arsandbox/src/Vrui-4.6-005/BuildRoot/BasicMakefile:128: recipe for target 'o/g++-3.g0.O3/Images/BaseImage.o' failed
    make: *** [o/g++-3.g0.O3/Images/BaseImage.o] Error 1
    Build unsuccessful; please fix any reported errors and try again

    This is a fresh install of Linux Mint, attempted on both MATE 19.3, as well as MATE 19.

    I went to the Vrui page directly, to see if there was a different script, and tried there. The big issue I can see is that the checksum does not match what is on the page. Output of sha1sum Build-Ubuntu.sh:

    7e4f06ab9996c5da8db5813e204230369aed96c6 Build-Ubuntu.sh

    From the website: SHA1=c87a3d324bfc89e693d5cdb7500f56b48300f5e1

    Does anyone have any suggestions on how to move forward and resolve this? Thank you in advance!

    #124076
    orestes
    Participant

    Hello all,
    I have the same error, someone has any idea to fix it, please 🙂

    #124077
    chrisgahn
    Participant

    I too am encountering the same problem on an Ubuntu 18.04 system, completely fresh OS install. Here’s the output:

    Compiling Images/Image.cpp...
    In file included from /home/arsandbox/src/Vrui-4.6-005/Images/Image.h:30:0,
                     from Images/Image.cpp:24:
    /home/arsandbox/src/Vrui-4.6-005/Images/BaseImage.h:157:2: error: ‘ptrdiff_t’ does not name a type
      ptrdiff_t getRowStride(void) const // Returns the offset between adjacent pixel rows in bytes
      ^~~~~~~~~
    /home/arsandbox/src/Vrui-4.6-005/Images/BaseImage.h: In member function ‘const void* Images::BaseImage::getPixelRow(unsigned int) const’:
    /home/arsandbox/src/Vrui-4.6-005/Images/BaseImage.h:177:47: error: ‘ptrdiff_t’ was not declared in this scope
       return static_cast<const char*>(rep->image)+ptrdiff_t(y)*getRowStride();
                                                   ^~~~~~~~~
    /home/arsandbox/src/Vrui-4.6-005/Images/BaseImage.h:177:47: note: suggested alternative:
    In file included from /usr/include/c++/7/cmath:41:0,
                     from /usr/include/c++/7/math.h:36,
                     from /home/arsandbox/src/Vrui-4.6-005/Math/Math.h:25,
                     from /home/arsandbox/src/Vrui-4.6-005/GL/GLScalarLimits.h:27,
                     from /home/arsandbox/src/Vrui-4.6-005/Images/Image.h:28,
                     from Images/Image.cpp:24:
    /usr/include/x86_64-linux-gnu/c++/7/bits/c++config.h:232:28: note:   ‘std::ptrdiff_t’
       typedef __PTRDIFF_TYPE__ ptrdiff_t;
                                ^~~~~~~~~
    In file included from /home/arsandbox/src/Vrui-4.6-005/Images/Image.h:30:0,
                     from Images/Image.cpp:24:
    /home/arsandbox/src/Vrui-4.6-005/Images/BaseImage.h:177:60: error: ‘getRowStride’ was not declared in this scope
       return static_cast<const char*>(rep->image)+ptrdiff_t(y)*getRowStride();
                                                                ^~~~~~~~~~~~
    /home/arsandbox/src/Vrui-4.6-005/Images/BaseImage.h:177:60: note: suggested alternative: ‘getSize’
       return static_cast<const char*>(rep->image)+ptrdiff_t(y)*getRowStride();
                                                                ^~~~~~~~~~~~
                                                                getSize
    /home/arsandbox/src/Vrui-4.6-005/BuildRoot/BasicMakefile:128: recipe for target 'o/g++-3.g0.O3/Images/Image.o' failed
    make: *** [o/g++-3.g0.O3/Images/Image.o] Error 1

    I will also add that I have now tried the following versions of the Vrui software, all of which have resulted in the same errors above:

    4.6
    5.0
    5.1

    • This reply was modified 2 months, 2 weeks ago by chrisgahn.
    #124079
    chrisgahn
    Participant

    I suspect that certain library dependencies have changed, and Vrui as written can no longer be compiled with the new libraries. I’m going to try installing a fresh Ubuntu 16.04 LTS version without updating anything to see if that works. I’ll report back!

    #124081
    chrisgahn
    Participant

    So I did a fresh Ubuntu 16.04 installation and was able to successfully compile Vrui. I think that pretty much confirms that some system libraries necessary for the compilation have changed. If you’re having the above issues, I suggest installing Ubuntu 16.04 LTS or the equivalent Mint version instead of the latest one. I am sure the developer will eventually update the code so that the latest libraries can be used to compile it, but for now, you’ll have to use a previous version OS.

    #124082
    rpjasper
    Participant

    Thank you! I will try this out when I get to the computer in question.

    #124085
    Oliver Kreylos
    Keymaster

    That’s a bug, exposed by a change in system libraries with a new OS version.

    The fix is to edit Images/BaseImage.h in the Vrui source code directory, and insert the line

    #include <stddef.h>

    before line 27, which is currently #include <Threads/Atomic.h>

    #124092
    rpjasper
    Participant

    The issue though, is that the script to actually build and install Vrui will not finish, giving the errors that were cited.

    • This reply was modified 2 months, 2 weeks ago by rpjasper.
    #124094
    Florian
    Participant

    The Problem is that the build script downloads the tarball and thus overwrites the change to the Images/BaseImage.h file. The quick and dirty solution is to

    1: Run the script which produces the mentioned errors
    2: Add #include <stddef.h> before line 27 to ~/src/Vrui-4.6-005/Images/BaseImage.h
    3: Edit the Build-Ubuntu.sh file and
    a) comment out the line # wget -O – http://www.idav.ucdavis.edu/~okreylos/ResDev/Vrui/Vrui-$VRUI_VERSION-$VRUI_RELEASE.tar.gz | tar xfz –
    b) change 2 the variable 2 lines down to: DOWNLOAD_RESULT=0
    4: run the script again: bash Build-Ubuntu.sh

    This time it should run through without errors and you will see the spinning globe

    #124103
    mbarrows
    Participant

    Florian,
    Thanks so much. I was having the same issue and your instructions took care of it!!
    Matt

    #124105
    OrebroUniStudent
    Participant

    Florian,
    Thank you so much! I was having the same issue.

    #124109
    Kavwer
    Participant

    Hello i have the same issues as everybody else, and i can see there is a solution giving by Florian, but i am very new to linux so i dont know how to edit the build.ubuntu.sh and how do i add before line 27.

    Hope someone can help me.

    #124110
    Kavwer
    Participant

    I figured it out with Nano, but cant get it to work

    #124171
    Mohamad JARKAS
    Participant

    Dear Florian and anyone else,
    Could you please give more details about how to apply this fix, because i’m a new Linux user.

    Thank you in advance.

    #124175
    efischer
    Participant

    Hello! We are working to reinstall the software on one of our computers because of issues that came up during calibration. We cleared everything off of the computer except the Nvidia Driver and Linux. When I try to install the VRUI software using the code: cd ~
    wget http://www.idav.ucdavis.edu/~okreylos/ResDev/Vrui/Build-Ubuntu.sh
    bash Build-Ubuntu.sh

    there seems to be a problem communicating with the servers. We have ran this multiple times, at different points in the day, but keep receiving errors. It tries 20 times and then gives up. Any suggestions on how to get this installed? (We haven’t gotten to the point that the first user posted, it won’t compile anything.)

    Thank you!

Viewing 15 posts - 1 through 15 (of 31 total)
  • You must be logged in to reply to this topic.

Comments are closed.