OpenWrt Forum Archive

Topic: compile error : snmp v3 with openssl missing libcrypto.so.1.0.0

The content of this topic has been archived on 27 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Dear all, when i tried to compile the trunk source code with snmp v3 support.I got the messages:
----------------------------------------------------------------------------------------------------------------------------------------------------------
make[5]: Leaving directory `/media/srv32-home/home/fc/openwrt/build_dir/target-mips_r2_uClibc-0.9.33.2/net-snmp-5.4.2.1/apps'
make[4]: Leaving directory `/media/srv32-home/home/fc/openwrt/build_dir/target-mips_r2_uClibc-0.9.33.2/net-snmp-5.4.2.1'
touch /media/srv32-home/home/fc/openwrt/build_dir/target-mips_r2_uClibc-0.9.33.2/net-snmp-5.4.2.1/.built
mkdir -p /media/srv32-home/home/fc/openwrt/bin/ar71xx/packages /media/srv32-home/home/fc/openwrt/build_dir/target-mips_r2_uClibc-0.9.33.2/net-snmp-5.4.2.1/ipkg-ar71xx/libnetsnmp/CONTROL /media/srv32-home/home/fc/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo
install -d -m0755 /media/srv32-home/home/fc/openwrt/build_dir/target-mips_r2_uClibc-0.9.33.2/net-snmp-5.4.2.1/ipkg-ar71xx/libnetsnmp/usr/lib
cp -fpR /media/srv32-home/home/fc/openwrt/build_dir/target-mips_r2_uClibc-0.9.33.2/net-snmp-5.4.2.1/ipkg-install/usr/lib/libnetsnmp{,agent,helpers,mibs}.so.* /media/srv32-home/home/fc/openwrt/build_dir/target-mips_r2_uClibc-0.9.33.2/net-snmp-5.4.2.1/ipkg-ar71xx/libnetsnmp/usr/lib/
find /media/srv32-home/home/fc/openwrt/build_dir/target-mips_r2_uClibc-0.9.33.2/net-snmp-5.4.2.1/ipkg-ar71xx/libnetsnmp -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf

Package libnetsnmp is missing dependencies for the following libraries:
libcrypto.so.1.0.0

------------------------------------------------------------------------------------------------------------------------------------------------------------

when i search the file libcrypt.so.1.0.0,i got:
--------------------------------------------------------
fc@srv64:~/fc/openwrt$ find -name libcrypto.so.1.0.0
./staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib/libcrypto.so.1.0.0
./build_dir/target-mips_r2_uClibc-0.9.33.2/root-ar71xx/usr/lib/libcrypto.so.1.0.0
./build_dir/target-mips_r2_uClibc-0.9.33.2/openssl-1.0.0e/ipkg-ar71xx/libopenssl/usr/lib/libcrypto.so.1.0.0
./build_dir/target-mips_r2_uClibc-0.9.33.2/openssl-1.0.0e/libcrypto.so.1.0.0
./build_dir/target-mips_r2_uClibc-0.9.33.2/openssl-1.0.0e/ipkg-install/usr/lib/libcrypto.so.1.0.0
-------------------------------------------------------------------------------------------------------------------------------------------------------------

part of  snmp compile  configure:
---------------------------------------------------------
CONFIGURE_ARGS += \
    --enable-mfd-rewrites \
    --enable-shared \
    --enable-static \
    --with-endianness=$(if $(CONFIG_BIG_ENDIAN),big,little) \
    --with-logfile=/var/log/snmpd.log \
    --with-persistent-directory=/usr/lib/snmp/ \
    --with-default-snmp-version=3 \
    --with-sys-contact=root@localhost \
    --with-sys-location=Unknown \
    --enable-applications \
    --disable-debugging \
    --disable-manuals \
    --disable-mibs \
    --disable-scripts \
    --with-out-mib-modules="$(SNMP_MIB_MODULES_EXCLUDED)" \
    --with-mib-modules="$(SNMP_MIB_MODULES_INCLUDED)" \
    --with-out-transports="$(SNMP_TRANSPORTS_EXCLUDED)" \
    --with-transports="$(SNMP_TRANSPORTS_INCLUDED)" \
    --without-libwrap \
    --without-rpm \
    --without-zlib \
     $(call autoconf_bool,CONFIG_IPV6,ipv6) \

    #--without-openssl \
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Any help is appreciated.Thanks.
:)

ps: make clean or make package/clean does not help.

Edit Makefile:

1. Add to package libnetsnmp depending libopenssl:

define Package/libnetsnmp
$(call Package/net-snmp/Default)
  SECTION:=libs
  CATEGORY:=Libraries
  DEPENDS:=+libelf +libopenssl
  TITLE:=Open source SNMP implementation (libraries)
endef

2. Add to package snmpd-static depending libopenssl:

define Package/snmpd-static
$(call Package/net-snmp/Default)
  TITLE:=Open source SNMP implementation (daemon)
  DEPENDS:=+libelf +libopenssl
endef

3. Use --with-openssl=internal:

CONFIGURE_ARGS += \
    --enable-mfd-rewrites \
    --enable-shared \
    --enable-static \
    --with-endianness=$(if $(CONFIG_BIG_ENDIAN),big,little) \
    --with-logfile=/var/log/snmpd.log \
    --with-persistent-directory=/usr/lib/snmp/ \
    --with-default-snmp-version=3 \
    --with-sys-contact=root@localhost \
    --with-sys-location=Unknown \
    --enable-applications \
    --disable-debugging \
    --disable-manuals \
    --disable-mibs \
    --disable-scripts \
    --with-out-mib-modules="$(SNMP_MIB_MODULES_EXCLUDED)" \
    --with-mib-modules="$(SNMP_MIB_MODULES_INCLUDED)" \
    --with-out-transports="$(SNMP_TRANSPORTS_EXCLUDED)" \
    --with-transports="$(SNMP_TRANSPORTS_INCLUDED)" \
    --with-openssl=internal \
    --without-libwrap \
    --without-rpm \
    --without-zlib \
     $(call autoconf_bool,CONFIG_IPV6,ipv6) \

(Last edited by NDR221 on 17 Jan 2014, 09:54)

The discussion might have continued from here.