[patch] test-in-container: fix Arch Linux build-programs bug?
Albert ARIBAUD
albert.aribaud@3adev.fr
Fri Aug 31 16:51:00 GMT 2018
Hi Carlos,
Le Fri, 31 Aug 2018 12:21:56 -0400, Carlos O'Donell <carlos@redhat.com>
a écrit :
> On 08/31/2018 10:34 AM, Albert ARIBAUD wrote:
> > Hi,
> >
> > From commit 561b0bec444 onward, my cross-build for ARM target from X64
> > host started failing with the following error:
> >
> > arm-linux-gnueabi-gcc -nostdlib -nostartfiles
>
> OK.
>
> > -o /home/3adev/src/siemens/y2038/glibc/build/support/links-dso-program
> > -Wl,-z,combreloc -Wl,-z,relro
> > -Wl,--hash-style=both /home/3adev/src/siemens/y2038/glibc/build/csu/crt1.o /home/3adev/src/siemens/y2038/glibc/build/csu/crti.o
> > `arm-linux-gnueabi-gcc --print-file-name=crtbegin.o` /home/3adev/src/siemens/y2038/glibc/build/support/links-dso-program.o -lstdc++ -lgcc_s -Wl,-dynamic-linker=/lib/ld-linux.so.3 -Wl,-rpath-link=/home/3adev/src/siemens/y2038/glibc/build:/home/3adev/src/siemens/y2038/glibc/build/math:/home/3adev/src/siemens/y2038/glibc/build/elf:/home/3adev/src/siemens/y2038/glibc/build/dlfcn:/home/3adev/src/siemens/y2038/glibc/build/nss:/home/3adev/src/siemens/y2038/glibc/build/nis:/home/3adev/src/siemens/y2038/glibc/build/rt:/home/3adev/src/siemens/y2038/glibc/build/resolv:/home/3adev/src/siemens/y2038/glibc/build/mathvec:/home/3adev/src/siemens/y2038/glibc/build/support:/home/3adev/src/siemens/y2038/glibc/build/crypt:/home/3adev/src/siemens/y2038/glibc/build/nptl /home/3adev/src/siemens/y2038/glibc/build/libc.so.6 /home/3adev/src/siemens/y2038/glibc/build/libc_nonshared.a -Wl,--as-needed /home/3adev/src/siemens/y2038/glibc/build/elf/ld.so -Wl,--no-as-needed -lgcc /home/3adev/src/siemens/y2038/glibc/build/elf/libgcc-stubs.a `arm-linux-gnueabi-gcc --print-file-name=crtend.o` /home/3adev/src/siemens/y2038/glibc/build/csu/crtn.o
> > /home/3adev/src/siemens/y2038/glibc/build/support/links-dso-program.o:
> > file not recognized: Format de fichier non reconnu
> >
> > (build is French; this means unrecognized file format)
> >
> > Doing a
> >
> > $ file support/*.o
> >
> > Results in:
> >
> > support/echo-container.o: ELF 32-bit LSB relocatable, ARM, EABI5
> > version 1 (SYSV), with debug_info, not stripped
> > support/links-dso-program.o: ELF 64-bit LSB relocatable, x86-64,
> > version 1 (SYSV), with debug_info, not stripped
> > support/shell-container.o: ELF 32-bit LSB relocatable, ARM, EABI5
> > version 1 (SYSV), with debug_info, not stripped
> > support/stamp.o: empty
> > support/test-container.o: ELF 32-bit LSB relocatable, ARM, EABI5
> > version 1 (SYSV), with debug_info, not stripped
> > support/true-container.o: ELF 32-bit LSB relocatable, ARM, EABI5
> > version 1 (SYSV), with debug_info, not stripped
> >
> > Apparently, links-dso-program.o is built native for x86-64 then linked
> > for ARM.
> >
> > Did the way to cross-build change with the advent of test-in-container?
>
> No. It did not change. We test with build-many-glibcs all the time to do
> cross-testing to all of the available ABI targets.
>
> How exactly did you configure glibc?
Makefile has these vars:
export ROOTFS_DIR_Y2038 := $(PWD)/rootfs-y2038
export KERNEL_HDR_DIR_Y2038 := $(ROOTFS_DIR_Y2038)/usr
TARGET_ARCH = arm-linux-gnueabi
GLIBC_HOST = $(TARGET_ARCH)
GLIBC_SOURCE_DIR := $(PWD)/glibc/src
GLIBC_BUILD_DIR := $(PWD)/glibc/build
And executes these two commands:
mkdir -p $(GLIBC_BUILD_DIR)
cd $(GLIBC_BUILD_DIR) && $(GLIBC_SOURCE_DIR)/configure \
--prefix=/usr --host=$(GLIBC_HOST) \
--with-headers=$(KERNEL_HDR_DIR_Y2038)/include \
libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes
I always remove $(PWD)/glibc/build before I run the commands above.
Cordialement,
Albert ARIBAUD
3ADEV
More information about the Libc-alpha
mailing list