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

cannot generate libnfs_wrap.c #15

Closed
sanjosh opened this issue Dec 2, 2016 · 5 comments
Closed

cannot generate libnfs_wrap.c #15

sanjosh opened this issue Dec 2, 2016 · 5 comments

Comments

@sanjosh
Copy link

sanjosh commented Dec 2, 2016

Sorry to bother you but I am a newbie in swig and can't figure this out.

I am running ubuntu 14.04. I already installed libnfs, swig and pcre (apt-get install pcregrep libnfs-dev swig) but it seems the libnfs_wrap.c is not getting generated

Running setup.py does not seem to generate the same output as seen here
http://rickhau.github.io/blog/2015/05/08/install-libnfs-python-library/

swig is installed in /usr/local/bin, so is pcre-config

Is something missing in my setup ?

$ sudo python setup.py install

running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/libnfs
copying libnfs/init.py -> build/lib.linux-x86_64-2.7/libnfs
running build_ext
building 'libnfs._libnfs' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/libnfs
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c libnfs/libnfs_wrap.c -o build/temp.linux-x86_64-2.7/libnfs/libnfs_wrap.o
x86_64-linux-gnu-gcc: error: libnfs/libnfs_wrap.c: No such file or directory
x86_64-linux-gnu-gcc: fatal error: no input files
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 4

$ ls -lR build/

build/:
total 8
drwxr-xr-x 3 root root 4096 Dec 2 09:32 lib.linux-x86_64-2.7
drwxr-xr-x 3 root root 4096 Dec 2 09:32 temp.linux-x86_64-2.7

build/lib.linux-x86_64-2.7:
total 4
drwxr-xr-x 2 root root 4096 Dec 2 09:32 libnfs

build/lib.linux-x86_64-2.7/libnfs:
total 8
-rw-r--r-- 1 root root 7649 Dec 2 09:02 init.py

build/temp.linux-x86_64-2.7:
total 4
drwxr-xr-x 2 root root 4096 Dec 2 09:32 libnfs

build/temp.linux-x86_64-2.7/libnfs:
total 0

@sahlberg
Copy link
Owner

sahlberg commented Dec 2, 2016 via email

@sanjosh
Copy link
Author

sanjosh commented Dec 2, 2016

I did build libnfs, swig and pcre from source but that didn't solve the problem.

Is there some debug or verbose flag I can enable to find out why swig isn't generating the libnfs_wrap.c ?

@sahlberg
Copy link
Owner

sahlberg commented Dec 6, 2016 via email

@karasu
Copy link

karasu commented Dec 22, 2016

Solved! Before running setup.py, make must be run inside the libnfs folder:

cd libnfs-python/libnfs
make

Cheers!

@sahlberg
Copy link
Owner

Thanks. INSTALL has been updated.

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