[GRASS5] Script to build babyGRASS for handhelds
Markus Neteler
neteler at itc.it
Thu May 2 12:12:06 EDT 2002
On Tue, Apr 30, 2002 at 06:56:10PM +0100, Glynn Clements wrote:
>
> Markus Neteler wrote:
>
> > meanwhile the precompiled iPAQ binaries are installed.
> > Unfortunately we face a segmentation fault everywhere.
> > E.g. the Init.sh calls $ETC/set_data:
> >
> > strace /tmp/dist.armv4l-unknown-linux-gnu/etc/set_data
> > [...]
> > open("/tmp/dist.armv4l-unknown-linux-gnu/lib/libgrass_datetime.so",
> > O_RDONLY) =
> > 3
> > read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\210\33\0"..., 1024) =
> > 1024
> > SYS_197(0x3, 0xbfffef9c, 0xbfffef9c, 0x664, 0x3) = 0
> > mmap(0, 59820, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x402c3000
> > mprotect(0x402ca000, 31148, PROT_NONE) = 0
> > mmap(0x402cb000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0) =
> > 0x402cb000
> > close(3) = 0
> > mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> > 0x40019000
> > mprotect(0x4002c000, 286720, PROT_READ|PROT_WRITE) = 0
> > mprotect(0x4002c000, 286720, PROT_READ|PROT_EXEC) = 0
> > Segmentation fault
>
> > I am a bit in the dark here - do we have to install 'gdb' on iPAQ?
>
> I'm not sure that gdb will help; it might not be getting as far as
> calling main().
>
> Try running strace on some other program, to see what happens next. On
> Linux/x86, there is a bit more startup code before main gets called.
>
> If it isn't reaching main(), then:
>
> a) gdb won't help, and
>
> b) the problem would appear to be with the shared libraries.
>
> Maybe some other switches are required for ARM; the "gcc" Info file
> lists quite a few ARM-specific options. Do you have any source code
> which successfully builds and uses shared libraries which you could
> use as a reference?
Hi,
some news on GRASS/iPAQ:
We get inside GRASS shell when we start it with path to LOCATION as
parameter (bypassing the crashing $ETC/set_data). All modules are (still)
crashing.
E.g.
cd /grass/dist.armv4l-unknown-linux-gnu/etc/bin/cmd
strace g.list
[...]
open("/grass/dist.armv4l-unknown-linux-gnu/lib/libgrass_datetime.so",
O_RDONLY) = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\210\33\0"..., 1024) =
1024
SYS_197(0x3, 0xbfffee34, 0xbfffee34, 0x664, 0x3) = 0
mmap(0, 59820, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4025d000
mprotect(0x40264000, 31148, PROT_NONE) = 0
mmap(0x40265000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0) =
0x40265000
close(3) = 0
mprotect(0x4001f000, 286720, PROT_READ|PROT_WRITE) = 0
mprotect(0x4001f000, 286720, PROT_READ|PROT_EXEC) = 0
Segmentation fault
For comparison some working programs:
#--------------------------------
strace /bin/ping
[...]
read(3, "# /etc/protocols:\n# $Id: protoco"..., 4096) = 1748
close(3) = 0
munmap(0x40016000, 4096) = 0
socket(PF_INET, SOCK_RAW, IPPROTO_ICMP) = 3
SYS_199(0x40136ac0, 0xbffffbf0, 0x150c, 0x7dc, 0xbffffd04) = 0
msgget(IPC_PRIVATE, IPC_EXCL|IPC_NOWAIT|0x200b090|0220) = 0
write(2, "usage: ping [-LRdfnqrv] [-c coun"..., 125usage: ping [-LRdfnqrv]
[-c count] [-i wait] [-l preload]
[...]
#---------------------------------
strace /bin/gzip
[...]
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\270\4\2\000"...,
1024) =
1024
SYS_197(0x3, 0xbffff0f0, 0xbffff0f0, 0x664, 0x3) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40018000
mmap(0, 1161272, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001f000
mprotect(0x4012a000, 67640, PROT_NONE) = 0
mmap(0x4012f000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x108000) = 0x4012f000
mmap(0x40137000, 14392, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40137000
close(3) = 0
munmap(0x40016000, 4540) = 0
getpid() = 381
rt_sigaction(SIGINT, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {0x2003f10, [INT], SA_RESTART|0x4000000}, {SIG_IGN}, 8)
= 0rt_sigaction(SIGTERM, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTERM, {0x2003f10, [TERM], SA_RESTART|0x4000000}, {SIG_IGN},
8) = 0
rt_sigaction(SIGHUP, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGHUP, {0x2003f10, [HUP], SA_RESTART|0x4000000}, {SIG_IGN}, 8)
= 0ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
write(2, "gzip: compressed data not writte"..., 78gzip: compressed data not
writ
[...]
(sorry for this copy-paste)
We are still clueless how to continue.
I have put the dumpspecs of Skiffcluster (ARM/Linux) here:
http://mpa.itc.it/markus/tmp/gcc_dumpspecs_arm.txt
(4kb)
These flags and options do not tell me anything :-)
Carl... Glynn...
Thanks,
Markus
More information about the grass-dev
mailing list