Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] problem with openssh
@ 2007-06-05 14:00 z4ziggy
  2007-06-06  2:35 ` z4ziggy
  0 siblings, 1 reply; 8+ messages in thread
From: z4ziggy @ 2007-06-05 14:00 UTC (permalink / raw)
  To: buildroot

Hello all,

Ive been trying to compile openssh using buildroot, and just like
samba, it compiles fine but any executable halts with "segmentation
fault". Ive tried making buildroot with both gcc 4.2.0 and 3.4.6
(uclibc 0.9.29) - same results. I would appreciate if anyone can
please tell me how he had succeeded compiling (and executing...)
openssh successfully.

here is the strace output of ssh :

[root at zmob /]$ strace ssh --help
execve("/usr/bin/ssh", ["ssh", "--help"], [/* 42 vars */]) = 0
mmap2(NULL, 20, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fd8000
stat("/etc/ld.so.cache", {st_mode=S_IFREG|0644, st_size=1139, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3
mmap2(NULL, 1139, PROT_READ, MAP_SHARED, 3, 0) = 0xb7fd7000
close(3)                                = 0
open("/lib/libm.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=45712, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fd6000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\21\0"...,
4096) = 4096
mmap2(NULL, 49152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fca000
mmap2(0xb7fca000, 40932, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED,
3, 0) = 0xb7fca000
mmap2(0xb7fd4000, 4100, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0xa) = 0xb7fd4000
close(3)                                = 0
munmap(0xb7fd6000, 4096)                = 0
open("/lib/libpthread.so.0", O_RDONLY)  = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=52972, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fd6000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340C\0"...,
4096) = 4096
mmap2(NULL, 81920, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fb6000
mmap2(0xb7fb6000, 45516, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED,
3, 0) = 0xb7fb6000
mmap2(0xb7fc2000, 6852, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0xb) = 0xb7fc2000
mmap2(0xb7fc4000, 23424, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7fc4000
close(3)                                = 0
munmap(0xb7fd6000, 4096)                = 0
open("/usr/lib/libcrypto.so.0.9.7", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=820612, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fd6000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\250"...,
4096) = 4096
mmap2(NULL, 835584, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7eea000
mmap2(0xb7eea000, 748012, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED,
3, 0) = 0xb7eea000
mmap2(0xb7fa1000, 69956, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0xb7) = 0xb7fa1000
mmap2(0xb7fb3000, 11416, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7fb3000
close(3)                                = 0
munmap(0xb7fd6000, 4096)                = 0
open("/lib/libutil.so.0", O_RDONLY)     = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=4656, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fd6000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\224\7\0"...,
4096) = 4096
mmap2(NULL, 8192, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ee8000
mmap2(0xb7ee8000, 2924, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3,
0) = 0xb7ee8000
mmap2(0xb7ee9000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0) = 0xb7ee9000
close(3)                                = 0
munmap(0xb7fd6000, 4096)                = 0
open("/usr/lib/libz.so.1", O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=59136, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fd6000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\25\0\000"...,
4096) = 4096
mmap2(NULL, 61440, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ed9000
mmap2(0xb7ed9000, 57008, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED,
3, 0) = 0xb7ed9000
mmap2(0xb7ee7000, 704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0xe) = 0xb7ee7000
close(3)                                = 0
munmap(0xb7fd6000, 4096)                = 0
open("/lib/libcrypt.so.0", O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=8796, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fd6000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\214\3\0"...,
4096) = 4096
mmap2(NULL, 86016, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ec4000
mmap2(0xb7ec4000, 7510, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3,
0) = 0xb7ec4000
mmap2(0xb7ec6000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x1) = 0xb7ec6000
mmap2(0xb7ec7000, 70940, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7ec7000
close(3)                                = 0
munmap(0xb7fd6000, 4096)                = 0
open("/lib/libresolv.so.0", O_RDONLY)   = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=4640, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fd6000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\350\1\0"...,
4096) = 4096
mmap2(NULL, 8192, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ec2000
mmap2(0xb7ec2000, 516, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3,
0) = 0xb7ec2000
mmap2(0xb7ec3000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0) = 0xb7ec3000
close(3)                                = 0
munmap(0xb7fd6000, 4096)                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=273180, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fd6000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\251\0"...,
4096) = 4096
mmap2(NULL, 299008, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e79000
mmap2(0xb7e79000, 267352, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED,
3, 0) = 0xb7e79000
mmap2(0xb7ebb000, 5304, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x41) = 0xb7ebb000
mmap2(0xb7ebd000, 16988, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7ebd000
close(3)                                = 0
munmap(0xb7fd6000, 4096)                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=273180, ...}) = 0
close(3)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=273180, ...}) = 0
close(3)                                = 0
open("/lib/libdl.so.0", O_RDONLY)       = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=8968, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fd6000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0,\7\0\000"...,
4096) = 4096
mmap2(NULL, 16384, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e75000
mmap2(0xb7e75000, 4782, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3,
0) = 0xb7e75000
mmap2(0xb7e77000, 4172, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x1) = 0xb7e77000
close(3)                                = 0
munmap(0xb7fd6000, 4096)                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=273180, ...}) = 0
close(3)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=273180, ...}) = 0
close(3)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=273180, ...}) = 0
close(3)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=273180, ...}) = 0
close(3)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=273180, ...}) = 0
close(3)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=273180, ...}) = 0
close(3)                                = 0
munmap(0xb7fd7000, 1139)                = 0
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=17000, ...}) = 0
mprotect(0xb7fd4000, 4096, PROT_READ)   = 0
mprotect(0xb7fc2000, 4096, PROT_READ)   = 0
mprotect(0xb7ee9000, 4096, PROT_READ)   = 0
mprotect(0xb7ec6000, 4096, PROT_READ)   = 0
mprotect(0xb7ec3000, 4096, PROT_READ)   = 0
mprotect(0xb7ebb000, 4096, PROT_READ)   = 0
mprotect(0xb7e77000, 4096, PROT_READ)   = 0
mprotect(0xb7fdd000, 4096, PROT_READ)   = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Process 11453 detached
[root at zmob /]$


Blessings,
Elia Yehuda.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] problem with openssh
  2007-06-05 14:00 [Buildroot] problem with openssh z4ziggy
@ 2007-06-06  2:35 ` z4ziggy
  2007-06-06  8:09   ` Philippe Ney
  0 siblings, 1 reply; 8+ messages in thread
From: z4ziggy @ 2007-06-06  2:35 UTC (permalink / raw)
  To: buildroot

i found a fix for openssh, and i might try it with samba as well.
although its not a good fix (imo) but it works. i simply added
"--static" to LDFLAGS in openssh.mk

if someone has a better way to fix this, please enlighten me.

im sure many people here don't have a problem with openssh, and thats
why there were no replies for this problem. however - it would be
appreciated if others could assist for those of us who do have a
problem. overall, it will contribute to both the community and for
future users who might have the same problem.

Blessings,
Elia Yehuda.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] problem with openssh
  2007-06-06  2:35 ` z4ziggy
@ 2007-06-06  8:09   ` Philippe Ney
       [not found]     ` <e19d85410706060839l6baf072cte7a5c9c9d58b67ab@mail.gmail.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Philippe Ney @ 2007-06-06  8:09 UTC (permalink / raw)
  To: buildroot

> i found a fix for openssh, and i might try it with samba as well.
> although its not a good fix (imo) but it works. i simply added
> "--static" to LDFLAGS in openssh.mk

Hi,
Did you try uClibc-0.9.28 ?
It works for me with gcc-4.0.3 and binutils-2.17 on arm XScale.
But it certainly works also for many people with uClibc-0.9.29.
The problem must be somewhere else.

Philippe

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] problem with openssh
       [not found]       ` <e19d85410706061235g63cadda9s364849b0737a39ec@mail.gmail.com>
@ 2007-06-06 21:55         ` Philippe Ney
  2007-06-08  4:52           ` Tomohiro Masubuchi
  0 siblings, 1 reply; 8+ messages in thread
From: Philippe Ney @ 2007-06-06 21:55 UTC (permalink / raw)
  To: buildroot

Just forwarding to the list as it seems to be its right destination.

> Hey all,
> 
> Well, both openssh AND samba works perfectly fine with older uclibc
> (0.9.28.3), regardless of which gcc/binutils combo (all combos ive
> tried worked), so now i can pinpoint the problem to uclibc 0.9.29
> (also the svn version fails).
> 
> Thank you so much Philippe for pointing that out - i mistakenly
> thought a newer uclibc (ie, subversion) would be the fix, but it turns
> out an older one is the solution.
> 
> Blessings to you all,
> Elia Yehuda.
> 
> On 6/6/07, z4ziggy <z4ziggy@gmail.com> wrote:
> > Hey Philippe,
> >
> > MANY thanks for that suggestion! ssh works with
> > uclibc-0.9.28.3/gcc-4.0.4/binutils-2.17.
> >
> > i will make more tests to see where it fails to pinpoint the problem
> > and report here.
> >
> > many thanks again!
> >
> > Blessings,
> > Elia.
> >
> > On 6/6/07, Philippe Ney <philippe.ney@pardes.ws> wrote:
> > > > i found a fix for openssh, and i might try it with samba as well.
> > > > although its not a good fix (imo) but it works. i simply added
> > > > "--static" to LDFLAGS in openssh.mk
> > >
> > > Hi,
> > > Did you try uClibc-0.9.28 ?
> > > It works for me with gcc-4.0.3 and binutils-2.17 on arm XScale.
> > > But it certainly works also for many people with uClibc-0.9.29.
> > > The problem must be somewhere else.
> > >
> > > Philippe
> > > _______________________________________________
> > > buildroot mailing list
> > > buildroot at uclibc.org
> > > http://busybox.net/mailman/listinfo/buildroot
> > >
> >

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] problem with openssh
  2007-06-06 21:55         ` Philippe Ney
