Paul Rogers
2014-May-05 13:02 UTC
configure issue when libattr is in a non-standard location?
Hi, Apologies if I'm missing anything or this has already been discussed. I did try looking at the bug list and mailing list archives before sending this. Plus it's my first time posting. I am trying to compile rsync (v3.1.0) on a Synology NAS with ACL support. Why am I doing this? I have files that have extended ACLs that need to be preserved when another filesystem is rsync'd to it. The one Synology includes does not have ACL support (a feature request has been raised by someone else for this). In order to do that, I had to compile libattr and libacl from attr-2.4.47 and acl-2.2.52 respectively. They are installed in a non-standard location (/opt/local/attr and /opt/local/acl) as I want to keep "my" libraries separate from those bundled with the Synology. The libs and includes form those packages are then symlinked in to /opt/local/lib and /opt/local/include. When it came to compile rsync, it failed to detect libacl during configure and after reading the log, it became apparent that ld couldn't reference libattr.so.1 from libacl.so when checking for ACL support (excerpt from the config.log): ld: warning: libattr.so.1, needed by /opt/local/lib/libacl.so, not found (try using -rpath or -rpath-link) /opt/local/lib/libacl.so: undefined reference to `removexattr at ATTR_1.0' /opt/local/lib/libacl.so: undefined reference to `getxattr at ATTR_1.0' /opt/local/lib/libacl.so: undefined reference to `setxattr at ATTR_1.0' /opt/local/lib/libacl.so: undefined reference to `lgetxattr at ATTR_1.0' /opt/local/lib/libacl.so: undefined reference to `fsetxattr at ATTR_1.0' /opt/local/lib/libacl.so: undefined reference to `fgetxattr at ATTR_1.0' collect2: error: ld returned 1 exit status It should be noted the LD_LIBRARY_PATH and /etc/ld.so.conf are set to search in /opt/local/lib (and ldconfig was run to refresh the cache first). Below is the configure line I used: LDFLAGS="-L/opt/local/lib" CFLAGS="-I/opt/local/include" CPPFLAGS="-I/opt/local/include" ./configure --prefix=/opt/local/rsync-3.1.0 After some Googling, I found a similar e-mail on the Samba-Technical mailing list from February 2003 with no answer where you needed to force the libattr library inclusion in compilation by adding LIBS=-lattr to the configure line (https://lists.samba.org/archive/samba-technical/2003-February/026856.html) Once added, configure found libacl and was able to compile ACL support in (verified through running "rsync --version"). My question, is this an issue in Rsync's configure script where "-lattr" should be set approriately to detect and use libacl during make? I wanted to ask before adding a bug report in case I had misunderstood the issue. Thanks in advance, P.
Wayne Davison
2014-May-05 16:29 UTC
configure issue when libattr is in a non-standard location?
On Mon, May 5, 2014 at 6:02 AM, Paul Rogers <paul.rogers at flumps.org> wrote:> My question, is this an issue in Rsync's configure script where "-lattr" > should be set approriately to detect and use libacl during make?Most linux setups seem to slurp in libattr automatically, perhaps along with libacl. I went ahead and added a specific library check to configure.ac to make the use of -lattr explicit in the compilation. ..wayne.. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20140505/ccc11386/attachment.html>