SDK Problems

Discuss the technical details of Gargoyle and ongoing development

Moderator: Moderators

Post Reply
pbix
Developer
Posts: 1373
Joined: Fri Aug 21, 2009 5:09 pm

SDK Problems

Post by pbix »

Eric,

I got my Linux box up and followed your instructions on installing the SDK for OpenWRT and making the helloworld sample program.

First I want to thank you for the great job of documenting this process which no doubt saved me countless hours of work.

I found two issues with the Wiki which I will report. First, the Makefile for the sample program compiled and run under Linux did not work for me. I made a more traditional Makefile that I got to work though. Looks like this.

Code: Select all

# build helloworld executable when user executes "make" 

helloworld: helloworld.o
	$(CC) $(LDFLAGS) helloworld.o -o helloworld

helloworld.o: helloworld.c
	$(CC) $(CFLAGS) -c helloworld.c 

# remove object files and executable when user executes "make clean"
clean:
	rm *.o helloworld 
Second thing. The final step to install the package on the router uses ipkg. That is not on my router so I used opkg instead and it seemed to install OK

Finally, my bubble burst when my program did not run and instead returned the following.

Code: Select all

root@OpenWrt:~# helloworld
helloworld: can't resolve symbol '__uClibc_start_main'
I hope you can help me out because I'm bummin.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Eric
Site Admin
Posts: 1443
Joined: Sat Jun 14, 2008 1:14 pm

Re: SDK Problems

Post by Eric »

The issue you note with the makefile is due to a formatting error that got introduced when I converted the documentation to wiki format -- thanks for pointing that out. That should be fixed now.

I also added a note that newer versions of OpenWrt use opkg, not ipkg.

I'm not certain what the cause of your problem is, but I suspect that you built the wrong version of the SDK. Older versions use different versions of uclibc which looks like it might be causing your error. The latest Gargoyle releases are based on Kamikaze 8.09, and you need at least that version to allow binary compatibility with Gargoyle. (That tutorial is ancient -- I wrote it almost two years ago, so there may be some version info that's a bit out of date...) If you downloaded an older version of the source, try building from this source tarball instead.

pbix
Developer
Posts: 1373
Joined: Fri Aug 21, 2009 5:09 pm

Re: SDK Problems

Post by pbix »

Eric,
You guessed correct.

Sorry that I failed to read further down the Wiki were instruction were given on how to build the kamikazi SDK. So now I am waiting out the build which well take mucho time on my rather slow machine.

Thanks again
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

pbix
Developer
Posts: 1373
Joined: Fri Aug 21, 2009 5:09 pm

Re: SDK Problems

Post by pbix »

Ahhh, sweet success. Helloworld is working :D
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Post Reply