bubbafix / openwrt-bm1707

packages for openwrt to work with BM1707 device (yet another 1-wire sensor)
8 stars 3 forks source link

Missing dependancy on libusb-compat? #1

Closed g1itch closed 8 years ago

g1itch commented 10 years ago

I've being able to build bmtemp only after adding libusb-compat to DEPENDS and PKG_BUILD_DEPENDS. Without it I get an error:

Package bmtemp is missing dependencies for the following libraries:
libusb-0.1.so.4

Since libusb-compat selects libusb, I propose this changes:

diff --git a/package/bmtemp/Makefile b/package/bmtemp/Makefile
index c720c9f..a22cb3f 100644
--- a/package/bmtemp/Makefile
+++ b/package/bmtemp/Makefile
@@ -24,7 +24,7 @@ PKG_RELEASE:=2
 # The root build directory, $(BUILD_DIR), is by default the build_mipsel
 # directory in your OpenWrt SDK directory
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
-PKG_BUILD_DEPENDS:=libusb libstdcpp
+PKG_BUILD_DEPENDS:=libusb-compat libstdcpp

 include $(INCLUDE_DIR)/package.mk

@@ -32,7 +32,7 @@ include $(INCLUDE_DIR)/package.mk
 # The variables defined here should be self explanatory.
 define Package/bmtemp
        SECTION:=utils
-       DEPENDS:=+libusb +libstdcpp
+       DEPENDS:=+libusb-compat +libstdcpp
        CATEGORY:=Utilities
        TITLE:=bmtemp -- USB thermometer BM1707 utility
 endef
bubbafix commented 10 years ago

Hi. Thank you for your feedback. Looks like It makes sence. What architecture were you building for? But simply applying this diff - it failed compile attitude_adjustment release under ar71xx and i386, but succeeded for backfire under brcm-2.4

Package bmtemp is missing dependencies for the following libraries: libusb-0.1.so.4

bubbafix commented 10 years ago

http://article.gmane.org/gmane.comp.lib.libusb.devel.general/5444 says: "Existing libusb-0.1 applications do not have to be modified, and do not even have to be rebuilt. You just replace the libusb-0.1 library with libusb-compat-0.1."

So I suppose to build it with libusb dependency. And after that replace lib if needed. Maybe I don't see the whole picture.

g1itch commented 10 years ago

Hi. I've built trunk and attitude_adjustment for ar71xx. OpenWRT seems to have only libusb-1.0 (not 0.1) starting from Attitude Adjustment and support for 0.1 API can be obtained with libusb-compat. I asked about libusb-0.1 in ticket for libusb-compat. I think if they will add PROVIDES:=+libusb-0.1 you will being able to be compatible with Backfire and Attitude Adjustment. In that case I think you should write DEPENDS:=+libusb-0.1

bubbafix commented 8 years ago

Hi. Made a change to Makefile as you proposed a long time ago. For 10.03.1 and 12.09 versions I've made a separate branch. I've left libusb dependency there. For later versions there is libusb-compat dependency now on master branch. I've made a quick check on SDK for all above. Now I suppose to close the issue. Thank you for your contribution.