nx111 / oscam

My working oscam code,update with http://www.streamboard.tv/svn/oscam trunk.
GNU General Public License v3.0
49 stars 52 forks source link

最新源码 openwrt下编译出错 #20

Closed ntlf9t closed 6 years ago

ntlf9t commented 6 years ago

build/x86_64-openwrt-linux-musl-ssl-libusb-pcsc/reader-jet.o: In function jet_e ncrypt': /home/dz/lede4.14/build_dir/target-x86_64_musl/oscam/reader-jet.c:124: undefined reference totwofish' build/x86_64-openwrt-linux-musl-ssl-libusb-pcsc/reader-jet.o: In function jet_c ard_init': /home/dz/lede4.14/build_dir/target-x86_64_musl/oscam/reader-jet.c:298: undefined reference totwofish_setkey' /home/dz/lede4.14/build_dir/target-x86_64_musl/oscam/reader-jet.c:299: undefined reference to twofish_decrypt' /home/dz/lede4.14/build_dir/target-x86_64_musl/oscam/reader-jet.c:322: undefined reference totwofish_decrypt' /home/dz/lede4.14/build_dir/target-x86_64_musl/oscam/reader-jet.c:336: undefined reference to twofish_decrypt' /home/dz/lede4.14/build_dir/target-x86_64_musl/oscam/reader-jet.c:339: undefined reference totwofish_setkey' /home/dz/lede4.14/build_dir/target-x86_64_musl/oscam/reader-jet.c:354: undefined reference to twofish_decrypt' /home/dz/lede4.14/build_dir/target-x86_64_musl/oscam/reader-jet.c:390: undefined reference totwofish_decrypt' /home/dz/lede4.14/build_dir/target-x86_64_musl/oscam/reader-jet.c:424: undefined reference to twofish_decrypt' build/x86_64-openwrt-linux-musl-ssl-libusb-pcsc/reader-jet.o: In functionjet_c ard_info': /home/dz/lede4.14/build_dir/target-x86_64_musl/oscam/reader-jet.c:592: undefined reference to twofish_setkey' /home/dz/lede4.14/build_dir/target-x86_64_musl/oscam/reader-jet.c:598: undefined reference totwofish_decrypt' /home/dz/lede4.14/build_dir/target-x86_64_musl/oscam/reader-jet.c:614: undefined reference to twofish_decrypt' build/x86_64-openwrt-linux-musl-ssl-libusb-pcsc/reader-jet.o: In functionjet_r esync_vendorkey': /home/dz/lede4.14/build_dir/target-x86_64_musl/oscam/reader-jet.c:242: undefined reference to `twofish' collect2: error: ld returned 1 exit status Makefile:432: recipe for target 'Distribution/oscam.debug' failed make[5]: [Distribution/oscam.debug] Error 1 Makefile:401: recipe for target 'all' failed make[4]: [all] Error 2

nx111 commented 6 years ago

请贴出详细编译步骤

ntlf9t commented 6 years ago

include $(TOPDIR)/rules.mk

PKG_NAME:=oscam PKG_VERSION:=11424 PKG_REV:=f55fc25 PKG_RELEASE:=1

PKG_SOURCE_SUBDIR:=$(PKG_NAME) PKG_SOURCE_VERSION:=$(PKG_REV) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/nx111/oscam.git PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

PKG_MAINTAINER:=OSCam developers PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=COPYING

PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0

include $(INCLUDE_DIR)/package.mk

define Package/oscam SECTION:=net CATEGORY:=Network DEPENDS:=+libopenssl +libusb-1.0 +kmod-usb-ohci +kmod-usb-serial +kmod-usb-serial-ch341 +kmod-usb-serial-cp210x +kmod-usb-serial-ftdi +kmod-usb-serial-pl2303 +kmod-usb-uhci +kmod-usb2 +kmod-usb3 +libpcsclite +pcscd +ccid TITLE:=OSCam is an Open Source Conditional Access Module software URL:=http://www.streamboard.tv/oscam/ endef

define Package/oscam/description OSCam is an Open Source Conditional Access Module software, based on the very good MpCS version 0.9d created by ​dukat. endef

define Package/oscam/conffiles /etc/oscam/oscam.conf /etc/oscam/oscam.server /etc/oscam/oscam.user /etc/oscam/SoftCam.Key /etc/oscam/oscam.dvbapi endef

CONFIGURE_CMD = ./config.sh CONFIGURE_ARGS = \ --enable all

MAKE_FLAGS += \ CONF_DIR=/etc/oscam \ OSCAM_BIN=Distribution/oscam \ USE_SSL=1 \ USE_LIBUSB=1 \ USE_PCSC=1 \ USE_LIBCRYPTO=1

define Package/oscam/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/Distribution/oscam $(1)/usr/bin/oscam

$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/oscam.init $(1)/etc/init.d/oscam

$(INSTALL_DIR) $(1)/etc/oscam
$(INSTALL_CONF) ./files/oscam.conf $(1)/etc/oscam
$(INSTALL_CONF) ./files/oscam.server $(1)/etc/oscam
$(INSTALL_CONF) ./files/oscam.user $(1)/etc/oscam
$(INSTALL_CONF) ./files/oscam.dvbapi $(1)/etc/oscam

endef

define Package/$(PKG_NAME)/prerm

!/bin/sh

# if run within buildroot exit
[ -n "$${IPKG_INSTROOT}" ] && exit 0

# stop running scripts
/etc/init.d/oscam disable
/etc/init.d/oscam stop

exit 0

endef

$(eval $(call BuildPackage,oscam))

使用的Makefile 编译环境 Ubuntu 16.04.3 LTS openwrt使用lean的 https://github.com/coolsnowwolf/lede

f55fc25包括之前的编译都未出错,最新的 bb7a5c2编译过程中会报以上错误

nx111 commented 6 years ago

解决冲突时丢失了twofish库依赖。已解决。