[Need Help] Cannot run COLMAP: error while loading shared libraries: libceres.so.2: cannot open shared object file

I trying to create COLMAP flatpak.

It does build but does not run.
When I try to run I got the error below.

flatpak run io.github.colmap.colmap colmap: error while loading shared libraries: libceres.so.2: cannot open shared object file: No such file or directory 

It does not find libceres.so.2 but I install ceres and libceres.so.2 it exist in lib64.

I also add this to COLMAP module

build-options:
      append-ld-library-path: /app/lib64
      prepend-ld-library-path: /app/lib64

I also tried

build-options:
  append-ld-library-path: /app/lib:/app/lib64
  prepend-ld-library-path: /app/lib:/app/lib64

but no luck.

Thanks

These are only build-options. Also it is either prepend- or append-. Not both (it’s unecessary). Usually prepend- is what you want since you want this path first.

But the question is where does CERES install the libraries?

libceres.so.2 exist in /app/lib64

Gonna need to get it in /app/lib instead.

On some cmake built libraries I have seen adding -DLIB_SUFFIX= to the config-opts work.