On Mit, 2007-12-19 at 11:32 +0900, David Murray wrote:
> > From: Bernd Petrovitsch <bernd@firmix.at>
> >
> > On Die, 2007-12-18 at 11:36 +0900, David Murray wrote:
> > [...]
> >> I was just wondering if anyone here has experience building newer
> >> versions of Olsrd for embedded machines. I am using a distro called
> >
> > Not that I personally tried it recently but set CC to the cross-compiler
> > (and perhaps some other minor tweaks in the various make variables) and
> > it should work out of the box.
> > Since Sven-Ola is regularly building it for an OpenWrt-like distro, he
> > would have mentioned any problems.
> >
> >> How should I go about getting the latest olsrd and olsrd-plugins on an
> >> embedded distro? So far I have virtualised my platform on qemu and
> >
> > Get the source and compile it?
> > If you need/want a package: Depends on the packaging tool.
> >
> >> produced a .deb on that. However the resulting .deb will not install on
> >> the embedded machine (dependency on libc6) [2].

The simplest (and ATM only) explanation for that I have is: The packages
on your build system are not a superset of the ones on the target
system.

> > Which libc do you use?
> > What type of kernel (*BSD, Linux, ucLinux, ...)?
[...]
> Apologies Bernd, I should have been more clear. The embedded machine 

No need to apologize.
Living at work in embedded environments of different flavors (including
ucLinux) just leaves to much possibilities of problems open;-)

> that I am building for is an x86 based machine but it does not have the 
> processing power to compile. To build things for it I have been using a 

I know of people/projects who/which were compiling natively on a <200
MHz MIPS system on NFS mounted filesystems. Not that I would recommend
such a thing to anyone - invest a day or two to get a cross-toolchain
working (download one or build one with cross-tool or pay us to do that
for you;-) ...

> virtualised copy of the distro in qemu .

So no cross-gcc.

> The distro uses a Debian based linux kernel based on etch - 
> 2.6.20-486-voyage. libc version 2.3.6.ds1-13etch2. The strange thing is 

That's GNU-libc AFAIK;-)

> building from source in the virtualised machine is fine. However when I 
> make a .deb (something that is transportable the actual non-virtualised 
> system), when I try to install it there is a dependency for libc to be 
> greater than vers >= 2.6. If I manually remove this dependency from the 

Another strange thing. Where does the "2.6" comes from. libc is
(according to above) 2.3.6. Is that the kernel version? And how does
that relate to the libc version?
I understand your confusion - I'm too confused;-)

I assumed that the installation on the qemu system and the target system
is filsystem-wise a subset of the qemu image and otherwise identical.
That couldn't/shouldn't happen.

Are you really really sure that qemu system is filesystem- and
architecture-wise identical to the target system (especially the glibc)?

> installation requirements in the .deb then it will install fine but 
> will get a segmentation error after a while.

How long is roughly "after a while"?

Segmentation violation is usually a NULL (or an uninitialized or an
overwritten or a freed) pointer access.
If "after a while" is minutes, that it is IMHO most probably not a glibc
(or kernel) incompatibility problem since that should be pretty
immediately visible.
Since I'm not aware of any segmentation violation problems of the above
described nature,  it is IMHO most probably not a olsrd bug.
That leaves IMHO pretty much only subtle library (or kernel)
incompatibilities or differences.

Can you run the seg-faulting olsrd with "strace" and "ltrace" and see
where it breaks (at least the last few lines)?
Perhaps that gives an idea where to investigate.

> I am not sure quite where to go from here. Is there any way to move a 
> compiled olsrd between identical systems without using a package (eg a 
> .deb)?

Simple file copy of olsrd and the used *.so.* for the plugins?

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services




