Le 05/11/2014 22:43, Guillaume Déflache a écrit :


Fine, but that's not the problem as I said before (see the very 1st
quoted text in this message): *installing protoc at the right location*
(that is .../build_dir/host/bin/protoc IIRC) is the problem.


I checked that with our pre-BB snapshot it was installed where expected
and that with the BB release it is not. You can try executing `make
install` from the host build directory to convince yourself that that
does what is required from the OpenWrt Makefile but currently missing in
BB's. That's what I did and then the problem was gone.

So you have to try using protoc to generate some source code files in
order to really stumble on the problem. Apart from that everything works
fine indeed.

Oh. I admit I overlooked this in your previous message. Thanks.

What about the attached patch ?


By the way, maybe somebody else could enlighten me on this but in BB, it seems that the "host" tools directory is .../staging_dir/host/bin rather than .../build_dir/host/bin .

I have no .../build_dir/host/bin directory on my build tree.

The patch do install protoc in .../staging_dir/host/bin , along with all other programs like bison,...



Since the snapshot we used previously PKG_USE_MIPS16:=0 also got added,
does that mean we should also use that on all packages that compile
Protocol Buffer generated code and/or link with the PB library?

After a second though I think this line was to avoid an assembler error
on some plateform.
I still need to test the current compiler/assembler on a MIPS16 platform,
but for now you can safely leave this line out for your platform.


I currently develop for the ZyXEL NBG6716
(<http://wiki.openwrt.org/toh/zyxel/zyxel_nbg6716>) which is MIPS32
(MIPS74Kc). Would that happen to be backward compatible with yours?


Yes , I'm nearly sure about that.


I would have no objections to 2.6.1 if it also works for us too (I can
test that at the same time).

Yes, please test & report : I would much better push upstream a patch with the newest version of protobuf.


Obinou
diff --git a/libs/protobuf/Makefile b/libs/protobuf/Makefile
index 1553a7e..789fbb1 100644
--- a/libs/protobuf/Makefile
+++ b/libs/protobuf/Makefile
@@ -8,17 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=protobuf
-PKG_VERSION:=2.5.0
+PKG_VERSION:=2.6.1
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://protobuf.googlecode.com/files
-PKG_MD5SUM:=a72001a9067a4c2c4e0e836d0f92ece4
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/$(PKG_VERSION)/
+PKG_MD5SUM:=f3916ce13b7fcb3072a1fa8cf02b2423
 
 PKG_BUILD_DEPENDS:=protobuf/host
-PKG_USE_MIPS16:=0
 
 PKG_INSTALL:=1
+HOST_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/host-build.mk
@@ -33,19 +33,27 @@ define Package/protobuf
 endef
 
 define Package/protobuf/description
- Protocol Buffers are a way of encoding structured data in an efficient
- yet extensible format. Google uses Protocol Buffers for almost all
- of its internal RPC protocols and file formats.
+  From package description:
+  "Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data - think XML, but smaller, faster, and simpler.
+  You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages - Java, C++, or Python." 
 endef
 
 define Host/Compile
 	$(MAKE) -C $(HOST_BUILD_DIR)
 endef
 
+define Host/Prepare
+	$(call Host/Prepare/Default)
+endef
+
+
+
 define Host/Install
+	$(Host/Install/Default)
+	$(MAKE) -C $(HOST_BUILD_DIR) install
 endef
 
-CONFIGURE_ARGS += --with-protoc=$(HOST_BUILD_DIR)/src/protoc
+CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOST)/bin/protoc
 
 define Build/InstallDev
 	$(INSTALL_DIR) \
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to