Subject: | Compile error with Gentoo Linux/samba 3.0.21b |
I get the following compile error when trying to install using "perl
-MCPAN -e shell":
Writing Makefile for Filesys::SmbClient
CPAN: YAML loaded ok
cp SmbClient.pm blib/lib/Filesys/SmbClient.pm
AutoSplitting blib/lib/Filesys/SmbClient.pm
(blib/lib/auto/Filesys/SmbClient)
i686-pc-linux-gnu-gcc -c -I/usr/include -fno-strict-aliasing -pipe
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=pentium4
-DVERSION=\"3.0\" -DXS_VERSION=\"3.0\" -fPIC
"-I/usr/lib/perl5/5.8.7/i686-linux/CORE" libauthSamba.c
/usr/bin/perl5.8.7 /usr/lib/perl5/5.8.7/ExtUtils/xsubpp -typemap
/usr/lib/perl5/5.8.7/ExtUtils/typemap -typemap typemap SmbClient.xs >
SmbClient.xsc && mv SmbClient.xsc SmbClient.c
Running Mkbootstrap for Filesys::SmbClient ()
chmod 644 SmbClient.bs
cp SmbClient.bs blib/arch/auto/Filesys/SmbClient/SmbClient.bs
chmod 644 blib/arch/auto/Filesys/SmbClient/SmbClient.bs
i686-pc-linux-gnu-gcc -c -I/usr/include -fno-strict-aliasing -pipe
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=pentium4
-DVERSION=\"3.0\" -DXS_VERSION=\"3.0\" -fPIC
"-I/usr/lib/perl5/5.8.7/i686-linux/CORE" SmbClient.c
SmbClient.xs: In function `XS_Filesys__SmbClient__close':
SmbClient.xs:439: error: structure has no member named `close'
make: *** [SmbClient.o] Error 1
/usr/bin/make -j3 -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
Failed during this command:
ALIAN/Filesys-SmbClient-3.0.tar.gz : make NO
The very simple fix is change line 439 of SmbClient.xs from:
RETVAL=context->close(context, fd);
to:
RETVAL=context->close_fn(context, fd);
This must be a result of smbclient lib API changing...Once this is
changed, the compile works properly.