Building uMurmur for OpenWRT

400 views
Skip to first unread message

Christopher Lee

unread,
Jun 16, 2013, 11:57:20 PM6/16/13
to umurmur...@googlegroups.com
I have been using DD-WRT on my Linksys E3200 with uMurmur 0.2.10 with PolarSSL and it has been working great save for the known bugs in that version. I installed this with the pre-compiled IPK available on the OpenWRT repository. Since that is still the newest package available I have been trying to cross-compile it. I barely know Linux and am virtually useless when it comes to compiling. I have been trying for 2 weeks now and am unable to. I always seem to end up with an i686-GNU-PC executable which of course is useless on my router.

My real question here is: Would someone please post instructions to creating a cross-compile environment and proper usage? I've tried to follow a few tutorials but always end up with the PC executable. A Youtube tutorial would be amazingly helpful. If no one wants to do this, an even greater help to me would be if someone would just compile the package for me and share it somewhere.
My packages come from the brcm47xx trunk of OpenWRT.

Help with this would be greatly appreciated as I've never felt this useless at anything on a computer.

Martin Johansson

unread,
Jun 20, 2013, 1:27:24 PM6/20/13
to Christopher Lee, umurmur-general
I plan to send a patch to OpenWRT to update the package to 0.2.11 some time next week if not someone else beats me to it. Once it is applied you can get the ipk from the 'snapshots' subdir which is nightly builds of trunk.



2013/6/17 Christopher Lee <cro...@gmail.com>

--
Det här meddelandet skickas till dig eftersom du prenumererar på gruppen umurmur-general i Google Groups.
Om du vill sluta prenumerera på den här gruppen och inte längre få någon e-post från den skickar du ett e-postmeddelande till umurmur-gener...@googlegroups.com.
Om du vill göra ett inlägg i den här gruppen skickar du e-post till umurmur...@googlegroups.com.
Besök gruppen på http://groups.google.com/group/umurmur-general.
Fler alternativ finns på https://groups.google.com/groups/opt_out.
 
 

Christopher Lee

unread,
Jun 21, 2013, 1:16:27 AM6/21/13
to umurmur...@googlegroups.com, Christopher Lee
Just a curious question here. Since the current version is 0.2.13 and that is the one that Opus works in; Is there a certain reason you can't patch it to 0.2.13?

Martin Johansson

unread,
Jun 21, 2013, 3:44:28 AM6/21/13
to Christopher Lee, umurmur-general

That's just me being tired. 0.2.13 is correct.

Christopher Lee

unread,
Jun 21, 2013, 3:49:53 AM6/21/13
to umurmur...@googlegroups.com, Christopher Lee
LOL I thought so. I just wanted to make sure. If I should succeed at compiling this before you send the patch, all I need is to overwrite the old executable on the router and it should run just like before correct?

Martin Johansson

unread,
Jun 21, 2013, 4:04:12 PM6/21/13
to Christopher Lee, umurmur-general
Just replace it, but make sure you build it against the library versions that is installed on the router.


2013/6/21 Christopher Lee <cro...@gmail.com>

Christopher Lee

unread,
Jun 22, 2013, 5:59:02 AM6/22/13
to umurmur...@googlegroups.com
OK, so I got cross compiling to work finally. I wasn't using the correct paths for my environment variables. However, I am now getting the error with Protobuf-c being missing. I tried the --disable-protoc flag but it says it's an unrecognized command. What should I do?

Christopher Lee

unread,
Jun 22, 2013, 3:18:45 PM6/22/13
to umurmur...@googlegroups.com
New development. I figured out the disable switch was meant for compiling protobuf-c so I got the source and cross-compiled it. I copied the /google folder into the /include folder of my toolchain. I am now getting this error:
checking for protobuf_c_data_buffer_init in -lprotobuf-c... no
configure: error: could not find protobuf-c library

I'm pretty sure that I need to move the protobuf-c-data-buffer.h file but I'm not sure where to.

Martin Johansson

unread,
Jun 22, 2013, 4:54:53 PM6/22/13
to Christopher Lee, umurmur-general
That's a linking error. Check your '-L' path.


2013/6/22 Christopher Lee <cro...@gmail.com>
--

Christopher Lee

unread,
Jun 25, 2013, 4:54:22 AM6/25/13
to umurmur...@googlegroups.com, Christopher Lee
Well, I don't know how to set or check the -L path or what it should be for that matter. I've gotten further in this than I thought I would but at this point I'll just wait for you to send the patch. I'm just not familiar enough with Linux for all of this. : (

Martin Johansson

unread,
Jun 25, 2013, 5:04:07 AM6/25/13
to Christopher Lee, umurmur-general
I have sent the patch like a couple of days ago: http://permalink.gmane.org/gmane.comp.embedded.openwrt.devel/19383

To set the flags you'll have to do something like this, paths need to be changed of course:

# CFLAGS='-I/home/martin/proj/polarssl/polarssl-1.2.7/include/ -I/home/martin/proj/protobuf-c-0.15/src/' LDFLAGS='-L/home/martin/proj/polarssl/polarssl-1.2.7/library/ -L/home/martin/proj/protobuf-c-0.14/src/.libs/' ./configure --with-ssl=polarssl



2013/6/25 Christopher Lee <cro...@gmail.com>

Martin Johansson

unread,
Jun 27, 2013, 1:52:45 PM6/27/13
to Christopher Lee, umurmur-general
It does seem to take a while. Patch not applied last time I looked today. I compiled packages for brcm47xx:


2013/6/25 Martin Johansson <mar...@fatbob.nu>

Christopher Lee

unread,
Jun 27, 2013, 8:22:29 PM6/27/13
to umurmur...@googlegroups.com, Christopher Lee
I just want to thank you for all the help. I really appreciate it. I especially thank you for compiling the packages. Hopefully one day someone will post a detailed tutorial of setting up the OpenWRT compile environment and how to use it for people who don't know Linux. As little as I know about Linux it was just way beyond me at this point.

strom...@gmail.com

unread,
Jul 7, 2013, 5:01:48 AM7/7/13
to umurmur...@googlegroups.com
I wanted to ask you if you could compile 0.2.13 polarssl for ar71xx too. I cant find it in openwrt repo (latest 0.2.10 there). Thank you very much

Martin Johansson

unread,
Jul 12, 2013, 5:36:28 AM7/12/13
to strom...@gmail.com, umurmur-general


Den 7 juli 2013 11:01 skrev <strom...@gmail.com>:
I wanted to ask you if you could compile 0.2.13 polarssl for ar71xx too. I cant find it in openwrt repo (latest 0.2.10 there). Thank you very much

--

strom...@gmail.com

unread,
Jul 12, 2013, 2:55:34 PM7/12/13
to umurmur...@googlegroups.com, strom...@gmail.com
THANK YOU !!! working very well on TP-LINK 841nd with gargoyle :-)

Dne pátek, 12. července 2013 11:36:28 UTC+2 fatbob napsal(a):

andreas....@gmail.com

unread,
Dec 11, 2013, 12:33:00 AM12/11/13
to umurmur...@googlegroups.com
I updated my Openwrt build today (r38999) and now I can no longer run 0.2.13, it installs fine but when starting I'm getting following error:

/usr/bin/umurmurd: can't load library 'libpolarssl.so.2' 

0.2.10 still works fine. 0.2.13 worked fine in my old build I dont remember exact which one but was around 3 months old from today.


Thanks in advance!

Martin Johansson

unread,
Dec 11, 2013, 3:30:10 PM12/11/13
to andreas....@gmail.com, umurmur-general
I don't know what is wrong but the DL can't find the polarssl library that 0.2.13 is built against. Check for libpolarssl.so in /usr/lib and what symlinks are there. If libpolarssl.so.2 isn't there try to create a symlink with that name and see if it works.

--

andreas....@gmail.com

unread,
Dec 11, 2013, 5:01:02 PM12/11/13
to umurmur...@googlegroups.com, andreas....@gmail.com
Unfortunately that didn't help.  The error message is gone but server doesn't start. Logread only says "daemon.info uMurmurd[3257]: PID-file: /var/run/umurmurd.pid", so PolarSSL is never initialized.

I'll try build my own package and see if that helps.

andreas....@gmail.com

unread,
Dec 13, 2013, 5:55:46 AM12/13/13
to umurmur...@googlegroups.com, andreas....@gmail.com
Could someone explain howto build newer versions than 0.2.6? Following wiki instructions I managed to compile 0.2.1 (up to 0.2.6 I guess) but since 0.2.7 there is Autotools and I'm not sure how I should proceed. I tried a mix of things with ./configure
but always end up with same error message "*** No rule to make target `package/umurmur-0.2.13/install"

What am I doing wrong?

Thanks a lot in advance

Martin Johansson

unread,
Dec 13, 2013, 4:48:27 PM12/13/13
to Andreas Göransson, umurmur-general
Those instructions on the wiki should probably be updated... 
To build for OpenWRT I checkout the OpenWRT source using Git, then update feeds.conf to also use Git for packages, then checkout packages with 'scripts/feeds update' (or something to that extent). Then 'scripts/feeds install -d m umurmur-polarssl'. Run 'make menuconfig' to set at least platform/arch. Then run 'make' to get the compiler and other tools built (takes time). 
After that I edit the Makefile in feeds/packages/net/umurmur/. Change the version number from 10 to 13 and update the MD5 hash. Run 'md5sum umurmur-0.2.13.tar.gz' to get the correct hash. After that you can (re)build just the package with 'make package/umurmur/compile'. The package ends up in bin/<platform>/packages/

Paths and stuff above taken from memory so they may be incorrect...

andreas....@gmail.com

unread,
Dec 13, 2013, 11:29:43 PM12/13/13
to umurmur...@googlegroups.com, Andreas Göransson
Thank you Martin! I successfully compiled by doing a few workarounds, compile script tried to fetch 0.2.13 source package from http://downloads.openwrt.org/sources/ which wouldn't work so I manually downloaded it and put it into trunk/dl dir.
However I got errors related to patches when compiling polarssl version and I figure it was outdated for 0.2.13 so I simply deleted those.

Sadly polarssl version still returns same error while starting in OpenWRT. Modying symlinks didn't work as I said and re-installing did'nt work either. Openssl works fine though so I'll stick to it I guess!

Now as a final question, how would one compile latest sources from git (ipv4 branch)?

Thanks again, umurmur rocks!

andreas....@gmail.com

unread,
Dec 14, 2013, 2:16:35 AM12/14/13
to umurmur...@googlegroups.com, Andreas Göransson
Update:

Managed to compile latest sources by copying source files directly into target dir in toolchain directory (by first compiling 0.2.13) might not be the most clever way but hey it worked!

Now as a final questions, and my reason for bothering with latest sources was this commit:


Doesn't work however it seems to have no effect, and yes I updated my umurmur.conf by adding silent = true; into my AFK channel.

Thanks in advance,
Andreas

Martin Johansson

unread,
Dec 14, 2013, 4:41:15 PM12/14/13
to Andreas Göransson, umurmur-general
That sucks... Will look into it.

Martin Johansson

unread,
Dec 14, 2013, 4:53:36 PM12/14/13
to Andreas Göransson, umurmur-general
Yep. It doesnt work. Here is the fix (attached).


2013/12/14 Martin Johansson <mar...@fatbob.nu>
silent_fix.diff
Reply all
Reply to author
Forward
0 new messages