Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
About cross compile, can not found libraries...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
axios_n
n00b
n00b


Joined: 29 Nov 2021
Posts: 9

PostPosted: Sun Jan 02, 2022 4:01 am    Post subject: About cross compile, can not found libraries... Reply with quote

Hi,everyone:
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:

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


some error like this:
Code:

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'


or like this:
Code:

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'


i can sure many package can build,and install.i test.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54317
Location: 56N 3W

PostPosted: Sun Jan 02, 2022 12:40 pm    Post subject: Reply with quote

axios_n,

What command did you give?

How did you install your cross toolchain?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
axios_n
n00b
n00b


Joined: 29 Nov 2021
Posts: 9

PostPosted: Tue Jan 04, 2022 1:12 am    Post subject: Reply with quote

NeddySeagoon wrote:
axios_n,

What command did you give?

How did you install your cross toolchain?


Thanks,i write a tool to create the toolchain.
like create crossdev tools, and create toolchain env.but on demon.
The core code:

Code:

  CHOST="$CHOST" CBUILD="x86_64-pc-linux-gnu" ROOT=$ROOTFS SYSROOT=$ROOTFS PORTAGE_CONFIGROOT=$ROOTFS \
    emerge --root-deps $@ || exit 1


Code:

crossdev --stable -t $HOST


and some portage config,like link make.profile, and config the make.conf, this code is too long to push on.
Back to top
View user's profile Send private message
axios_n
n00b
n00b


Joined: 29 Nov 2021
Posts: 9

PostPosted: Wed Jan 05, 2022 4:48 am    Post subject: About pkg-config Reply with quote

i find the problem,the pkg-config can not get the absolute path.

In chromiumos sdk i find a envvar PKG_CONFIG, config the pkg-config path,and pkg-config will return the library path. But gentoo's portage can not use the env,maybe the eclass is different, i have a idea: can we change the portage, add a features, config the pkg-config,or anther tools about build system.defferent
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum