Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-09

Compiling a program for openwrt?

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Luca Olivetti

Hello,

I received a message from a user that's trying to use my program with openwrt.
I provide a binary for arm that I compiled natively on my lspro and he cannot run it. I suspect a library problem (the lspro has a full-fledged linux system, while openwrt seems to be using uClibc). This is what he told me it happens when he tries to run the program:

# botphone --help
/usr/bin/botphone: 1: Syntax error: word unexpected (expecting ")")

# strace botphone
execve("/usr/bin/botphone", ["botphone"], [/* 9 vars */]) = -1 ENOEXEC (Exec format error)
write(2, "strace: exec: Exec format error\n", 32strace: exec: Exec format error
) = 32
exit(1) = ?
Process 13404 detached

This is result of ldd on my lspro:

$ ldd botphone
liblinphone.so.1 => /usr/local/lib/liblinphone.so.1 (0x4001e000) libusb-0.1.so.4 => /lib/libusb-0.1.so.4 (0x40060000) libdl.so.2 => /lib/libdl.so.2 (0x40070000)
libc.so.6 => /lib/libc.so.6 (0x4007b000)
libquickstream.so.0 => /usr/local/lib/libquickstream.so.0 (0x4018f000)
libosip2.so.3 => /usr/lib/libosip2.so.3 (0x4019a000) libpthread.so.0 => /lib/libpthread.so.0 (0x401be000) libosipparser2.so.3 => /usr/lib/libosipparser2.so.3 (0x40218000) libnsl.so.1 => /lib/libnsl.so.1 (0x40258000)
librt.so.1 => /lib/librt.so.1 (0x40273000)
/lib/ld-linux.so.2 (0x40000000)
libmediastreamer.so.0 => /usr/local/lib/libmediastreamer.so.0 (0x4028d000)
libortp.so.5 => /usr/local/lib/libortp.so.5 (0x402af000) libspeex.so.1 => /usr/lib/libspeex.so.1 (0x402cc000) libm.so.6 => /lib/libm.so.6 (0x402f4000)

and this is the result under openwrt:

# ldd botphone
libm.so.0 => /lib/libm.so.0 (0x2aaee000)
libcrypt.so.0 => /lib/libcrypt.so.0 (0x2ab35000)
libc.so.0 => /lib/libc.so.0 (0x2ab89000)
ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x2aaa8000)

Do you know of anything special I should do to compile the program to work under openwrt?

Bye

Luca

Reply by email

Luca Olivetti
to Florian Klaempfl

En/na Florian Klaempfl ha escrit:

Show quoted text 7 lines
Luca Olivetti schrieb: > Hello, > > I received a message from a user that's trying to use my program with > openwrt. At least the WRT54 is MIPS based. Is the user's system really an arm?

Good question. He has an asus wl500g premium, and according to the table of hardware it's mips based. I'll tell him that.
Thank you

Luca

Reply by email