{DealExtreme NAS} Compiling applications for Snake OS

273 views
Skip to first unread message

Ryotsuke Hibiki

unread,
May 25, 2010, 4:41:25 AM5/25/10
to DealExtreme NAS
How do I compile something that could be ran on Snake OS from external
HDD, for example?

0. Do you have any links where that question is discussed?
1. What environment should I need if I want to compile sources in
Windows? There is no 'make' command in Snake OS 1.1.0 SSH environment
currently and I don't have Linux.
2. For example, how do I perform Samba compilation (http://
en.wikibooks.org/wiki/Samba/Compiling_Samba_from_Source)

--
You received this message because you are subscribed to the Google
Groups "DealExtreme NAS" group.
To post to this group, send email to dealextr...@googlegroups.com
To unsubscribe from this group, send email to
dealextreme-na...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/dealextreme-nas-?hl=en

Ricardo Gomes da Silva

unread,
May 25, 2010, 6:50:27 AM5/25/10
to dealextr...@googlegroups.com
Ryotsuke,

as far as I know:

0. No, but I cross-compiled Lighttpd, so you may wanna take a look on that page (http://groups.google.com/group/dealextreme-nas-/web/lighttpd-installation).

1. You'll need a Linux enviroment with compilers and stuff like that and also you'll need Snake OS SDK installed. Then you'll need to "adjust" your software to compile on it (in my case I just need to add a --host on ./configure).

2. I don't know if it's possible to compiled Samba, but I guess it is. Post your results!

Also, about question 1, yes, there's no make inside Snake OS... for two reasons, I guess: first, there's no space on flash. The second reason is because it's damn slow :P You probably want to cross-compile (compile on one system porting the binaries to another) it, since it's faster and it's easier to fix something missing. I guess you can also compile inside the Snake OS (but I didn't try) using a chrooted enviroment (http://code.google.com/p/snake-os/wiki/Debian_Chroot), installing the correct packages on it - but it'll be very slow, since even apt-get is slow inside a chroot enviroment.


Good luck!

Ricardo

Fernando Galindo

unread,
May 25, 2010, 4:43:39 AM5/25/10
to dealextr...@googlegroups.com
Hi,

You have some information about cross-compilation here:

"Q: Compile. Hey guys it is great, How can I make my own one?"

http://code.google.com/p/snake-os/wiki/FAQ
--
1166914855
-------

adam jvok

unread,
May 25, 2010, 9:17:32 AM5/25/10
to dealextr...@googlegroups.com

Fernando Galindo

unread,
May 25, 2010, 9:26:06 AM5/25/10
to dealextr...@googlegroups.com
Hi Adam,

I follow your recipe about mysql cross-compilation.. It works like a
charm when i connect from localhost, but if i try to connect from
other PC it is very slow.. do you know if this is a configuration
problem? maybe some parameter from my.cnf.. ¿?

I want to try apache too, did you test php support?

thx.

adam jvok

unread,
May 25, 2010, 9:45:14 AM5/25/10
to dealextr...@googlegroups.com
I'm pleased my post helped someone.

I did these compilations just for the fun of it and no longer have them on my system.
But I did try access mysql from both snake & a remove PC. Both worked fine.

1. What command are you using to connect? Tell me all the parameters.
2. Show me your my.cnf.
3. It could be some network issue between you client and snake
- what platform is the client running?
- what is on your network between the client and snake? (a router, I guess)
4. I it slow for you to access other services on snake?

No, I did not try php.

To be honest, after playing with this I came to the conclusion that it was all a lot of effort for little gain.
Since then, there have been lots of posts on chrooting debian & downloading packages - that seems like an easier option than cross compiling stuff.
Also, be wary of overloading the poor little snake box.
I didn't note it at the time, but I bet with Apache and MySQL running there was not a lot of ram/swap left to play with.

Ryotsuke Hibiki

unread,
May 25, 2010, 10:01:50 AM5/25/10
to DealExtreme NAS

I've used VirtualBoxed Ubuntu 9.04 machine,

1. downloaded snake-os-sdk_0.9.tar.bz2 & samba-3.5.3.tar.gz
2. unpacked to /var/www/snakes/snake-os-sdk & /var/www/snakes/samba
3. executed
export PATH=$PATH:/var/www/snakes/snake-os-sdk/arm-uclibc-3.4.6/bin
# export LD_LIBRARY_PATH=/var/www/snakes/snake-os-sdk/arm-uclibc-3.4.6/
lib
# export LDFLAGS=-L/var/www/snakes/snake-os-sdk/arm-uclibc-3.4.6/lib
# export CPPFLAGS=-I/var/www/snakes/snake-os-sdk/arm-uclibc-3.4.6/
include
# export CC=/var/www/snakes/snake-os-sdk/arm-uclibc-3.4.6/arm-linux-
gcc

Actually i was guessing the paths, as they are not documented and I'm
too nube in linux

4. cd /var/www/snakes/samba/source3
5. ./configure --host arm-linux --prefix=/var/www/snakes/smb

I've got a warning "If you wnated to set the --build type, don't use --
host. if cross compiler is detected then cross compile will be used.'
And an error "error while loading shared libraries: /var/www/snakes/
snake-os-sdk/arm-uclibc-3.4.6/lib/libpthread.so.0: ELF file OS ABI
invalid"
And one more "configure: error: working directory cannot be
determined"

Could you please help of what I can try next?
On May 25, 1:50 pm, Ricardo Gomes da Silva <cado...@gmail.com> wrote:
> Ryotsuke,
>
> as far as I know:
>
> 0. No, but I cross-compiled Lighttpd, so you may wanna take a look on that
> page (http://groups.google.com/group/dealextreme-nas-/web/lighttpd-installa...).
>
> 1. You'll need a Linux enviroment with compilers and stuff like that and
> also you'll need Snake OS SDK installed. Then you'll need to "adjust" your
> software to compile on it (in my case I just need to add a --host on
> ./configure).
>

Fernando Galindo

unread,
May 25, 2010, 10:10:00 AM5/25/10
to dealextr...@googlegroups.com
Hi Adam,

1. i try to connect from mysql command line client, libmysqlclient and
mysql php functions.. all with the same results..
2. when i back home i will take a look to my.cnf
3. linux box, adsl router
4. no

i'm not sure, but i think it could be a dns problem (skip-name-resolve)

thx
Reply all
Reply to author
Forward
0 new messages