[Box Backup] embedded

dm boxbackup@fluffy.co.uk
Fri, 03 Jun 2005 13:00:43 -0500


Ben Summers wrote:

>
> On 3 Jun 2005, at 06:16, dm wrote:
>
>> Ben Summers wrote:
>>
>>
>>>
>>> On 2 Jun 2005, at 06:42, dm wrote:
>>>
>>>
>>>> Maybe I'm masochistic or something, but before I go treading  into  
>>>> unknown territory, I was just wondering if anyone has  looked at  
>>>> getting a server up and running on any sort of  embedded device.   
>>>> Specifically I'm looking at the linksys nslu2  nas with the custom  
>>>> unslung firmware(http://www.nslu2- linux.org).  They have a pretty  
>>>> decent howto document on  implementing packages into unslung, but 
>>>> I  know very little of  these programming languages(I'm more of a 
>>>> perl/ shell monkey).
>>>>
>>>
>>> As a first go, have you tried compiling it natively?
>>>
>>>    http://www.nslu2-linux.org/wiki/HowTo/ 
>>> NativelyCompileUnslungPackages
>>>
>>> You're right, it is an interesting prospect to produce a tiny  
>>> backup  appliance. The server doesn't actually need much in the  way 
>>> of CPU,  as the client does the really hard work. Your graphs  don't 
>>> indicate a  huge amount of work, a reasonable embedded  processor 
>>> will be fine.
>>>
>>> Ben
>>>
>>
>> Finally got some time to mess with this thing...  Since this isn't  
>> the standard configure script most packages use, I'm skipping the  
>> packaging section for now and going straight to compiling.
>> Natively compiling, so far I've tried configure with no options,  and 
>> I've tried specifying the lib and include folders explicitly.   If 
>> all else fails, I might get to learn a bit about cross compiling. 
>> (I've read/heard that it can be quite painful the first time)  =)
>>
>> libstdc++.so.5 exists as a link in /opt/lib/
>> lrwxrwxrwx  1 root root      18 Jun  2 07:50 /opt/lib/libstdc++.so - 
>> > libstdc++.so.5.0.7
>> lrwxrwxrwx  1 root root      18 Jun  2 07:50 /opt/lib/libstdc++.so. 5 
>> -> libstdc++.so.5.0.7
>> -rw-r--r--  1 root root 4569715 May 25 12:18 /opt/lib/libstdc++.so. 
>> 5.0.7
>>
>> Any hints for the output below would be helpful.
>>
>> -bash-2.05b$ ./configure compile:-I/opt/include link:-L/opt/lib
>> Box build environment setup.
>>
>> Checking environment...
>> Compiler 1: yes
>> Compiler 2:./envtest: error while loading shared libraries: libstdc+ 
>> +.so.5: cannot open shared object file: No such file or directory
>
>
> Is /opt/lib in LD_LIBRARY_PATH ?
>
> Ben

That did the trick..  I can compile now(egads, its going to take a while 
to compile natively), but it still isn't detecting curses/ncurses, 
readline, or db.

I had to modify infrastructure/makebuildenv.pl
change Line 141 from:
open H_FILES,"find /usr/include |" or die "Can't open find";
to
open H_FILES,"find /opt/include |" or die "Can't open find";

How much of an effect would running without db actually have anyway?   
When I go to attempt cross compiling and packaging this, fewer 
dependencies would probably be better if the performance isn't affected 
too much.

Heres the installed packages I have installed probably related to the 
errors.  When I get some time, I'll dig in a little more to see if I can 
figure out what is actually going on with this one.
ncurses - 5.4-3 - NCurses libraries
readline - 5.0-2 - The GNU Readline library
libdb - 4.2.52-3 - Berkeley DB Libraries  (is this the same as db?)

[splurge@NAS boxbackup-0.09]$ ./configure compile:-I/opt/include 
link:-L/opt/lib
Box build environment setup.

Checking environment...
Compiler 1: yes
Compiler 2: yes
OpenSSL 1: yes
OpenSSL 2: yes
curses: no
ncurses: no
Linux LFS support: yes
Check readline from /opt/include/readline/readline.h...
Finished checking headers
---------------------
WARNING: readline isn't installed
---------------------
---------------------
WARNING: db is not installed -- will run in reduced efficiency mode 
without it.
---------------------
done