Hi,
I have followed the instructions at:
http://github.com/eduardok/libsmbclient-php/blob/master/README
and have been able to succesfully "phpize", "configure" and "make".
However, I get errors attempting to "make install". A module
"libsmbclient.so" is created (so I presume that I could complete the
installation by hand). However, it would be good if the issue
affecting "make install" could be resolved. I am on CentOS 5.3. (It
looks like a dynamic shared object is not being built, but attempts
are being made to install it ?)
Below is the output of my build attempt:
# less README
# phpize
# ./configure
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for icc... no
checking whether gcc and cc understand -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/
main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/
php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/20060613-debug
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... yes
checking if zts is enabled... yes
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to
regenerate PHP parsers.
checking for gawk... gawk
checking for libsmbclient support... yes, shared
checking for libsmbclient files in default path... found in /usr
checking for smbc_init in -lsmbclient... yes
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared
libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
# make
make: Warning: File `/root/libsmbclient-php/libsmbclient.c' has
modification time 1.5e+05 s in the future
/bin/sh /root/libsmbclient-php/libtool --mode=compile gcc -I. -I/root/
libsmbclient-php -DPHP_ATOM_INC -I/root/libsmbclient-php/include -I/
root/libsmbclient-php/main -I/root/libsmbclient-php -I/usr/include/php
-I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/
Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/
include/php -DHAVE_CONFIG_H -g -O0 -c /root/libsmbclient-php/
libsmbclient.c -o libsmbclient.lo
mkdir .libs
gcc -I. -I/root/libsmbclient-php -DPHP_ATOM_INC -I/root/libsmbclient-
php/include -I/root/libsmbclient-php/main -I/root/libsmbclient-php -I/
usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/
include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/
lib -I/usr/include/php -DHAVE_CONFIG_H -g -O0 -c /root/libsmbclient-
php/libsmbclient.c -fPIC -DPIC -o .libs/libsmbclient.o
/bin/sh /root/libsmbclient-php/libtool --mode=link gcc -DPHP_ATOM_INC -
I/root/libsmbclient-php/include -I/root/libsmbclient-php/main -I/root/
libsmbclient-php -I/usr/include/php -I/usr/include/php/main -I/usr/
include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/
include/php/ext/date/lib -I/usr/include/php -DHAVE_CONFIG_H -g -O0
-o
libsmbclient.la -export-dynamic -avoid-version -prefer-pic -module -
rpath /root/libsmbclient-php/modules libsmbclient.lo -lsmbclient
gcc -shared .libs/libsmbclient.o -lsmbclient -Wl,-soname -
Wl,libsmbclient.so -o .libs/libsmbclient.so
creating
libsmbclient.la
(cd .libs && rm -f
libsmbclient.la && ln -s ../
libsmbclient.la
libsmbclient.la)
/bin/sh /root/libsmbclient-php/libtool --mode=install cp ./
libsmbclient.la /root/libsmbclient-php/modules
cp ./.libs/libsmbclient.so /root/libsmbclient-php/modules/
libsmbclient.so
cp ./.libs/libsmbclient.lai /root/libsmbclient-php/modules/
libsmbclient.la
PATH="$PATH:/sbin" ldconfig -n /root/libsmbclient-php/modules
----------------------------------------------------------------------
Libraries have been installed in:
/root/libsmbclient-php/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
make: warning: Clock skew detected. Your build may be incomplete.
# make install
make: Warning: File `/root/libsmbclient-php/libsmbclient.c' has
modification time 1.5e+05 s in the future
/bin/sh /root/libsmbclient-php/libtool --mode=compile gcc -I. -I/root/
libsmbclient-php -DPHP_ATOM_INC -I/root/libsmbclient-php/include -I/
root/libsmbclient-php/main -I/root/libsmbclient-php -I/usr/include/php
-I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/
Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/
include/php -DHAVE_CONFIG_H -g -O0 -c /root/libsmbclient-php/
libsmbclient.c -o libsmbclient.lo
gcc -I. -I/root/libsmbclient-php -DPHP_ATOM_INC -I/root/libsmbclient-
php/include -I/root/libsmbclient-php/main -I/root/libsmbclient-php -I/
usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/
include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/
lib -I/usr/include/php -DHAVE_CONFIG_H -g -O0 -c /root/libsmbclient-
php/libsmbclient.c -fPIC -DPIC -o .libs/libsmbclient.o
/bin/sh /root/libsmbclient-php/libtool --mode=link gcc -DPHP_ATOM_INC -
I/root/libsmbclient-php/include -I/root/libsmbclient-php/main -I/root/
libsmbclient-php -I/usr/include/php -I/usr/include/php/main -I/usr/
include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/
include/php/ext/date/lib -I/usr/include/php -DHAVE_CONFIG_H -g -O0
-o
libsmbclient.la -export-dynamic -avoid-version -prefer-pic -module -
rpath /root/libsmbclient-php/modules libsmbclient.lo -lsmbclient
*** Warning: Linking the shared library
libsmbclient.la against the
loadable module
*** libsmbclient.so is not portable!
rm -fr .libs/
libsmbclient.la .libs/libsmbclient.lai .libs/
libsmbclient.so
gcc -shared .libs/libsmbclient.o -Wl,--rpath -Wl,/root/libsmbclient-
php/.libs -Wl,--rpath -Wl,/root/libsmbclient-php/modules /root/
libsmbclient-php/.libs/libsmbclient.so -Wl,-soname -
Wl,libsmbclient.so -o .libs/libsmbclient.so
gcc: /root/libsmbclient-php/.libs/libsmbclient.so: No such file or
directory
make: *** [
libsmbclient.la] Error 1
# find . -name 'libsmbclient.so'
./modules/libsmbclient.so