Problem with metis in make check

When I do make check I get FAIL in example/ed/schwarz-nm-3d.edp while loading “metis”

The error is:
dlerror : metis.so: cannot open shared object file: No such file or directory
list prefix: ‘…/…/plugin/seq/’ ‘’ list suffix : ‘’ , ‘.so’
current line = 62
Load error : metis
line number :62, metis
error Load error : metis
line number :62, metis
code = 2 mpirank: 0

However, metis.so is present in /plugin/seq/.

Also I have a lot of XFAIL. Is that normal?

I solved this issue.
cp plugin/mpi/metis.so plugin/seq/metis.so .

Thank, but it does not work for me. metis.so is already present in /plugin/seq/

I have digging a little more and I have found a more precise error:

load error : metis
 fail : 

dlerror : /home/earanda/software/opt/lib/ff++/4.2-1/lib/metis.so: undefined symbol: METIS_PartMeshNodal

Any hints?

Go to your Freefem source directory (not install directory) and go to plugin/seq, then type ldd metis.so. Next go to plugin/mpi, then type ldd metis.so. Strangely only ${top-of-tour-Freefem-source directoryplugin}/mpi/metis.so is linked with libmetis.so. Now remove plugin/seq/metis.so and cp plugin/mpi/metis.so to plugin/seq then go to top of your Freefem source directory and type make check. In my case it reduce a number of fail and xfail tests.

In my case, none of metis.so (in plugin/seq and plugin/mpi) are linked with libmetis.so. The command ldd metis.so in plugin/seq produces

linux-vdso.so.1 (0x00007ffd5f1cd000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f9e17092000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f9e16e7a000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9e16c5b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9e1686a000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9e164cc000)
/lib64/ld-linux-x86-64.so.2 (0x00007f9e17633000)

and in plugin/mpi:

linux-vdso.so.1 (0x00007ffee0d2c000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1f1fbf2000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1f1f9da000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1f1f7bb000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1f1f3ca000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1f1f02c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f1f20193000)

Then first, you should remove both plugin/seq/metis.so and plugin/mpi/metis.so.
Second, view where-library-config or where-library, then you can see both metis LD and parmetis LD. (I think when freefem compiles metis.so plugin, it uses parmetis LD instead of metis LD.)
Third add -lmetis to parmetis LD and go to top of source directory.
Finally, go to the top of source directory and type make and make check.

Thanks a lot @pistatex, it works perfectly fine.