Thanks Rasmus - problem solved here. Your corrections to
ext/snmp/config.m4
worked an should be added to the source (if they have not already).
Though your advise to the original poster, did not help him it cured a
box of mine
where I previously had SNMP functions compiled into a php apache module.
Upgrading the ucd-snmp packages, gave ssl support which php did not like
too much.
system:
php-4.0.2.tar.gz
RedHat-6.2 with some rebuilt src.rpm's from RedHat-7.1:
openssl-perl-0.9.6-3, openssl-0.9.6-3, ucd-snmp-4.2-12,
ucd-snmp-utils-4.2-12
openssl-python-0.9.6-3, ucd-snmp-devel-4.2-12, openssl-devel-0.9.6-3
config.nice - used to locate the error:
#! /bin/sh
#
# Created by configure
"./configure" \
"--with-openssl" \
"--with-snmp" \
"--enable-ucd-snmp-hack" \
"$@"
debug.log - with errors:
CONFIGURE: './configure' '--with-openssl' '--with-snmp'
'--enable-ucd-snmp-hack'
CC: gcc
CFLAGS: -g -O2
CPPFLAGS:
CXX:
CXXFLAGS:
INCLUDES: -I$(top_builddir)/Zend -I$(top_srcdir)
-I/usr/include/freetype
-I/usr/local/src/php-4.0.2/ext/mysql/libmysql
-I/usr/include/ucd-snmp
LDFLAGS:
LIBS: -lsnmp -lttf -lpng -lz -lgd -lresolv -lm -ldl -lcrypt
-lnsl -lresolv
DLIBS:
SAPI: cgi
PHP_RPATHS:
uname -a: Linux localhost.localdomain 2.2.14-5.0 #1 Tue Mar 7
21:07:39 EST 2000 i686 unknown
gcc -o conftest -g -O2 conftest.c -lsnmp -lttf -lpng -lz -lgd
-lresolv -lm -ldl -lcrypt -lnsl -lresolv 1>&5
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libsnmp.so: undefined
reference to `EVP_DigestInit'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libsnmp.so: undefined
reference to `EVP_DigestFinal'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libsnmp.so: undefined
reference to `EVP_md5'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libsnmp.so: undefined
reference to `HMAC'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libsnmp.so: undefined
reference to `EVP_sha1'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libsnmp.so: undefined
reference to `des_cbc_encrypt'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libsnmp.so: undefined
reference to `des_key_sched'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libsnmp.so: undefined
reference to `EVP_DigestUpdate'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libsnmp.so: undefined
reference to `RAND_bytes'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libsnmp.so: undefined
reference to `des_ncbc_encrypt'
collect2: ld returned 1 exit status
BTW:
$ /sbin/ldconfig -p| grep crypto
libk5crypto.so.2 (libc6) => /usr/kerberos/lib/libk5crypto.so.2
libk5crypto.so (libc6) => /usr/kerberos/lib/libk5crypto.so
libcrypto.so.1 (libc6) => /usr/lib/libcrypto.so.1
libcrypto.so (libc6) => /usr/lib/libcrypto.so
and
$ cc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.0)
Adding the + lines to ext/snmp/config.m4 file.
> if test "$ac_cv_header_default_store_h" = "yes"; then
> dnl UCD SNMP 4.1.x
> + AC_CHECK_LIB(crypto, CRYPTO_free, SNMP_LIBS=-lcrypto)
> + LIBS="$LIBS $SNMP_LIBS"
> AC_TRY_RUN([
and running ./buildconf solved the problem, and gave a working php
executable.
Then the full configuration was run like this:
> debug.log && \
> config.cache && \
> config.log && \
rm -f config.cache && \
./configure \
--with-openssl \
--with-snmp \
--enable-ucd-snmp-hack \
--with-apxs \
--with-mysql=/usr/local/mysql \
--with-msql=/usr/local/Hughes \
--with-gd=shared && \
make clean && \
make && \
make install && \
echo SUCCESS
which succeded with an empty debug.log, and apache could now started
cleanly.
Thanks again.
Rasmus Lerdorf wrote:
>
> > I have a PIII 850 box running RH7.1 and have encountered a problem with
> > adding snmp support to php4. I hope that someone has a suggestion as to how
> > to fix this....here are the details:
> >
> >
> > RPMs installed:
> > (I am using the stock rpms from the RH7.1 distro for apache, mysql, and
> > ucd-snmp)
> > apache-1.3.19-5 (and it's devel rpm)
> > mysql-3.23.36-1 (and it's devel rpm, server and client rpms)
> > ucd-snmp-4.2-12 (and it's devel and utils rpms)
> >
> >
> > PHP compiles fine, but apache won't startup due to a symbol error:
> >
> > Cannot load libphp4.so into server: /usr/lib/libsnmp-0.4.2.so: undefined
> > symbol: EVP_DigestInit
>
> Try editing your ext/snmp/config.m4 file. Add the two lines indicated by
> + here:
>
> if test "$ac_cv_header_default_store_h" = "yes"; then
> dnl UCD SNMP 4.1.x
> + AC_CHECK_LIB(crypto, CRYPTO_free, SNMP_LIBS=-lcrypto)
> + LIBS="$LIBS $SNMP_LIBS"
> AC_TRY_RUN([
>
> Then run ./buildconf and try again and let me know if it fixes it. Looks
> to me like the TRY_RUN is attempted without -lcrypto being added which is
> going to make that check for OPENSSL fail. Don't quite see how this could
> ever have worked unless some other extension is adding -lcrypto.
--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]