@ 2007-06-08  4:52           ` Tomohiro Masubuchi
  2007-06-08  9:51             ` Konstantin Kletschke
  0 siblings, 1 reply; 8+ messages in thread
From: Tomohiro Masubuchi @ 2007-06-08  4:52 UTC (permalink / raw)
  To: buildroot

Hi all,

Elia Yehuda wrote:
> Ive been trying to compile openssh using buildroot, and just like
> samba, it compiles fine but any executable halts with "segmentation
> fault".

I found out that the cause of this problem originated in
__progname = NULL in uClibc-0.9.29.

The UCLIBC_HAS___PROGNAME is enabled in uClibc-0.9.29.config,
but UCLIBC_HAS_PROGRAM_INVOCATION_NAME is disabled.

Under this condition, it seems to become __progname = NULL. (uclibc's bug??)

In uClibc-0.9.28.config, both UCLIBC_HAS_PROGRAM_INVOCATION_NAME and
UCLIBC_HAS___PROGNAME is not exist. These become disabled.
In this case, symbol __progname was not exist. Then openssh will be
configured to not use __progname. Therefore this problem doesn't
happen in uClibc-0.9.28.

To solve this problem in uClibc-0.9.29, the following sentences of
toolchain/uClibc/uClibc-0.9.29.config are changed, and rebuild uclibc.

# UCLIBC_HAS_PROGRAM_INVOCATION_NAME is not set

to

UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y

It works fine with arm(iwmmxt), gcc-4.2.0, binutils-2.17.50.0.16,
uClibc-0.9.29.

Tomohiro

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] problem with openssh
  2007-06-08  4:52           ` Tomohiro Masubuchi
@ 2007-06-08  9:51             ` Konstantin Kletschke
  2007-06-11  9:21               ` [Buildroot] problem with openssh/samba Tomohiro Masubuchi
  0 siblings, 1 reply; 8+ messages in thread
From: Konstantin Kletschke @ 2007-06-08  9:51 UTC (permalink / raw)
  To: buildroot

Am 2007-06-08 13:52 +0900 schrieb Tomohiro Masubuchi:

> > Ive been trying to compile openssh using buildroot, and just like
> > samba, it compiles fine but any executable halts with "segmentation
> > fault".

> UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y
> 
> It works fine with arm(iwmmxt), gcc-4.2.0, binutils-2.17.50.0.16,
> uClibc-0.9.29.

Sadly this does not fix the smbd/nmbd issue. I can't check the fix for
openssh, may be I install it for testing purposes.

Regards, Konsti

-- 
GPG KeyID EF62FCEF
Fingerprint: 13C9 B16B 9844 EC15 CC2E  A080 1E69 3FDA EF62 FCEF

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] problem with openssh/samba
  2007-06-08  9:51             ` Konstantin Kletschke
