Re: Buildroot ARM filesystem OpenSSH compile fail



On 2007-10-14, kid1972tw@xxxxxxxxxxxx <kid1972tw@xxxxxxxxxxxx> wrote:
I've tried Buildroot to add OpenSSH package for ARM device , OpenSSH
version is 3.9p1.

I fail to compile and got messages l , someone said they are because
64 bit data :
[...]
/home/scott/buildroot/build_arm/openssh-3.9p1/scp.c:682: undefined
reference to `__udivdi3'

These functions are used by gcc to implement operations not present in
the host CPU (in this case, unsigned integer division). Normally these
functions are in libgcc, so if your build isn't finding them then it's
probably because either the gcc installation is broken, or the linker
is not finding libgcc. You can try adding -lgcc to your LDFLAGS (and
maybe the corresponding -L flag to tell the linker where to find it)
however as far as I know this should not be necessary.

Oh, the other thing that can cause this kind of thing is to specify
the linker directly (eg LD=your-arch-ld) when invoking configure as
the linker doesn't know about those gcc magic functions. The fix is to
tell configure to use gcc as the linker (which should be the default).

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
.



Relevant Pages

  • Install problem with js
    ... checking for gcc... ... checking whether we are using the GNU C compiler... ... checking whether the gcc linker supports shared libraries... ...
    (alt.os.linux.suse)
  • Re: A Portable C Compiler
    ... It is an ASCII LINKER SCRIPT for GNU's "ld"... ... That is not part of gcc and the actual C library is available as a shared object, ... Most of the headers and system headers under linux are full of ... I think you will find that the headers for all C libraries use implementation specific tricks. ...
    (comp.lang.c)
  • symbol resolution on shard library.
    ... While learning about the mechaism of symbol resolution of a linker, ... : multiple definition of `malloc' ... I understand why above gcc excution failed. ...
    (comp.unix.programmer)
  • Re: ld terminated with signal 11
    ... > the simple test code shown below, the linker terminates with a signal ... Signal 11 on a x86 Linux box is a segfault. ... often flaky RAM --- GCC uses pointers all over the place extensively ... before you call that test code "simple", ...
    (comp.arch.embedded)
  • Re: Looking for MS-Link to use with Art of Assembly Language and NASM
    ... It contains the linker. ... As for another linker, MS uses same format of object files as GCC, so I just ... tried to compile simple C program with Microsoft C++ and link it with GCC ...
    (comp.lang.asm.x86)