Bug 11136 - extraneous ld scripts in official busybox-1.29.0.tar.bz2 tarball?
Summary: extraneous ld scripts in official busybox-1.29.0.tar.bz2 tarball?
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.29.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-02 13:47 UTC by gabriele balducci
Modified: 2018-07-02 13:57 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
configuration file (27.31 KB, application/octet-stream)
2018-07-02 13:47 UTC, gabriele balducci
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gabriele balducci 2018-07-02 13:47:37 UTC
Created attachment 7661 [details]
configuration file

hello

my build of 1.29.0 (from official tarball
https://busybox.net/downloads/busybox-1.29.0.tar.bz2) stops with:

    ----8<----
    attempt to open /opt/stow.d/versions/gcc-8.1.0/usr/lib64/gcc/x86_64-pc-linux-gnu/8.1.0/../../../libresolv.a failed/usr/bin/ld: skipping incompatible /usr/lib/../lib64/libm.a when searching for -lm
    /usr/bin/ld: cannot find -lm
    /usr/bin/ld: skipping incompatible /usr/lib/../lib64/libresolv.a when searching for -lresolv
    /usr/bin/ld: cannot find -lresolv
    collect2: error: ld returned 1 exit status

    make[1]: *** [Makefile:718: busybox_unstripped] Error 1
    make[1]: Leaving directory '/home/balducci/tmp/install-us-d/busybox-1.28.4.d/busybox-1.29.0'
    ---->8----

AFAICS, the reason is the presence of 3 ld scripts which (it looks to
me) shouldn't be there:

    busybox_ldscript
    busybox_ldscript_bss
    busybox_ldscript_nobss

The failure is because the ld scripts are (apparently) for a 32 bit
machine:

    ----8<----
    #:2> head busybox_ldscript
    /* Script for -z combreloc: combine and sort reloc sections */
    OUTPUT_FORMAT("elf32-i386", "elf32-i386",
                  "elf32-i386")
    OUTPUT_ARCH(i386)
    ENTRY(_start)
    SECTIONS
    {
      /* Read-only sections, merged into text segment: */
      PROVIDE (__executable_start = 0x08048000); . = 0x08048000 + SIZEOF_HEADERS;
      .interp         : { *(.interp) }
    ---->8----

where my box is 64 bit

As a matter of fact, removing the scripts makes the build complete successfully.

ciao
-gabriele
Comment 1 Denys Vlasenko 2018-07-02 13:57:14 UTC
fixed