Problema de dependência do Buildroot criando novo kernel - libelf-dev

0

Estou atualizando para o kernel 4.14.73 usando buildroot, parece que este novo kernel tem uma dependência de libelf-dev quando recebo este erro:

Makefile:953: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop.
make[1]: Leaving directory '/media/vmpart/kernel-upgrade/buildroot/output/build/linux-4.14.73'
make: *** [/media/vmpart/kernel-upgrade/buildroot/output/build/linux-4.14.73/.stamp_compiled] Error 2

Eu verifiquei o makefile e esta é a área em questão:

ifdef CONFIG_STACK_VALIDATION
      has_libelf := $(call try-run,\
            echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -,1,0)
      ifeq ($(has_libelf),1)
        objtool_target := tools/objtool FORCE
      else
        ifdef CONFIG_UNWINDER_ORC
          $(error "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
        else
          $(warning "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
        endif
        SKIP_STACK_VALIDATION := 1
        export SKIP_STACK_VALIDATION
      endif
    endif

Em particular, esta verificação está falhando:

has_libelf := $(call try-run,\
            echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -,1,0)

Eu então adicionei o pacote elfutils que eu vi deveria ter esses devtools (isso é instalado mas minha compilação não reconhece que é), eu fiz minha compilação do Linux ter uma dependência de host-elfutils (assim como link ) e construído com sucesso host-elfutils-0.170 , no entanto, eu ainda recebo o erro, o que exatamente é o cheque que espera nesta linha, precisa do .so para estar em algum lugar em particular?

has_libelf := $(call try-run,\
            echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -,1,0)

Estou usando uma versão mais antiga do buildroot, então talvez eu precise fazer alguma coisa no meu arquivo de forma diferente?

################################################################################
#
# elfutils
#
################################################################################

ELFUTILS_VERSION = 0.170
ELFUTILS_SOURCE = elfutils-$(ELFUTILS_VERSION).tar.bz2
ELFUTILS_SITE = https://sourceware.org/elfutils/ftp/$(ELFUTILS_VERSION)
ELFUTILS_INSTALL_STAGING = YES
ELFUTILS_LICENSE = GPL-2.0+ or LGPL-3.0+ (library)
ELFUTILS_LICENSE_FILES = COPYING COPYING-GPLV2 COPYING-LGPLV3
ELFUTILS_DEPENDENCIES = zlib $(TARGET_NLS_DEPENDENCIES)
HOST_ELFUTILS_DEPENDENCIES = host-zlib host-bzip2 host-xz

# We patch configure.ac
ELFUTILS_AUTORECONF = YES
HOST_ELFUTILS_AUTORECONF = YES

# Pass a custom program prefix to avoid a naming conflict between
# elfutils binaries and binutils binaries.
ELFUTILS_CONF_OPTS += \
    --program-prefix="eu-" \


HOST_ELFUTILS_CONF_OPTS = \
    --with-bzlib \
    --with-lzma \
    --disable-progs 

# elfutils gets confused when lfs mode is forced, so don't
ELFUTILS_CFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))
ELFUTILS_CPPFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))

# sparc64 needs -fPIC instead of -fpic
ifeq ($(BR2_sparc64),y)
ELFUTILS_CFLAGS += -fPIC
endif


ELFUTILS_CONF_ENV += \
    CFLAGS="$(ELFUTILS_CFLAGS)" \
    CPPFLAGS="$(ELFUTILS_CPPFLAGS)"

ELFUTILS_LDFLAGS = $(TARGET_LDFLAGS) \
    $(TARGET_NLS_LIBS)

ELFUTILS_CONF_ENV += \
    LDFLAGS="$(ELFUTILS_LDFLAGS)"

ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
ELFUTILS_DEPENDENCIES += argp-standalone
ELFUTILS_CONF_OPTS += --disable-symbol-versioning
endif

ifeq ($(BR2_PACKAGE_BZIP2),y)
ELFUTILS_DEPENDENCIES += bzip2
ELFUTILS_CONF_OPTS += --with-bzlib
else
ELFUTILS_CONF_OPTS += --without-bzlib
endif

ifeq ($(BR2_PACKAGE_XZ),y)
ELFUTILS_DEPENDENCIES += xz
ELFUTILS_CONF_OPTS += --with-lzma
else
ELFUTILS_CONF_OPTS += --without-lzma
endif

ifeq ($(BR2_PACKAGE_ELFUTILS_PROGS),y)
ELFUTILS_CONF_OPTS += --enable-progs
ELFUTILS_LICENSE := $(ELFUTILS_LICENSE), GPL-3.0+ (programs)
ELFUTILS_LICENSE_FILES += COPYING
else
ELFUTILS_CONF_OPTS += --disable-progs
endif

$(eval $(call AUTOTARGETS,package,elfutils))
$(eval $(call AUTOTARGETS,package,elfutils,host))
    
por Paul 04.10.2018 / 15:49

0 respostas