lalithsuresh / odin

Odin: an SDN framework for programmable Enterprise WLANs.
43 stars 46 forks source link

something confused when building odin agent #3

Closed buptmuye closed 10 years ago

buptmuye commented 10 years ago

Lalith Suresh, glad to see the odin project. However, I followed the steps on github to try to build the agent. After build the ovs and click on openwrt, when I type "click-align agent.click | click &", it gave me such error: ''' root@OpenWrt:~# agent.click:45: While initializing 'from_dev :: FromDevice':warning: mon0: no IPv4 address assigned FF:FF:FF:FF:FF:FF

''' Then nothing happened anymore. I still can't figure out why it happens. Can you give me any guide? Thanks in advance.

jiashanzh commented 10 years ago

buptmuye, I also try to set up the odin environment. But , I failed to build OpenvSwitch and click-modular-router together on OpenWRT. And, it seems that you have already finished this step.

Can you give me any guide about how to build OpenvSwitch and Click on OpenWRT(backfire)? And what should I do next?

Thanks in advance.

buptmuye commented 10 years ago

jiashanzh, it was true that I built the backfire10.03.1 with click2.0 and OpenvSwitch together, but the AP didn't work well after the firmware was installed on the WRT54GS or other physical APs. For example, the OVS couldn't connect to POX, or the click didn't work well. However, I still don't know how to fix it. Now I think there must be somthing wrong with the building process. Here is my suggestion: 1.build ovs : https://github.com/schuza/openvswitch 2.build click: remove everything in feeds/packages/net/click/ , and put click(https://github.com/lalithsuresh/odin) there instead, renaming as src/, then create the Makefile in feeds/packages/net/click/ like this:

include $(TOPDIR)/rules.mk

PKG_NAME:=click PKG_RELEASE:=2.1.0

include $(INCLUDE_DIR)/package.mk

define Package/click SECTION:=net CATEGORY:=Network MENU:=1 TITLE:=The Click Modular Router URL:=http://www.read.cs.ucla.edu/click/ endef

define Package/click/description The Click Modular Router endef

BUILDOPTS = \ BUILD_CXX="g++ -I $(PKG_BUILD_DIR)/include-host" \ BUILD_DL_LIBS="-ldl"

