Hello,
I am trying to compile havp (HTTP AntiVirus Proxy) on x86 kamikaze with
libclamav. The clamav version is 0.95.3.
in the following Makefile for havp, path
-L/home/vsawant/Documents/projects/routers/openwrtsrc/build_dir/target-i386_uClibc-0.9.30.1/clamav-0.95.3/ipkg-install/usr/lib
is specifying the location of libclamav.so on host sysetm (clamav is
compiled before havp). If I remove this path, the build fails giving error
"Cannot find libclamav.so"
With the above path specified, the build process completes succesfully, but
when I install havp package and run havp on target system (x86 kamikaze), it
gives error "Segmentation fault".
Following are the library dependency for the havp and freshclam (clamav
binary) on target system -
r...@openwrt:/home# ldd havp
libz.so => /usr/lib/libz.so (0xb76ef000)
libclamav.so.6 => /usr/lib/libclamav.so.6 (0xb7633000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb753b000)
libm.so.0 => /lib/libm.so.0 (0xb752c000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7521000)
libc.so.0 => /lib/libc.so.0 (0xb74d4000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb74c1000)
libdl.so.0 => /lib/libdl.so.0 (0xb74bd000)
ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0xb7703000)
r...@openwrt:/home# ldd freshclam
libclamav.so.6 => /usr/lib/libclamav.so.6 (0xb766e000)
libz.so => /usr/lib/libz.so (0xb765c000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7649000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb763e000)
libc.so.0 => /lib/libc.so.0 (0xb75f1000)
libdl.so.0 => /lib/libdl.so.0 (0xb75ed000)
ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0xb772c000)
The freshclam is using the same library and it works correctly, but the havp
doesnt (segmentation fault).
If the lib path -
-L/home/vsawant/Documents/projects/routers/openwrtsrc/build_dir/target-i386_uClibc-0.9.30.1/clamav-0.95.3/ipkg-install/usr/lib
is incorrect, then how to specify path libclamav on host system?
Following is the Makefile for havp:
------------------------------------------------------------------------------------------------------------------------------
include $(TOPDIR)/rules.mk
PKG_NAME:=havp
PKG_VERSION:=0.91
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
TARGET_LDFLAGS+= \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
include $(INCLUDE_DIR)/package.mk
define Package/havp
SECTION:=net
DEPENDS:=+libpthread +uclibcxx +zlib +libclamav
CATEGORY:=Network
TITLE:=havp
URL:=http://www.server-side.de
endef
CONFIGURE_VARS += \
INCLUDES="" \
define Build/Configure
$(call Build/Configure/Default,\
--enable-clamav \
--with-sysconfsubdir=havp \
--with-proxyuser=root \
--with-proxygroup=root \
LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
-L/home/vsawant/Documents/projects/routers/openwrtsrc/build_dir/target-i386_uClibc-0.9.30.1/clamav-0.95.3/ipkg-install/usr/lib
-lz" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
CFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
)
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install
endef
define Package/havp/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/havp $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc
$(CP) $(PKG_INSTALL_DIR)/etc/havp $(1)/etc/
endef
$(eval $(call BuildPackage,havp))
------------------------------------------------------------------------------------------------------------------------------
Thanks,
Vipul
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel