C++ Experiences on LinkSys WRT54GL

Place to discuss anything, almost. No politics, religion, Microsoft, or anything else that I (the nazi censor) deem inappropriate.
Post Reply
pbtran
user
user
Posts: 10
Joined: Mon Jan 16, 2006 1:01 am
Location: Silicon Valley, CA, USA
Contact:

C++ Experiences on LinkSys WRT54GL

Post by pbtran »

Hi,

I just got a new WRT54GL router which is just a repackaged WRT54 v4 with "L" for Linux.

I'm trying to run an embedded C++ HTTP daemon similar to the default httpd one included by default but mines supports WebDAV (Web Distributed Authoring and Version) protocol (foot print is ~394 KB stripped).

I was able to compile using the mipsel-linux-g++ compiler, but I'm getting compile errors when using the default mipsel-uclibc-gcc v0.9.19 since there's no C++ STL, such as multimap, vector, etc.

e.g. Comparing C verus C++ Hello World program running on WRT54GL v4.30.1 (running telnetd):

# test1 is a C++ Hello World program
test1: ELF 32-bit LSB MIPS-I executable, MIPS, version 1 (SYSV), for GNU/Linux 2.2.15, dynamically linked, stripped
# test2 is a C Hello World program
test2: ELF 32-bit LSB MIPS-I executable, MIPS, version 1 (SYSV), dynamically linked, stripped

Running it on the WRT54GL v4 via telnet:
# ./test1 (C++ version)
./test1: not found
# ./test2 (C version)
Hello World!


I know that there's a version of uclibc++ tool v0.1.12. Has anyone been able to compile C++ program using uclibc++ and run it on the WRT54G/GL v4 firmware.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

What firmware are you running? OpenWRT? Stock Linksys? I know there are C++ apps compiled for OpenWRT as there are two c++ libraries available:

Code: Select all

root@voidgs:~# ipkg list | grep c++
libstdc++ - 5.0.5 - standard C++ libraries
uclibc++ - 0.1.11-2 - A standard c++ library for embedded systems
It appears that the library you compiled your app against does not exist on your router. What library is your program compiled against (ldd test1)? Which libraries do you have installed? My guess is you would get a pretty quick answer to your question at http://forum.openwrt.org/ (if you are using OpenWRT that is).

pbtran
user
user
Posts: 10
Joined: Mon Jan 16, 2006 1:01 am
Location: Silicon Valley, CA, USA
Contact:

Post by pbtran »

I have HyperWRT + tofu v12 installed and tried to build cross compile with latest version of uclibc++, but was unsuccessful. I did manage to download and build the latest "stable" RC4 release of OpenWRT (aka "white russain").

Is there any sample Makefile for add customized C++ apps?

Thanks,
~Peter
Void Main wrote:What firmware are you running? OpenWRT? Stock Linksys? I know there are C++ apps compiled for OpenWRT as there are two c++ libraries available:

Code: Select all

root@voidgs:~# ipkg list | grep c++
libstdc++ - 5.0.5 - standard C++ libraries
uclibc++ - 0.1.11-2 - A standard c++ library for embedded systems
It appears that the library you compiled your app against does not exist on your router. What library is your program compiled against (ldd test1)? Which libraries do you have installed? My guess is you would get a pretty quick answer to your question at http://forum.openwrt.org/ (if you are using OpenWRT that is).

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

http://wiki.openwrt.org/BuildingPackagesHowTo

I also have to say that you will probably get much better answers on http://forum.openwrt.org/ by people who know a lot more about this stuff than I. I haven't had a lot of time to work on that kind of stuff lately.

pbtran
user
user
Posts: 10
Joined: Mon Jan 16, 2006 1:01 am
Location: Silicon Valley, CA, USA
Contact:

Post by pbtran »

Thanks for the advice, Void Main! I'm lurking on the OpenWRT forum for more info.
Void Main wrote:http://wiki.openwrt.org/BuildingPackagesHowTo

I also have to say that you will probably get much better answers on http://forum.openwrt.org/ by people who know a lot more about this stuff than I. I haven't had a lot of time to work on that kind of stuff lately.

Post Reply