define Build/Prepare mkdir -p $(PKG_BUILD_DIR) $(CP) ./src/* $(PKG_BUILD_DIR)/ endef

define Build/Configure (cd $(PKG_BUILD_DIR); \ rm -rf config.{cache,status} ; \ CONFIG_SITE= \ ./configure; \ rm -rf include-host; \ $(CP) include include-host; \ rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CXXFLAGS="-static -Os -MD" \ CFLAGS="-static -MD" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ $(BUILDOPTS) \ ./configure \ --prefix=/usr \ --target=$(GNU_TARGET_NAME) \ --host=$(GNU_TARGET_NAME) \ --build=$(GNU_HOST_NAME) \ --enable-wifi \ --disable-linuxmodule \ --enable-tools=mixed \ --disable-dynamic-linking \ --enable-local \ --enable-userlevel \ ) endef

define Build/Compile rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(CONF_OPTS) \ $(MAKE) -C $(PKG_BUILD_DIR) \ $(BUILDOPTS) \ install endef

define Package/click/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/userlevel/click $(1)/usr/bin/click $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/click-align/click-align $(1)/usr/bin/click-align mkdir -p $(1)/usr/share/click $(CP) $(PKG_BUILD_DIR)/elementmap.xml $(1)/usr/share/click endef

$(eval $(call BuildPackage,click))

finally, run make menuconfig , make -j 3 , and you will get the firmware. But the OVS may not work well. If it goes well on yours, please inform me :D

2014-07-01 14:58 GMT+08:00 jiashanzh notifications@github.com:

buptmuye, I also try to set up the odin environment. But , I failed to build OpenvSwitch and click-modular-router together on OpenWRT. And, it seems that you have already finished this step.

Can you give me any guide about how to build OpenvSwitch and Click on OpenWRT(backfire)? And what should I do next?

Thanks in advance.

— Reply to this email directly or view it on GitHub https://github.com/lalithsuresh/odin/issues/3#issuecomment-47623013.

lalithsuresh commented 10 years ago

@buptmuye: The message you got is not an error (and is expected to appear). Everything should work from that point.

lalithsuresh commented 10 years ago

@buptmuye and thanks for the writeup on the build. If you'd like to send a patch to the README or as separate build instructions, I'd be happy to accept it.

jiashanzh commented 10 years ago

@buptmuye buptmuye, thank you for your guide on how to build OpenvSwitch and Click on OpenWRT(backfire). And, I have already sucessfully built the OpenvSwitch on OpenWRT(backfire). But, when I built Click on OpenWRT(backfire), it gave me such error:

../lib/libclicktool_build.a(timestamp.bo): In function Timestamp::assign_now(bool) [clone .isra.3] [clone .constprop.10]': timestamp.cc:(.text+0x10): undefined reference toclock_gettime' ../lib/libclicktool_build.a(glue.bo): In function click_random_srandom()': glue.cc:(.text+0x1ab): undefined reference toclock_gettime' collect2: ld returned 1 exit status make[5]: * [click-mkmindriver] Error 1 make[5]: Leaving directory `/home/openr/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/click/tools/click-mkmindriver' make[4]: * [install-subdirs] Error 1 make[4]: Leaving directory/home/openr/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/click/tools' make[3]: **\* [install-tools] Error 2 make[3]: Leaving directory/home/openr/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/click' make[2]: [/home/openr/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/click/.built] Error 2 make[2]: Leaving directory`/home/openr/backfire/feeds/packages/net/click' make[1]: \ [package/feeds/packages/click/compile] Error 2

I still can't figure out how to solve this error? Have you ever encountered a similar error? Can you give me any guide? Thanks in advance.

buptmuye commented 10 years ago

the newest click should be used. Try this " CXXFLAGS="-Wl,-Bdynamic -lgcc_s -static -Os -MD" \". If you build the openwrt and work fine with AP, please let me know:D

2014-07-16 23:07 GMT+08:00 jiashanzh notifications@github.com:

@buptmuye https://github.com/buptmuye buptmuye, thank you for your guide on how to build OpenvSwitch and Click on OpenWRT(backfire). And, I have already sucessfully built the OpenvSwitch on OpenWRT(backfire). But, when I built Click on OpenWRT(backfire), it gave me such error:

../lib/libclicktool_build.a(timestamp.bo): In function Timestamp::assign_now(bool) [clone .isra.3] [clone .constprop.10]': timestamp.cc:(.text+0x10): undefined reference toclock_gettime' ../lib/libclicktool_build.a(glue.bo): In function click_random_srandom()': glue.cc:(.text+0x1ab): undefined reference toclock_gettime' collect2: ld returned 1 exit status make[5]: * [click-mkmindriver] Error 1 make[5]: Leaving directory /home/openr/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/click/tools/click-mkmindriver' make[4]: * [install-subdirs] Error 1 make[4]: Leaving directory /home/openr/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/click/tools' make[3]: * [install-tools] Error 2 make[3]: Leaving directory /home/openr/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/click' make[2]: * [/home/openr/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/click/.built] Error 2 make[2]: Leaving directory/home/openr/backfire/feeds/packages/net/click' make[1]: *\ [package/feeds/packages/click/compile] Error 2

I still can't figure out how to solve this error? Have you ever encountered a similar error? Can you give me any guide? Thanks in advance.

— Reply to this email directly or view it on GitHub https://github.com/lalithsuresh/odin/issues/3#issuecomment-49179321.

jiashanzh commented 10 years ago

@buptmuye buptmuye, I try to modify CXXFLAGS in Makefile as you said. But it still give me the same errors. My click-modular-router URL is http://www.read.cs.ucla.edu/click/click-2.0.1.tar.gz . The OS of my PC is Ubuntu 12.04 .