3

I'm trying to use the Structure From Motion example from here (SFM by Nghiaho). I'm having some problem with the second part of the run process: I've downloaded the PMVS2 (Patch-based Multi-view Stereo Software) from here pmvs2 doc. I've opened the terminal in the /pmvs-2/program/main folder and typed:

./pmvs2 myfolder/options.txt

Where options.txt file was created in the first step of the process. I had this error:

./pmvs2: error while loading shared libraries: libgfortran.so.1: wrong ELF
class: ELFCLASS32

I found out that the problem is because I'm running a 64bit version of the program and gfortran library is compiled for 32bit. I've a file named libgfortran.so.3 in /usr/lib32/ folder and I've created a virtual link with:

ln -s /usr/lib32/libgfortran.so.3 /usr/lib32/libgfortran.so.1

I don't know what I have to do right now.

Vladimir F
  • 50,383
  • 4
  • 60
  • 96
Simone Colnaghi
  • 103
  • 1
  • 10
  • 1
    Such a symbolic link from version 1 to version 3 is not going to do anything good. The libraries have different version numbers for good reason. The are NOT compatible. And it will not really change anything in the 32/64 bit problem. Did you try to install 64-bit gfortran? If not, why? It is an obvious thing to do. – Vladimir F Nov 05 '17 at 14:19
  • Also, why tag [tag:c++]? And why not tag [tag:fortran]? – Vladimir F Nov 05 '17 at 14:21
  • I googled for the 64bit version of course, I didn't find anything useful. I'm so new in this world. – Simone Colnaghi Nov 05 '17 at 14:45

1 Answers1

1

It looks like the software is closed-source and distributed as binary. Not very good. It also depends on many shared libraries from RedHat Linux 4.1. That is pretty bad and very unprofessional. RedHat 4.1 and modern Ubuntu are NOT binary compatible.

It will not be very easy to make it work. You have to install all those libraries in the documentation http://www.di.ens.fr/pmvs/documentation.html and you have to install them in those versions that are mentioned there.

You really cannot just take libgfortran 3 und use it instead of the required libgfortran 1. They are not compatible. The ABI has changed two times between those two versions. If you do manage to run the program with version 3, it will likely crash. You need exactly those versions linked in the documentation. Good luck installing all of them.

The documentation also mentions some source codes in the package. However I fear they are just some example programs. If they are actually source codes for the whole PMVS2 library, it will be much better to compile it yourself and forget the binary.

Vladimir F
  • 50,383
  • 4
  • 60
  • 96
  • Thanks for the answer. The problem is that I can't find an easy way to install them (neither a difficult one). This gfortran library is driving me crazy. I had few problem with other libraries but I've installed them and everything was ok. It's not the same for this library. – Simone Colnaghi Nov 05 '17 at 14:47
  • You must compile gfortran from source yourself. It is a very old version. Probably version 4.1. There is no other way. There are no existing binaries. You must compile it yourself from source. – Vladimir F Nov 05 '17 at 15:00
  • I'm going to try, I'll let you know. Can you link some useful website? Thanks! – Simone Colnaghi Nov 05 '17 at 16:15
  • I found the error. It's not about the libgfortran, but the binary version of the file I'm using! [Here](https://www.di.ens.fr/pmvs/pmvs-1/index.html) they say that the binary version is compiled on a 32 bit machine. The pmvs2 should be compatible but it's not. – Simone Colnaghi Nov 06 '17 at 23:57