Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running p4vasp on Unix system #15

Open
thienbinh92 opened this issue Oct 3, 2019 · 3 comments
Open

Error when running p4vasp on Unix system #15

thienbinh92 opened this issue Oct 3, 2019 · 3 comments

Comments

@thienbinh92
Copy link

Hello,
I installed p4vasp on a unix system and it seemed to be fine. But when I started p4vasp by typing p4v, several errors showed. Could you please let me know what should I do in this case?
Best wishes and regards!

Traceback (most recent call last):
File "/home/m0020/m002004/p4vasp/bin/p4v.py", line 28, in
from p4vasp.SystemPM import *
File "/home/m0020/m002004/p4vasp/python-packages/p4vasp/SystemPM.py", line 130, in
import cp4vasp
File "/home/m0020/m002004/p4vasp/python-packages/cp4vasp.py", line 28, in
_cp4vasp = swig_import_helper()
File "/home/m0020/m002004/p4vasp/python-packages/cp4vasp.py", line 24, in swig_import_helper
_mod = imp.load_module('_cp4vasp', fp, pathname, description)
ImportError: libexpat.so.0: cannot open shared object file: No such file or directory

@lionping
Copy link

hi,

I just happened to read your entry. I have to add that I am neither a developer nor a user of p4vasp; I only installed it for others ;-)
As a first step you should find the file _cp4vasp.so on your system ($HOME maybe).
And then find out via ldd which libraries _cp4vasp.so was linked against.
on me, on a linuxmint19 system it looks like this:
user@host:~$ ldd /usr/lib/python2.7/dist-packages/_cp4vasp.so
linux-vdso.so.1 (0x00007ffe51b8f000)
libGLU.so.1 => /usr/lib/x86_64-linux-gnu/libGLU.so.1 (0x00007f4bcc5e1000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f4bcc355000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f4bcc143000)
libXft.so.2 => /usr/lib/x86_64-linux-gnu/libXft.so.2 (0x00007f4bcbf2e000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f4bcbce9000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4bcbaca000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4bcb8c6000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f4bcb58e000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f4bcb205000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4bcae67000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4bcac4f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4bca85e000)
libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f4bca62d000)
libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f4bca377000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f4bca0c3000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f4bc9eb9000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f4bc9c87000)
/lib64/ld-linux-x86-64.so.2 (0x00007f4bccc60000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f4bc9a5f000)
libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f4bc982d000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f4bc9610000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f4bc940c000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f4bc9206000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f4bc8ff1000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f4bc8de9000)

Check' if libexpat has been installed on your system-package and libexpat-dev-package;
myabe you need to set an LD_LIBRARY_PATH?
or, if you have already a higher version than libexpat.so.0 installed, maybe it is sufficient just to link symbolically, let's say libexpat.so.1 to libexpat.so.0 (I know it's dirty but wirth giving it a try)
well, just tried to help a bit with some suggestions...

or maybe after having installed the package libexpat-dev you need to compile the whole p4vasp once agin?
well, hope I could help at least a little bit!!
best
Michael

@lionping
Copy link

ah sorry -
the symbolic link libexpat.so.0 should point to libexpat.so.1 (just in case you wanna try this ;-) )

@orest-d
Copy link
Owner

orest-d commented Oct 18, 2019

Not sure how helpful, but here is my reflection: p4vasp does not use libexpat directly - it is probably a dependency from other libraries. If you were able to compile it, then linker could find it, though the system can't...
Did the symbolic link work?

jrbp pushed a commit to jrbp/p4vasp that referenced this issue Mar 1, 2023
Resolve "File reads non-array data"

Closes orest-d#15

See merge request schlipf/py4vasp!13
jrbp pushed a commit to jrbp/p4vasp that referenced this issue Mar 1, 2023
* Implement wrapper functions for plot and read
* Implement wrapper for conversion routines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants