Installing Duplicity serie 7 on FreeBSD

I try to set up a backup system for Hubic with Duplicity. There is a link from here that works well on my Slackware box.
I try to do the same on FreeBSD but I come across error about librsync.

I download special version of duplicity for Hubic with bzr:
bzr branch lp:duplicity and run python compilec.py to create _librsync.so like suggested on the README. And here is the error generated:

Code:
   running build
   running build_ext
   building '_librsync' extension
   cc -fno-strict-aliasing -O2 -pipe -fstack-protector -fno-strict-aliasing -DNDEBUG -fPIC -I/usr/local/include/python2.7 -c _librsyncmodule.c -o build/temp.freebsd-10.2-RELEASE-amd64-2.7/_librsyncmodule.o
   _librsyncmodule.c:26:10: fatal error: 'librsync.h' file not found
   #include <librsync.h>
        ^
   1 error generated.
   error: command 'cc' failed with exit status 1
net/librsync is already installed with pkg.
 
Last edited by a moderator:
I think you should add /usr/local/include to include directory (maybe CPPFLAGS with -I/usr/local/include on ./configure).
 
I think you should add /usr/local/include to include directory (maybe CPPFLAGS with -I/usr/local/include on ./configure).
This is a python package. Maybe with LD_LIBRARY_PATH for loading library containing with that package ?
 
No. The cc doesn't find the header file:
Code:
fatal error: 'librsync.h' file not found
I did the following:
setenv CPPFLAGS -I/usr/local/include
./setup.py build


And works fine.

If you use sh (or shells/bash, etc.) you should use export CPPFLAGS="-I/usr/local/include" instead setenv....
 
It seems to be good. here is the end of output:
Code:
...
copying testing/unit/test_tarfile.py -> build/lib.freebsd-10.2-RELEASE-amd64-2.7/testing/unit
running build_ext
building 'duplicity._librsync' extension
creating build/temp.freebsd-10.2-RELEASE-amd64-2.7
creating build/temp.freebsd-10.2-RELEASE-amd64-2.7/duplicity
cc -fno-strict-aliasing -O2 -pipe -fstack-protector -fno-strict-aliasing -DNDEBUG -I/usr/local/include -fPIC -I/usr/local/include/python2.7 -c duplicity/_librsyncmodule.c -o build/temp.freebsd-10.2-RELEASE-amd64-2.7/duplicity/_librsyncmodule.o
cc -shared -lpthread -Wl,-rpath=/usr/lib:/usr/local/lib -fstack-protector -I/usr/local/include build/temp.freebsd-10.2-RELEASE-amd64-2.7/duplicity/_librsyncmodule.o -L/usr/local/lib -lrsync -lpython2.7 -o build/lib.freebsd-10.2-RELEASE-amd64-2.7/duplicity/_librsync.so
running build_scripts
creating build/scripts-2.7
copying and NOT adjusting bin/rdiffdir -> build/scripts-2.7
copying bin/rdiffdir -> build/scripts-2.7
copying and NOT adjusting bin/duplicity -> build/scripts-2.7
copying bin/duplicity -> build/scripts-2.7
 
Back
Top