Bernhard you are right i should send the code...and make a debug...so I did this...
I compile a hello world: #include <stdio.h> int main(int argc, char **argv) { printf("\nhello world\n"); } with this command: /usr/src/openwrt/fon/openwrt/build_dir/mipsel/OpenWrt-SDK-fonera2n-for-Linux-x86_64/staging_dir/toolchain-mipsel_gcc4.1.2/bin/mipsel-linux-uclibc-gcc-4.1.2 /home/chechu/Documentos/hello.c -o hello and it works. But when I compile the same program with the sqlite librarie it hangs. I use this command: /usr/src/openwrt/fon/openwrt/build_dir/mipsel/OpenWrt-SDK-fonera2n-for-Linux-x86_64/staging_dir/toolchain-mipsel_gcc4.1.2/bin/mipsel-linux-uclibc-gcc-4.1.2 -L staging_dir/mipsel/usr/lib/ -lsqlite3 hello.c -o hello thanks On Wed, Mar 3, 2010 at 1:17 PM, Bernhard Loos <bernhardl...@googlemail.com>wrote: > Without the source, how should we know? > You will have to start debugging it yourself. Besides good old printf > debugging, there is also remote gdb you can use. > > 2010/3/3 Jesus arteche <chechu.li...@gmail.com>: > > Hi, > > > > I'm compiling a c program that uses sqlite3 libraries...when I execute > the > > program in my pc it works right...later I make a cross compile using fon > > version of OpenWRT (SDK)...and when I execute in openWRT (fonera) it > > hangs...dont do anything here is the trace (I did with strace): > > > > > > > > execve("/mnt/usb/pruebasql", ["/mnt/usb/pruebasql"], [/* 8 vars */]) = 0 > > svr4_syscall() = -1 ERRNO_4090 (Unknown error > 4090) > > stat("/etc/ld.so.cache", 0x7fb88a60) = -1 ENOENT (No such file or > > directory) > > open("/lib/libsqlite3.so.0", O_RDONLY) = -1 ENOENT (No such file or > > directory) > > open("/lib/libsqlite3.so.0", O_RDONLY) = -1 ENOENT (No such file or > > directory) > > open("/usr/lib/libsqlite3.so.0", O_RDONLY) = 3 > > fstat(3, {st_mode=S_IFREG|0755, st_size=436063, ...}) = 0 > > old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, > 0) > > = 0x2aaae000 > > read(3, > > "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\0\216\0\0004\0\0\0"..., > > 4096) = 4096 > > old_mmap(NULL, 700416, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = > > 0x2aaee000 > > old_mmap(0x2aaee000, 431612, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, > 3, > > 0) = 0x2aaee000 > > old_mmap(0x2ab97000, 5983, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, > 3, > > 0x69000) = 0x2ab97000 > > close(3) = 0 > > munmap(0x2aaae000, 4096) = 0 > > open("/lib/libgcc_s.so.1", O_RDONLY) = 3 > > fstat(3, {st_mode=S_IFREG|0644, st_size=60806, ...}) = 0 > > old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, > 0) > > = 0x2aaae000 > > read(3, > > > "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\240\31\0\0004\0\0\0"..., > > 4096) = 4096 > > old_mmap(NULL, 323584, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = > > 0x2ab99000 > > old_mmap(0x2ab99000, 58700, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, > 3, > > 0) = 0x2ab99000 > > old_mmap(0x2abe7000, 3462, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, > 3, > > 0xe000) = 0x2abe7000 > > close(3) = 0 > > munmap(0x2aaae000, 4096) = 0 > > open("/lib/libc.so.0", O_RDONLY) = 3 > > fstat(3, {st_mode=S_IFREG|0644, st_size=397215, ...}) = 0 > > old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, > 0) > > = 0x2aaae000 > > read(3, > > "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0`\250\0\0004\0\0\0"..., > > 4096) = 4096 > > old_mmap(NULL, 679936, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = > > 0x2abe8000 > > old_mmap(0x2abe8000, 388676, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, > 3, > > 0) = 0x2abe8000 > > old_mmap(0x2ac87000, 8095, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, > 3, > > 0x5f000) = 0x2ac87000 > > old_mmap(0x2ac89000, 19456, PROT_READ|PROT_WRITE, > > MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ac89000 > > close(3) = 0 > > munmap(0x2aaae000, 4096) = 0 > > open("/lib/libpthread.so.0", O_RDONLY) = 3 > > fstat(3, {st_mode=S_IFREG|0644, st_size=71594, ...}) = 0 > > old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, > 0) > > = 0x2aaae000 > > read(3, > > "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\0205\0\0004\0\0\0"..., > > 4096) = 4096 > > old_mmap(NULL, 344064, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = > > 0x2ac8e000 > > old_mmap(0x2ac8e000, 49960, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, > 3, > > 0) = 0x2ac8e000 > > old_mmap(0x2acda000, 22442, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, > 3, > > 0xc000) = 0x2acda000 > > old_mmap(0x2ace0000, 6816, PROT_READ|PROT_WRITE, > > MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ace0000 > > close(3) = 0 > > munmap(0x2aaae000, 4096) = 0 > > open("/lib/libgcc_s.so.1", O_RDONLY) = 3 > > fstat(3, {st_mode=S_IFREG|0644, st_size=60806, ...}) = 0 > > close(3) = 0 > > open("/lib/libc.so.0", O_RDONLY) = 3 > > fstat(3, {st_mode=S_IFREG|0644, st_size=397215, ...}) = 0 > > close(3) = 0 > > open("/lib/libc.so.0", O_RDONLY) = 3 > > fstat(3, {st_mode=S_IFREG|0644, st_size=397215, ...}) = 0 > > close(3) = 0 > > open("/lib/libc.so.0", O_RDONLY) = 3 > > fstat(3, {st_mode=S_IFREG|0644, st_size=397215, ...}) = 0 > > close(3) = 0 > > stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=20694, ...}) = > 0 > > mprotect(0x2ac87000, 4096, PROT_READ) = 0 > > mprotect(0x2acda000, 4096, PROT_READ) = 0 > > mprotect(0x2aaec000, 4096, PROT_READ) = 0 > > ioctl(0, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0 > > ioctl(1, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0 > > getpid() = 4628 > > getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0 > > setrlimit(RLIMIT_STACK, {rlim_cur=2040*1024, rlim_max=RLIM_INFINITY}) = 0 > > rt_sigaction(SIGRT_0, {SIG_DFL}, NULL, 16) = 0 > > rt_sigaction(SIGRT_1, {SIG_DFL}, NULL, 16) = 0 > > rt_sigaction(SIGRT_2, {SIG_DFL}, NULL, 16) = 0 > > rt_sigprocmask(SIG_BLOCK, [RT_0], NULL, 16) = 0 > > rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 16) = 0 > > > > > > > > I'm using uclibc 0.9.28...someone knows why it hangs there... > > > > thanks > > > > > > _______________________________________________ > > openwrt-devel mailing list > > openwrt-devel@lists.openwrt.org > > https://lists.openwrt.org/mailman/listinfo/openwrt-devel > > > > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel >
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel