Bug#728646: libfilesys-smbclient-perl: FTBFS: libsmbclient.h: No such file or directory

gregor herrmann gregoa at debian.org
Sun Nov 3 19:23:06 UTC 2013


Control: tag -1 + confirmed patch

On Sun, 03 Nov 2013 18:15:04 +0100, David Suárez wrote:

> Debian now contains samba 4, which has header files in a special directory:
> /usr/include/samba-4.0/libsmbclient.h

Right, that's the problem.
 
> Relevant part (hopefully):
> > cc -c  -I/usr/include -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2   -DVERSION=\"3.2\" -DXS_VERSION=\"3.2\" -fPIC "-I/usr/lib/perl/5.18/CORE"   SmbClient.c
> > SmbClient.xs:20:26: fatal error: libsmbclient.h: No such file or directory
> >  #include "libsmbclient.h"
> >                           ^
> > compilation terminated.
> > make[1]: *** [SmbClient.o] Error 1
> 
Manually adding -I/usr/include/samba-4.0 is not enough:

cc -c  -I/usr/include -I/usr/include/samba-4.0 -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g   -DVERSION=\"3.2\" -DXS_VERSION=\"3.2\" -fPIC "-I/usr/lib/perl/5.18/CORE"   libauthSamba.c
/usr/bin/perl /usr/share/perl/5.18/ExtUtils/xsubpp  -typemap /usr/share/perl/5.18/ExtUtils/typemap -typemap typemap  SmbClient.xs > SmbClient.xsc && mv SmbClient.xsc SmbClient.c
cc -c  -I/usr/include -I/usr/include/samba-4.0 -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g   -DVERSION=\"3.2\" -DXS_VERSION=\"3.2\" -fPIC "-I/usr/lib/perl/5.18/CORE"   SmbClient.c
SmbClient.xs: In function 'XS_Filesys__SmbClient__mkdir':
SmbClient.xs:104:1: warning: 'mkdir' is deprecated (declared at /usr/include/samba-4.0/libsmbclient.h:2927) [-Wdeprecated-declarations]
 RETVAL = context->mkdir(context, fname, mode);
 ^
SmbClient.xs: In function 'XS_Filesys__SmbClient__rmdir':
SmbClient.xs:128:1: warning: 'rmdir' is deprecated (declared at /usr/include/samba-4.0/libsmbclient.h:2928) [-Wdeprecated-declarations]
 RETVAL = context->rmdir(context, fname);
 ^
SmbClient.xs: In function 'XS_Filesys__SmbClient__opendir':
SmbClient.xs:150:3: warning: 'opendir' is deprecated (declared at /usr/include/samba-4.0/libsmbclient.h:2923) [-Wdeprecated-declarations]
   RETVAL = context->opendir(context, fname);
   ^
SmbClient.xs: In function 'XS_Filesys__SmbClient__closedir':
SmbClient.xs:177:1: warning: 'closedir' is deprecated (declared at /usr/include/samba-4.0/libsmbclient.h:2924) [-Wdeprecated-declarations]
 RETVAL = context->closedir(context, fd);
 ^
SmbClient.xs: In function 'XS_Filesys__SmbClient__readdir':
SmbClient.xs:209:18: warning: 'readdir' is deprecated (declared at /usr/include/samba-4.0/libsmbclient.h:2925) [-Wdeprecated-declarations]
   dirp = (struct smbc_dirent *)context->readdir(context, fd);
                  ^
SmbClient.xs: In function 'XS_Filesys__SmbClient__stat':
SmbClient.xs:237:3: warning: 'stat' is deprecated (declared at /usr/include/samba-4.0/libsmbclient.h:2917) [-Wdeprecated-declarations]
   i = context->stat(context, fname, &buf);
   ^
SmbClient.xs: In function 'XS_Filesys__SmbClient__fstat':
SmbClient.xs:273:1: warning: 'fstat' is deprecated (declared at /usr/include/samba-4.0/libsmbclient.h:2918) [-Wdeprecated-declarations]
 i = context->fstat(context, fd, &buf);
 ^
SmbClient.xs: In function 'XS_Filesys__SmbClient__rename':
SmbClient.xs:305:1: warning: 'rename' is deprecated (declared at /usr/include/samba-4.0/libsmbclient.h:2915) [-Wdeprecated-declarations]
 RETVAL = context->rename(context, oname, context, nname);
 ^
SmbClient.xs: In function 'XS_Filesys__SmbClient__open':
SmbClient.xs:350:1: warning: 'open' is deprecated (declared at /usr/include/samba-4.0/libsmbclient.h:2910) [-Wdeprecated-declarations]
 RETVAL = context->open(context, fname, flags, mode); 
 ^
SmbClient.xs:361:1: warning: 'lseek' is deprecated (declared at /usr/include/samba-4.0/libsmbclient.h:2916) [-Wdeprecated-declarations]
 } else if (seek_end) { context->lseek(context, RETVAL, 0, SEEK_END); }
 ^
SmbClient.xs: In function 'XS_Filesys__SmbClient__read':
SmbClient.xs:380:3: warning: 'read' is deprecated (declared at /usr/include/samba-4.0/libsmbclient.h:2912) [-Wdeprecated-declarations]
   returnValue = context->read(context, fd, buf, count);
   ^
SmbClient.xs: In function 'XS_Filesys__SmbClient__write':
SmbClient.xs:404:3: warning: 'write' is deprecated (declared at /usr/include/samba-4.0/libsmbclient.h:2913) [-Wdeprecated-declarations]
   RETVAL=context->write(context, fd, buf, count);
   ^
SmbClient.xs: In function 'XS_Filesys__SmbClient__lseek':
SmbClient.xs:430:3: warning: 'lseek' is deprecated (declared at /usr/include/samba-4.0/libsmbclient.h:2916) [-Wdeprecated-declarations]
   RETVAL=context->lseek(context, fd, offset, whence);
   ^
SmbClient.xs: In function 'XS_Filesys__SmbClient__close':
SmbClient.xs:460:17: error: 'SMBCCTX' has no member named 'close'
   RETVAL=context->close(context, fd);
                 ^
SmbClient.xs: In function 'XS_Filesys__SmbClient__unlink':
SmbClient.xs:476:3: warning: 'unlink' is deprecated (declared at /usr/include/samba-4.0/libsmbclient.h:2914) [-Wdeprecated-declarations]
   RETVAL = context->unlink(context, fname);
   ^
make: *** [SmbClient.o] Error 1


Seems there are more problems :/


Looking at SmbClient.xs:460 and /usr/include/samba-4.0/libsmbclient.h,
it looks like close is gone and there's only close_fn left.

*trying to mess around a bit*

Hey, it builds :)


Ok, pushing the changes; since I have no idea if this is ok / if the
module still works, I'd appreciate a review.


Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: The Red Hot Chili Peppers: Road Trippin'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20131103/36529a8a/attachment-0001.sig>


More information about the pkg-perl-maintainers mailing list