New: recipe for target 'install_dev' failed (libcrypto.so: file format not recognized)
https://bugs.busybox.net/show_bug.cgi?id=12686
Bug ID: 12686
Summary: recipe for target 'install_dev' failed (libcrypto.so:
file format not recognized)
Product: buildroot
Version: 2020.02
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: jrmcorreo-linux at yahoo.es
CC: buildroot at uclibc.org
Target Milestone: ---
Hello,
I'm trying to compile the latest version of buildroot with internal toolchain (I've tried gcc-8.x with c++ support enabled, binutils 2.32 and 2.33.1 with same result), in order to upgrade the system of my embedded hardware based on Sunxi A20 ARM processor, but I'm getting an unexpected error while installing libopenssl-1.1.1d:
install libcrypto.a -> /buildrootpath/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libcrypto.a install libssl.a -> /buildrootpath/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libssl.a link /buildrootpath/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libcrypto.so -> /buildrootpath/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libcrypto.so.1.1 install libcrypto.so -> /buildrootpath/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libcrypto.so install libcrypto.so.1.1 -> /buildrootpath/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libcrypto.so /buildrootpath/host/bin/arm-buildroot-linux-gnueabihf-ar:
/buildrootpath/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libcrypto.so:
file format not recognized /buildrootpath/host/bin/arm-buildroot-linux-gnueabihf-ar:
/buildrootpath/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libcrypto.so.new:
file format not recognized
Makefile:358: recipe for target 'install_dev' failed
Checking files with readelf -hl I obtain next output:
$ readelf -hl libcrypto.so Encabezado ELF: M?gico: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Clase: ELF32 Datos: complemento a 2, little endian Versi?n: 1 (current) OS/ABI: UNIX - System V Versi?n ABI: 0 Tipo: DYN (Fichero objeto compartido) M?quina: ARM Versi?n: 0x1 Direcci?n del punto de entrada: 0x50000 Inicio de encabezados de programa: 52 (bytes en el fichero) Inicio de encabezados de secci?n: 2373548 (bytes en el fichero) Opciones: 0x5000400, Version5 EABI, hard-float ABI Tama?o de este encabezado: 52 (bytes) Tama?o de encabezados de programa: 32 (bytes) N?mero de encabezados de programa: 6 Tama?o de encabezados de secci?n: 40 (bytes) N?mero de encabezados de secci?n: 37 ?ndice de tabla de cadenas de secci?n de encabezado: 36
Encabezados de Programa:
Tipo Desplaz DirVirt DirF?sica TamFich TamMem Opt Alin EXIDX 0x1c4b48 0x001c4b48 0x001c4b48 0x00008 0x00008 R 0x4 LOAD 0x000000 0x00000000 0x00000000 0x1c4b54 0x1c4b54 R E 0x10000 LOAD 0x1c55f8 0x001d55f8 0x001d55f8 0x16de0 0x1ac6c RW 0x10000 DYNAMIC 0x1daed8 0x001eaed8 0x001eaed8 0x00128 0x00128 RW 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10 GNU_RELRO 0x1c55f8 0x001d55f8 0x001d55f8 0x15a08 0x15a08 R 0x1
mapeo de Secci?n a Segmento:
Segmento Secciones...
00 .ARM.exidx
01 .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_d
.gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.exidx .eh_frame
02 .init_array .fini_array .data.rel.ro .dynamic .got .data .bss
03 .dynamic
04
05 .init_array .fini_array .data.rel.ro .dynamic
$ readelf -hl libcrypto.so.new Encabezado ELF: M?gico: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Clase: ELF32 Datos: complemento a 2, little endian Versi?n: 1 (current) OS/ABI: UNIX - System V Versi?n ABI: 0 Tipo: DYN (Fichero objeto compartido) M?quina: ARM Versi?n: 0x1 Direcci?n del punto de entrada: 0x50000 Inicio de encabezados de programa: 52 (bytes en el fichero) Inicio de encabezados de secci?n: 2373548 (bytes en el fichero) Opciones: 0x5000400, Version5 EABI, hard-float ABI Tama?o de este encabezado: 52 (bytes) Tama?o de encabezados de programa: 32 (bytes) N?mero de encabezados de programa: 6 Tama?o de encabezados de secci?n: 40 (bytes) N?mero de encabezados de secci?n: 37 ?ndice de tabla de cadenas de secci?n de encabezado: 36
Encabezados de Programa:
Tipo Desplaz DirVirt DirF?sica TamFich TamMem Opt Alin EXIDX 0x1c4b48 0x001c4b48 0x001c4b48 0x00008 0x00008 R 0x4 LOAD 0x000000 0x00000000 0x00000000 0x1c4b54 0x1c4b54 R E 0x10000 LOAD 0x1c55f8 0x001d55f8 0x001d55f8 0x16de0 0x1ac6c RW 0x10000 DYNAMIC 0x1daed8 0x001eaed8 0x001eaed8 0x00128 0x00128 RW 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10 GNU_RELRO 0x1c55f8 0x001d55f8 0x001d55f8 0x15a08 0x15a08 R 0x1
mapeo de Secci?n a Segmento:
Segmento Secciones...
00 .ARM.exidx
01 .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_d
.gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.exidx .eh_frame
02 .init_array .fini_array .data.rel.ro .dynamic .got .data .bss
03 .dynamic
04
05 .init_array .fini_array .data.rel.ro .dynamic
Relevant configuration entries are next:
#
# Target options
#
BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT=y
BR2_ARCH="arm"
BR2_ENDIAN="LITTLE"
BR2_GCC_TARGET_ABI="aapcs-linux"
BR2_GCC_TARGET_CPU="cortex-a7"
BR2_GCC_TARGET_FPU="vfpv4-d16"
BR2_GCC_TARGET_FLOAT_ABI="hard"
BR2_GCC_TARGET_MODE="arm"
BR2_BINFMT_SUPPORTS_SHARED=y
BR2_READELF_ARCH_NAME="ARM"
BR2_BINFMT_ELF=y
BR2_ARM_CPU_HAS_NEON=y
BR2_ARM_CPU_HAS_FPU=y
BR2_ARM_CPU_HAS_VFPV2=y
BR2_ARM_CPU_HAS_VFPV3=y
BR2_ARM_CPU_HAS_VFPV4=y
BR2_ARM_CPU_HAS_ARM=y
BR2_ARM_CPU_HAS_THUMB2=y
BR2_ARM_CPU_ARMV7A=y
#
#Toolchain options
#
BR2_TOOLCHAIN=y
BR2_TOOLCHAIN_USES_GLIBC=y
BR2_TOOLCHAIN_BUILDROOT=y
#
# Toolchain Buildroot Options
#
BR2_TOOLCHAIN_BUILDROOT_VENDOR="buildroot"
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_TOOLCHAIN_BUILDROOT_LIBC="glibc"
#
# Glibc Options
#
BR2_PACKAGE_GLIBC=y
#
# Binutils Options
#
BR2_PACKAGE_HOST_BINUTILS_SUPPORTS_CFI=y
BR2_BINUTILS_VERSION_2_33_X=y
BR2_BINUTILS_VERSION="2.33.1"
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS=""
#
# GCC Options
#
# BR2_GCC_VERSION_7_X is not set
BR2_GCC_VERSION_8_X=y
BR2_GCC_VERSION="8.3.0"
BR2_EXTRA_GCC_CONFIG_OPTIONS=""
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_HOST_GDB_ARCH_SUPPORTS=y
#
# Crypto
#
# BR2_PACKAGE_BEECRYPT is not set BR2_PACKAGE_BOTAN_ARCH_SUPPORTS=y
# BR2_PACKAGE_BOTAN is not set
# BR2_PACKAGE_CA_CERTIFICATES is not set
# BR2_PACKAGE_CRYPTODEV is not set
# BR2_PACKAGE_GCR is not set
BR2_PACKAGE_GNUTLS=y
# BR2_PACKAGE_GNUTLS_OPENSSL is not set BR2_PACKAGE_GNUTLS_TOOLS=y
# BR2_PACKAGE_LIBARGON2 is not set
# BR2_PACKAGE_LIBASSUAN is not set
# BR2_PACKAGE_LIBGCRYPT is not set BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS=y
# BR2_PACKAGE_LIBGPG_ERROR is not set BR2_PACKAGE_LIBGPG_ERROR_SYSCFG="arm-unknown-linux-gnueabi" # BR2_PACKAGE_LIBGPGME is not set
# BR2_PACKAGE_LIBKCAPI is not set
# BR2_PACKAGE_LIBKSBA is not set
# BR2_PACKAGE_LIBMCRYPT is not set
# BR2_PACKAGE_LIBMHASH is not set
# BR2_PACKAGE_LIBNSS is not set
# BR2_PACKAGE_LIBOLM is not set
# BR2_PACKAGE_LIBP11 is not set
# BR2_PACKAGE_LIBSCRYPT is not set
# BR2_PACKAGE_LIBSECRET is not set
# BR2_PACKAGE_LIBSHA1 is not set
# BR2_PACKAGE_LIBSODIUM is not set
# BR2_PACKAGE_LIBSSH is not set
# BR2_PACKAGE_LIBSSH2 is not set
# BR2_PACKAGE_LIBTOMCRYPT is not set
# BR2_PACKAGE_LIBUECC is not set
# BR2_PACKAGE_MBEDTLS is not set BR2_PACKAGE_NETTLE=y
BR2_PACKAGE_OPENSSL=y
BR2_PACKAGE_LIBOPENSSL=y BR2_PACKAGE_LIBOPENSSL_TARGET_ARCH="linux-armv4" BR2_PACKAGE_LIBOPENSSL_BIN=y
# BR2_PACKAGE_LIBOPENSSL_ENGINES is not set
# BR2_PACKAGE_LIBRESSL is not set BR2_PACKAGE_HAS_OPENSSL=y BR2_PACKAGE_PROVIDES_OPENSSL="libopenssl" BR2_PACKAGE_PROVIDES_HOST_OPENSSL="host-libopenssl" # BR2_PACKAGE_RHASH is not set
# BR2_PACKAGE_TINYDTLS is not set
# BR2_PACKAGE_TPM2_TSS is not set BR2_PACKAGE_TROUSERS=y
# BR2_PACKAGE_USTREAM_SSL is not set
# BR2_PACKAGE_WOLFSSL is not set
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12686] recipe for target 'install_dev' failed (libcrypto.so: file format not recognized)
https://bugs.busybox.net/show_bug.cgi?id=12686
--- Comment #1 from Peter Seiderer <[email protected]> --- Please try a complete re-build:
make clean
make
If it fails again, please provide a complete .config file (or defconfig - after make savedefconfig)...
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12686] recipe for target 'install_dev' failed (libcrypto.so: file format not recognized)
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12686
--- Comment #2 from Juan <[email protected]> ---
I attach a defconfig file for one of the Sunxi A20 boards that gives me the same error.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12686] recipe for target 'install_dev' failed (libcrypto.so: file format not recognized)
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12686
--- Comment #3 from Juan <[email protected]> --- Created attachment 8411
--> https://bugs.busybox.net/attachment.cgi?id=8411&action=edit
defconfig file that reproduces the issue I'm facing
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12686] recipe for target 'install_dev' failed (libcrypto.so: file format not recognized)
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12686
--- Comment #4 from Peter Seiderer <[email protected]> --- Given defconfig compiles without failure here (host: openSUSE Tumbleweed), anything special with your build system?
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12686] recipe for target 'install_dev' failed (libcrypto.so: file format not recognized)
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12686
--- Comment #5 from Juan <[email protected]> --- Hi,
My build system is old but compliant with requirements:
- gcc/gcc++ 4.9.2-6.fc21
- make 4.0-3.fc21
except perl version (5.18.4-310.fc21), but 2019.02 compiles well in my system and perl requirements are the same... and this error does not appear to be related with perl.
Best Regards
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12686] recipe for target 'install_dev' failed (libcrypto.so: file format not recognized)
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12686
--- Comment #6 from Peter Seiderer <[email protected]> --- Two last (from my side) options/suggestions:
- maybe a parallel build issue, try to re-build libopenssl with BR2_JLEVEL=1 set in the .config file
- check your environment variables, your log excerpt shows something with
Makefile:358: recipe for target 'install_dev' failed
and
buildrootpath/host/bin/arm-buildroot-linux-gnueabihf-ar:
/buildrootpath/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libcrypto.so:
file format not recognized
In my Makefile (build/libopenssl-1.1.1d/Makefile) the target install_dev is form line 310 to 355 and contains install/cp/$(RANLIB)/chmod/mv commands for .new files....no 'ar' call...and RANLIB is specified as
RANLIB=$(CROSS_COMPILE)<my_working_dir>/host/bin/arm-buildroot-linux-gnueabihf-ranlib
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12686] recipe for target 'install_dev' failed (libcrypto.so: file format not recognized)
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12686
--- Comment #7 from Juan <[email protected]> --- Hi again,
I tried changing value for the variable BR2_JLEVEL from 0 to 1 with no success. About Makefile, the 358 line is next one:
357: install_dev: install_runtime_libs
358: @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit
1)
359: @$(ECHO) "*** Installing development files"
360: @$(PERL) $(SRCDIR)/util/mkdir-p.pl
$(DESTDIR)$(INSTALLTOP)/include/openssl
361: @ :
If you want I can attach the whole Makefile (1.2 MB), but my point is that only will serve to waste disk space on server.
About environment variables, I see no other value related to building environment except PATH including entry to perl5, also PERL_LOCAL_LIB_ROOT and PERL_LOCAL_LIB_ROOT entries.
Thank you and best regards
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12686] recipe for target 'install_dev' failed (libcrypto.so: file format not recognized)
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12686
Thomas Petazzoni <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |WORKSFORME--- Comment #8 from Thomas Petazzoni <[email protected]> --- The issue you are pointing to seems to be known in OpenSSL upstream:
- https://github.com/openssl/openssl/issues/6641
- https://github.com/openssl/openssl/issues/9086
So, I setup a Docker container with CentOS 7, checked out Buildroot 2020.02 and built OpenSSL 1.1.1d, without any problem.
The first issue mentioned above indicates that the problem came from a perl module called Text::Template, which I do not have installed in my Docker container:
# perl -e 'use Text::Template; print $Text::Template::VERSION,"\n";' Can't locate Text/Template.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at -e line 1. BEGIN failed--compilation aborted at -e line 1.
Since you mentioned you had some Perl-related environment variables defined, perhaps there is an issue with this ?
Since we're not able to reproduce, we won't be able to help a lot here. Could you work on some way of reproducing this?
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12686] recipe for target 'install_dev' failed (libcrypto.so: file format not recognized)
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12686
--- Comment #9 from Juan <[email protected]> --- Hello Thomas,
I'm sorry to answer too late, but due to the COVID-19 I have been compelled to spend my time on other matters.
Today I've uninstalled the perl module and its dependencies and now I'm compiling again buildroot 2020.02 without experiencing any error from libopenssl.
Prior to post the bug I've searched a lot looking for the error, but i've got no result about perl-Text-Template issues.
Let me to say your commitment with this issue exceeded the one that could be expected. You had the possibility to answer saying it is an external issue to buildroot and only related with libopenssl. Your answer could have been shorter, but you made a test and provided the solution.
Thanks a lot
Juan
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.