@ 2007-06-11  9:21               ` Tomohiro Masubuchi
  2007-06-11 12:05                 ` Konstantin Kletschke
  0 siblings, 1 reply; 8+ messages in thread
From: Tomohiro Masubuchi @ 2007-06-11  9:21 UTC (permalink / raw)
  To: buildroot

Hi, Konsti.

>>> Ive been trying to compile openssh using buildroot, and just like
>>> samba, it compiles fine but any executable halts with "segmentation
>>> fault".
>
>> UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y
>>
>> It works fine with arm(iwmmxt), gcc-4.2.0, binutils-2.17.50.0.16,
>> uClibc-0.9.29.
>
> Sadly this does not fix the smbd/nmbd issue. I can't check the fix for
> openssh, may be I install it for testing purposes.

I found the way of evading this problem.  The problem of openssh and
the problem of samba were due to another cause.

To solve this problem, patch this attachment file to uClibc-0.9.29,
and rebuild it.
It works with arm (iwmmxt,EABI) target, gcc-4.2.0, binutils-2.17.50.0.16,
and patched uClibc-0.9.29.
However, I am not confident about this way...

Regards,
Tomohiro
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: uClibc-0.9.29-fix-dynamic-info.patch
Url: http://busybox.net/lists/buildroot/attachments/20070611/a0fdda6f/attachment.diff 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] problem with openssh/samba
  2007-06-11  9:21               ` [Buildroot] problem with openssh/samba Tomohiro Masubuchi
@ 2007-06-11 12:05                 ` Konstantin Kletschke
  0 siblings, 0 replies; 8+ messages in thread
From: Konstantin Kletschke @ 2007-06-11 12:05 UTC (permalink / raw)
  To: buildroot

Am 2007-06-11 18:21 +0900 schrieb Tomohiro Masubuchi:

> To solve this problem, patch this attachment file to uClibc-0.9.29,
> and rebuild it.

Indeed.

> However, I am not confident about this way...

At least it makes smbd and nmbd not segfaulting at startup anymore.

Konsti

-- 
GPG KeyID EF62FCEF
Fingerprint: 13C9 B16B 9844 EC15 CC2E  A080 1E69 3FDA EF62 FCEF

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-06-11 12:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-05 14:00 [Buildroot] problem with openssh z4ziggy
2007-06-06  2:35 ` z4ziggy
2007-06-06  8:09   ` Philippe Ney
     [not found]     ` <e19d85410706060839l6baf072cte7a5c9c9d58b67ab@mail.gmail.com>
     [not found]       ` <e19d85410706061235g63cadda9s364849b0737a39ec@mail.gmail.com>
2007-06-06 21:55         ` Philippe Ney
2007-06-08  4:52           ` Tomohiro Masubuchi
2007-06-08  9:51             ` Konstantin Kletschke
2007-06-11  9:21               ` [Buildroot] problem with openssh/samba Tomohiro Masubuchi
2007-06-11 12:05                 ` Konstantin Kletschke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox