I have a question,in the cross compile system, emerge can not found libraries,such the readline.h,or zlib.h.My env as this:
Code: Select all
Init/Update crossdev tools...
Update/Create cross sdk...
Init rootfs...
Portage 3.0.28 (python 3.9.9-final-0, default/linux/arm64/17.0, gcc-11.2.0, unavailable, 5.10.76-gentoo-r1 x86_64)
=================================================================
System uname: Linux-5.10.76-gentoo-r1-x86_64-06-55-with-glibc2.33
KiB Mem: 131546452 total, 127292448 free
KiB Swap: 0 total, 0 free
Timestamp of repository gentoo: Fri, 31 Dec 2021 00:45:01 +0000
sh bash 5.1_p8
ld GNU ld (Gentoo 2.37_p1 p0) 2.37
Repositories:
gentoo
location: /var/db/repos/gentoo
priority: -1000
board
location: /var/db/repos/board
masters: gentoo
curio
location: /var/db/repos/curio
masters: gentoo
ACCEPT_KEYWORDS="arm64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=armv8-a"
CHOST="aarch64-gentoo-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf"
CXXFLAGS="-O2 -pipe -march=armv8-a"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -march=armv8-a"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=armv8-a"
GENTOO_MIRRORS="https://mirrors.tuna.tsinghua.edu.cn/gentoo"
LANG="C.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j52 "
PKGDIR="/root/flea/build/test/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/root/flea/build/test/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/zsh"
USE="acl arm64 bzip2 cli crypt dri fortran gdbm iconv ipv6 libglvnd libtirpc ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl unicode xattr zlib" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb thumb2 v4 v5 v6 v7 v8 vfp vfp-d32 vfpv3 vfpv4" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="fbdev dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Code: Select all
gcc -g -DCROSS_COMPILING -o mkbuiltins mkbuiltins.o
eval.c: In function ‘alrm_catcher’:
eval.c:243:3: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
243 | write (1, msg, strlen (msg));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./mkbuiltins -externfile builtext.h -structfile builtins.c \
-noproduction -D . ./alias.def ./bind.def ./break.def ./builtin.def ./caller.def ./cd.def ./colon.def ./command.def ./declare.def ./echo.def ./enable.def ./eval.def ./getopts.def ./exec.def ./exit.def ./fc.def ./fg_bg.def ./hash.def ./help.def ./history.def ./jobs.def ./kill.def ./let.def ./read.def ./return.def ./set.def ./setattr.def ./shift.def ./source.def ./suspend.def ./test.def ./times.def ./trap.def ./type.def ./ulimit.def ./umask.def ./wait.def ./reserved.def ./pushd.def ./shopt.def ./printf.def ./complete.def ./mapfile.def
shell.c:79:12: fatal error: readline/history.h: No such file or directory
79 | # include <readline/history.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
bashhist.c:54:10: fatal error: readline/history.h: No such file or directory
54 | #include <readline/history.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:100: shell.o] Error 1
make: *** [Makefile:100: bashhist.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-shells/bash-5.1_p8/work/bash-5.1/builtins'
gcc -DHAVE_CONFIG_H -DSHELL -I/var/tmp/portage/app-shells/bash-5.1_p8/work/bash-5.1 -I.. -g man2html.o -o man2html
make[1]: Leaving directory '/var/tmp/portage/app-shells/bash-5.1_p8/work/bash-5.1/support'
make[1]: Leaving directory '/var/tmp/portage/app-shells/bash-5.1_p8/work/bash-5.1/builtins'
* ERROR: app-shells/bash-5.1_p8::gentoo failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=app-shells/bash-5.1_p8::gentoo'`,
* the complete build log and the output of `emerge -pqv '=app-shells/bash-5.1_p8::gentoo'`.
* The complete build log is located at '/var/tmp/portage/app-shells/bash-5.1_p8/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/app-shells/bash-5.1_p8/temp/environment'.
* Working directory: '/var/tmp/portage/app-shells/bash-5.1_p8/work/bash-5.1'
* S: '/var/tmp/portage/app-shells/bash-5.1_p8/work/bash-5.1'
Code: Select all
checking for readline in -lreadline... no
checking for readline in -lreadline... no
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
** Cannot --enable-pcregrep-libz because zlib.h was not found
!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/dev-libs/libpcre-8.45/work/pcre-8.45-.arm64/config.log
* ERROR: dev-libs/libpcre-8.45::gentoo failed (configure phase):
* econf failed
*
* Call stack:
* ebuild.sh, line 127: Called src_configure
* environment, line 1648: Called multilib-minimal_src_configure
* environment, line 1034: Called multilib_foreach_abi 'multilib-minimal_abi_src_configure'
* environment, line 1295: Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
* environment, line 964: Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
* environment, line 962: Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_configure'
* environment, line 354: Called multilib-minimal_abi_src_configure
* environment, line 1028: Called multilib_src_configure
* environment, line 1512: Called econf '--with-match-limit-recursion=8192' '--enable-pcregrep-libbz2' '--enable-cpp' '--enable-jit' '--enable-pcregrep-jit' '--disable-pcre16' '--disable-pcre32' '--disable-pcretest-libedit' '--enable-pcretest-libreadline' '--disable-static' '--enable-utf' '--enable-unicode-properties' '--enable-pcregrep-libz' '--enable-pcre8' '--enable-shared'
* phase-helpers.sh, line 711: Called __helpers_die 'econf failed'
* isolated-functions.sh, line 112: Called die
* The specific snippet of code:
* die "$@"
*
* If you need support, post the output of `emerge --info '=dev-libs/libpcre-8.45::gentoo'`,
* the complete build log and the output of `emerge -pqv '=dev-libs/libpcre-8.45::gentoo'`.
* The complete build log is located at '/var/tmp/portage/dev-libs/libpcre-8.45/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-libs/libpcre-8.45/temp/environment'.
* Working directory: '/var/tmp/portage/dev-libs/libpcre-8.45/work/pcre-8.45-.arm64'
* S: '/var/tmp/portage/dev-libs/libpcre-8.45/work/pcre-8.45'

