Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Architectures & Platforms Gentoo on ARM
  • Search

Problem building crossdev tool chain

Gentoo on all things ARM. Both 32 bit and 64 bit.
Tell about your hardware and CHOST.
Problems with crossdev targeting ARM hardware go here too.
Post Reply
  • Print view
Advanced search
21 posts • Page 1 of 1
Author
Message
n1ese
Tux's lil' helper
Tux's lil' helper
Posts: 87
Joined: Sun Sep 29, 2019 3:25 pm

Problem building crossdev tool chain

  • Quote

Post by n1ese » Sun Sep 29, 2019 3:37 pm

I'm having an issue building the crossdev toolchain for aarch64. My host system is a lite 17.1 multilib install on amd64.

gcc-stage2 is failing with the following two lib errors

incompatible: /usr/aarch64-unknown-linux/gnu/usr/lib64/libc_nonshared.a when searching for /usr/lib64/libc_nonshared.a
not found: /usr/lib64/libc_nonshared.a inside /usr/aarch64-unknown-linux

Anyone know how to possibly fix this? Thanks.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56085
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Sep 29, 2019 5:21 pm

n1ese,

Welcome to Gentoo.

What command did you give?

What USE flags do you have set?
Post all of

Code: Select all

emerge --info
if you like.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
n1ese
Tux's lil' helper
Tux's lil' helper
Posts: 87
Joined: Sun Sep 29, 2019 3:25 pm

  • Quote

Post by n1ese » Sun Sep 29, 2019 6:49 pm

NeddySeagoon wrote:Welcome to Gentoo.

What command did you give?

What USE flags do you have set?
Thanks sir.

From the 64-but guide here: https://wiki.gentoo.org/wiki/Raspberry_ ... it_Install
I am running: crossdev -t aarch64-unknown-linux-gnu

I can't get you my emerge --info at this time. I'm trying to figure out how to get the report out of my VM and to the host. I'm in a CLI VM and can't get any of the file sharing sites to work with links and copy and paste isn't working. :( I'm working on it.
Top
n1ese
Tux's lil' helper
Tux's lil' helper
Posts: 87
Joined: Sun Sep 29, 2019 3:25 pm

  • Quote

Post by n1ese » Sun Sep 29, 2019 7:20 pm

Finally, my emerge --info:

Code: Select all

Portage 2.3.69 (python 3.6.5-final-0, default/linux/amd64/17.1, gcc-8.3.0, glibc-2.29-r2, 4.19.72-gentoo x86_64)
=================================================================
System uname: Linux-4.19.72-gentoo-x86_64-Intel-R-_Core-TM-_i7-6500U_CPU_@_2.50GHz-with-gentoo-2.6
KiB Mem:     2040036 total,   1852488 free
KiB Swap:     524284 total,    524284 free
Timestamp of repository gentoo: Sat, 28 Sep 2019 21:00:01 +0000
Head commit of repository gentoo: fca8a8f69fce2a343dac48cb28dc619ebd15dd1f
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-lang/perl:            5.28.2-r1::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            8.3.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes

crossdev
    location: /usr/local/portage-crossdev
    masters: gentoo
    priority: 10

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN 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="-march=native -O2 -pipe"
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 sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo"
LANG="en_US"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
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"
USE="acl amd64 berkdb bzip2 cli crypt cxx dri fortran gdbm iconv ipv6 libtirpc multilib ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl tcpd unicode xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56085
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Sep 29, 2019 7:45 pm

n1ese,

At the command line, wgetpaste is your friend.

Code: Select all

crossdev -t aarch64-unknown-linux-gnu
should work.

Its running here now. I'll update this post when it stops.

Code: Select all

 * crossdev version:      20190908
 * Host Portage ARCH:     amd64
 * Target Portage ARCH:   arm64
 * Target System:         aarch64-unknown-linux-gnu
 * Stage:                 4 (C/C++ compiler)
 * USE=multilib:          no
 * ABIs:                  arm64

 * binutils:              binutils-[latest]
 * gcc:                   gcc-[latest]
 * headers:               linux-headers-[latest]
 * libc:                  glibc-[latest] 
 * CROSSDEV_OVERLAY:      /usr/local/gentoo-static
 * PORT_LOGDIR:           /var/log/portage/
 * PORTAGE_CONFIGROOT:    /
 * Portage flags:    

I have crossdev version: 20190908
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
n1ese
Tux's lil' helper
Tux's lil' helper
Posts: 87
Joined: Sun Sep 29, 2019 3:25 pm

  • Quote

Post by n1ese » Sun Sep 29, 2019 7:56 pm

NeddySeagoon wrote:I have crossdev version: 20190908
Weird, my version is 20190712. I wonder why it didn't emerge the latest version. Will have to check into this.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56085
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Sep 29, 2019 8:15 pm

n1ese,

You have

Code: Select all

ACCEPT_KEYWORDS="amd64" 
so you get the latest stable version.
I'm all testing here. (~)20190908 means testing. 20190712, no (~), is latest stable.

Code: Select all

$ eix crossdev
[I] sys-devel/crossdev
     Available versions:  20181020 20181202 (~)20190311{tbz2} 20190712{tbz2} (~)20190901 (~)20190908{tbz2} **99999999*l
     Installed versions:  20190908{tbz2}(22:52:57 17/09/19)
Its still on

Code: Select all

* Emerging cross-gcc-stage2 ...
...

Code: Select all

 * Log: /var/log/portage//cross-aarch64-unknown-linux-gnu-binutils.log
 * Emerging cross-binutils ...                                            [ ok ]
 * Log: /var/log/portage//cross-aarch64-unknown-linux-gnu-gcc-stage1.log
 * Emerging cross-gcc-stage1 ...                                          [ ok ]
 * Log: /var/log/portage//cross-aarch64-unknown-linux-gnu-linux-headers.log
 * Emerging cross-linux-headers ...                                       [ ok ]
 * Log: /var/log/portage//cross-aarch64-unknown-linux-gnu-glibc.log
 * Emerging cross-glibc ...                                               [ ok ]
 * Log: /var/log/portage//cross-aarch64-unknown-linux-gnu-gcc-stage2.log
 * Emerging cross-gcc-stage2 ...                                          [ ok ]
NeddySeagoon_Static ~ # 
so that worked here.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
n1ese
Tux's lil' helper
Tux's lil' helper
Posts: 87
Joined: Sun Sep 29, 2019 3:25 pm

  • Quote

Post by n1ese » Sun Sep 29, 2019 8:41 pm

NeddySeagoon wrote:so that worked here.
Wonder what is wrong with this VM. I'm installing a new Gentoo VM running nomultilb to see if that makes a difference.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56085
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Sep 29, 2019 8:53 pm

n1ese,

Try the testing sys-devel/crossdev

I would not expect no-multilib to change anything as arm64 is all no-multilib anyway.
On a multilib install only the 64 bit part of the toolchain would be used.
If that was broken, you would have noticed.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
n1ese
Tux's lil' helper
Tux's lil' helper
Posts: 87
Joined: Sun Sep 29, 2019 3:25 pm

  • Quote

Post by n1ese » Sun Sep 29, 2019 10:44 pm

Well, the problem continues even on my newly installed no_multilib VM with test sys-devel/crossdev. Something must be wrong with recent stage3's. I'm not really sure what to try next.

Output is from the gcc-stage2 log file:

Code: Select all

/bin/bash /var/tmp/portage/cross-aarch64-unknown-linux-gnu/gcc-9.2.0-r1/work/gcc-9.2.0/libgcc/../mkinstalldirs .
/var/tmp/portage/cross-aarch64-unknown-linux-gnu/gcc-9.2.0-r1/work/build/./gcc/xgcc -B/var/tmp/portage/cross-aarch64-unknown-linux-gnu/gcc-9.2.0-r1/work/build/./gcc/ -B/usr/aarch64-unknown-linux-gnu/bin/ -B/usr/aarch64-unknown-linux-gnu/lib/ -isystem /usr/aarch64-unknown-linux-gnu/include -isystem /usr/aarch64-unknown-linux-gnu/sys-include    -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fPIC -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fno-stack-clash-protection  -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc.map -o ./libgcc_s.so.1.tmp -g -O2 -B./ _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulhc3_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s.o _divhc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _clrsbsi2_s.o _clrsbdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _divdi3_s.o _moddi3_s.o _divmoddi4_s.o _udivdi3_s.o _umoddi3_s.o _udivmoddi4_s.o _udiv_w_sdiv_s.o sync-cache_s.o sfp-exceptions_s.o addtf3_s.o divtf3_s.o eqtf2_s.o getf2_s.o letf2_s.o multf3_s.o negtf2_s.o subtf3_s.o unordtf2_s.o fixtfsi_s.o fixunstfsi_s.o floatsitf_s.o floatunsitf_s.o fixtfdi_s.o fixunstfdi_s.o floatditf_s.o floatunditf_s.o fixtfti_s.o fixunstfti_s.o floattitf_s.o floatuntitf_s.o extendsftf2_s.o extenddftf2_s.o extendhftf2_s.o trunctfsf2_s.o trunctfdf2_s.o trunctfhf2_s.o fixhfti_s.o fixunshfti_s.o floattihf_s.o floatuntihf_s.o enable-execute-stack_s.o unwind-dw2_s.o unwind-dw2-fde-dip_s.o unwind-sjlj_s.o unwind-c_s.o emutls_s.o libgcc.a -lc && rm -f ./libgcc_s.so && if [ -f ./libgcc_s.so.1 ]; then mv -f ./libgcc_s.so.1 ./libgcc_s.so.1.backup; else true; fi && mv ./libgcc_s.so.1.tmp ./libgcc_s.so.1 && ln -s libgcc_s.so.1 ./libgcc_s.so
/usr/libexec/gcc/aarch64-unknown-linux-gnu/ld: skipping incompatible /usr/aarch64-unknown-linux-gnu/usr/lib64/libc_nonshared.a when searching for /usr/lib64/libc_nonshared.a
/usr/libexec/gcc/aarch64-unknown-linux-gnu/ld: cannot find /usr/lib64/libc_nonshared.a inside /usr/aarch64-unknown-linux-gnu
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:992: libgcc_s.so] Error 1
make[2]: Leaving directory '/var/tmp/portage/cross-aarch64-unknown-linux-gnu/gcc-9.2.0-r1/work/build/aarch64-unknown-linux-gnu/libgcc'
make[1]: *** [Makefile:11984: all-target-libgcc] Error 2
make[1]: Leaving directory '/var/tmp/portage/cross-aarch64-unknown-linux-gnu/gcc-9.2.0-r1/work/build'
make: *** [Makefile:956: all] Error 2
 * ERROR: cross-aarch64-unknown-linux-gnu/gcc-9.2.0-r1::crossdev failed (compile phase):
 *   emake failed
Top
costel78
Guru
Guru
Posts: 416
Joined: Fri Apr 20, 2007 6:17 pm

  • Quote

Post by costel78 » Mon Sep 30, 2019 7:47 am

Please check /usr/aarch64-unknown-linux-gnu/usr/lib64/libc_nonshared.a.

Code: Select all

file /usr/aarch64-unknown-linux-gnu/usr/lib64/libc_nonshared.a
and please post the content of /usr/aarch64-unknown-linux-gnu/etc/portage/make.conf
I hope there are, at least,

Code: Select all

CHOST=aarch64-unknown-linux-gnu
CBUILD=x86_64-pc-linux-gnu
HOSTCC=${CBUILD}-gcc
ROOT=/usr/${CHOST}/
Sorry for my English. I'm still learning this language.
Top
n1ese
Tux's lil' helper
Tux's lil' helper
Posts: 87
Joined: Sun Sep 29, 2019 3:25 pm

  • Quote

Post by n1ese » Mon Sep 30, 2019 6:42 pm

Code: Select all

/usr/aarch64-unknown-linux-gnu/usr/lib64/libc_nonshared.a: current ar archive

Code: Select all

# Note: profile variables are set/overridden in profile/ files:
# etc/portage/profile/use.force (overrides kernel_* USE variables)
# etc/portage/profile/make.defaults (overrides ARCH, KERNEL, ELIBC variables)

CHOST=aarch64-unknown-linux-gnu
CBUILD=x86_64-pc-linux-gnu

HOSTCC=${CBUILD}-gcc

ROOT=/usr/${CHOST}/

ACCEPT_KEYWORDS="${ARCH} ~${ARCH}"

USE="${ARCH} -pam"

CFLAGS="-O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

FEATURES="-collision-protect sandbox buildpkg noman noinfo nodoc"
# Be sure we dont overwrite pkgs from another repo..
PKGDIR=${ROOT}packages/
PORTAGE_TMPDIR=${ROOT}tmp/

PKG_CONFIG_PATH="${ROOT}usr/lib/pkgconfig/"
#PORTDIR_OVERLAY="/usr/portage/local/"
Top
n1ese
Tux's lil' helper
Tux's lil' helper
Posts: 87
Joined: Sun Sep 29, 2019 3:25 pm

  • Quote

Post by n1ese » Tue Oct 01, 2019 2:17 pm

I'm going to abandon this and just use Sakaki's 64bit Lite image for my 4B build. Thanks.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56085
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Tue Oct 01, 2019 3:27 pm

n1ese,

There is another path ...

an arm64 chroot on a more capable system. It needs the help of a static qemu.

The ready made chroot there is badly out of date and contains a static qemu built for an AMD Phenom II.

Code: Select all

The chroot needs to be populated with arm64 packages, there are two possible sources.

    Use existing aarch64 packages from outside the chroot, e.g. from your arm64 install.
    Using the arm64 stage3 tarball
needs to be updated to include Sakaki's images.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
TheMachinesTeacher
n00b
n00b
Posts: 48
Joined: Sat Sep 09, 2017 6:06 am
Location: Somewhere over there

  • Quote

Post by TheMachinesTeacher » Thu Oct 03, 2019 7:11 pm

Hey I still have this exact problem and would like assistance with it. Crossdev version is crossdev-20190712 I will try 20190908 and get back to this thread

Code: Select all

/usr/libexec/gcc/aarch64-unknown-linux-gnu/ld: skipping incompatible /usr/aarch64-unknown-linux-gnu/usr/lib64/libc_nonshared.a when searching for /usr/lib64/libc_nonshared.a
/usr/libexec/gcc/aarch64-unknown-linux-gnu/ld: cannot find /usr/lib64/libc_nonshared.a inside /usr/aarch64-unknown-linux-gnu
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:985: libgcc_s.so] Error 1
Yes the file does exist. I'm not sure what is wrong with my configuration. Here are my environment variables that are relevant:

Code: Select all

CBUILD=x86_64-pc-linux-gnu
CTARGET=aarm64-unknown-linux-gnueabi
USER=root
ROOT=
PORTAGE_CONFIGROOT=
HOME=/root
CHOST=x86_64-pc-linux-gnu
SHELL=/bin/bash
TERM=xterm-256color
SHLVL=1
LOGNAME=root
XAUTHORITY=/root/.xauthkFKr6W
PATH=/sbin:/bin:/usr/sbin:/usr/bin
_=/usr/bin/printenv
Here is what I executed and what it told me:

Code: Select all

gentooEnv /home/ryan/RegOS # crossdev --stable -t aarch64-unknown-linux-gnu -oO /usr/local/portage-crossdev
-                                                                                                                                    
 * crossdev version:      20190712
 * Host Portage ARCH:     amd64
 * Target Portage ARCH:   arm64
 * Target System:         aarch64-unknown-linux-gnu
 * Stage:                 4 (C/C++ compiler)
 * USE=multilib:          no
 * ABIs:                  arm64

 * binutils:              binutils-[stable]
 * gcc:                   gcc-[stable]
 * headers:               linux-headers-[stable]
 * libc:                  glibc-[stable]

 * CROSSDEV_OVERLAY:      /usr/local/portage-crossdev
 * PORT_LOGDIR:           /var/log/portage
 * PORTAGE_CONFIGROOT:    /
 * Portage flags:         
                                                                                                                                     
 * leaving sys-devel/binutils in /usr/local/portage-crossdev
 * leaving sys-devel/gcc in /usr/local/portage-crossdev
 * leaving sys-kernel/linux-headers in /usr/local/portage-crossdev
 * leaving sys-libs/glibc in /usr/local/portage-crossdev
 * leaving sys-devel/gdb in /usr/local/portage-crossdev
                                                                                                                                     
 * Log: /var/log/portage/cross-aarch64-unknown-linux-gnu-binutils.log
 * Emerging cross-binutils ...                                                                                                 [ ok ]
 * Log: /var/log/portage/cross-aarch64-unknown-linux-gnu-linux-headers-quick.log
 * Emerging cross-linux-headers-quick ...                                                                                      [ ok ]
 * Log: /var/log/portage/cross-aarch64-unknown-linux-gnu-glibc-headers.log
 * Emerging cross-glibc-headers ...                                                                                            [ ok ]
 * Log: /var/log/portage/cross-aarch64-unknown-linux-gnu-gcc-stage1.log
 * Emerging cross-gcc-stage1 ...                                                                                               [ ok ]
 * Log: /var/log/portage/cross-aarch64-unknown-linux-gnu-linux-headers.log
 * Emerging cross-linux-headers ...                                                                                            [ ok ]
 * Log: /var/log/portage/cross-aarch64-unknown-linux-gnu-glibc.log
 * Emerging cross-glibc ...                                                                                                    [ ok ]
 * Log: /var/log/portage/cross-aarch64-unknown-linux-gnu-gcc-stage2.log
 * Emerging cross-gcc-stage2 ...

 * error: gcc failed :(
 * 
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-aarch64-unknown-linux-gnu-info.log
 * /var/log/portage/cross-aarch64-unknown-linux-gnu-gcc-stage2.log.xz
 * /var/tmp/portage/cross-aarch64-unknown-linux-gnu/gcc*/temp/gcc-config.logs.tar.xz
/usr/aarch64-unknown-linux-gnu/etc/portage/make.conf is:

Code: Select all

CHOST=aarch64-unknown-linux-gnu
CBUILD=x86_64-pc-linux-gnu

HOSTCC=${CBUILD}-gcc

ROOT=/usr/${CHOST}/

ACCEPT_KEYWORDS="${ARCH} ~${ARCH}"

USE="${ARCH} -pam"

CFLAGS="-O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

FEATURES="-collision-protect sandbox buildpkg noman noinfo nodoc"
# Be sure we dont overwrite pkgs from another repo..
PKGDIR=${ROOT}packages/
PORTAGE_TMPDIR=${ROOT}tmp/

PKG_CONFIG_PATH="${ROOT}usr/lib/pkgconfig/"

The info.log can be found here

I am having difficulties uploading the xz files. Any ideas?
Top
TheMachinesTeacher
n00b
n00b
Posts: 48
Joined: Sat Sep 09, 2017 6:06 am
Location: Somewhere over there

  • Quote

Post by TheMachinesTeacher » Thu Oct 03, 2019 7:54 pm

crossdev-20190908 did not solve my problem, unfortunately.

I'm sorry, my previous information here was inaccurate, but I have since edited this post.

crossdev-20190908 fails differently. In short:

Code: Select all

The directory that should contain system headers does not exist:
  /usr/aarch64-unknown-linux-gnueabi/usr/include
make[2]: *** [Makefile:3092: stmp-fixinc] Error 1
rm gfortran.pod gcc.pod
make[2]: Leaving directory '/var/tmp/portage/cross-aarch64-unknown-linux-gnueabi/gcc-9.2.0-r1/work/build/gcc'
make[1]: *** [Makefile:4319: all-gcc] Error 2
make[1]: Leaving directory '/var/tmp/portage/cross-aarch64-unknown-linux-gnueabi/gcc-9.2.0-r1/work/build'
make: *** [Makefile:955: all] Error 2
 * ERROR: cross-aarch64-unknown-linux-gnueabi/gcc-9.2.0-r1::crossdev failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=cross-aarch64-unknown-linux-gnueabi/gcc-9.2.0-r1::crossdev'`,
 * the complete build log and the output of `emerge -pqv '=cross-aarch64-unknown-linux-gnueabi/gcc-9.2.0-r1::crossdev'`.
 * The complete build log is located at '/var/tmp/portage/cross-aarch64-unknown-linux-gnueabi/gcc-9.2.0-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/cross-aarch64-unknown-linux-gnueabi/gcc-9.2.0-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/cross-aarch64-unknown-linux-gnueabi/gcc-9.2.0-r1/work/build'
 * S: '/var/tmp/portage/cross-aarch64-unknown-linux-gnueabi/gcc-9.2.0-r1/work/gcc-9.2.0'
 * 
 * Please include /var/tmp/portage/cross-aarch64-unknown-linux-gnueabi/gcc-9.2.0-r1/work/gcc-build-logs.tar.bz2 in your bug report.
 * 

>>> Failed to emerge cross-aarch64-unknown-linux-gnueabi/gcc-9.2.0-r1, Log file:

>>>  '/var/tmp/portage/cross-aarch64-unknown-linux-gnueabi/gcc-9.2.0-r1/temp/build.log'
/var/tmp/portage/cross-aarch64-unknown-linux-gnueabi/gcc-9.2.0-r1/work/gcc-build-logs.tar.bz2 has a bunch of compilation failures in confdefs.h I'm not sure the best way to upload these log files. wgetpaste doesn't work because they are too big. Any recommendations on good free file hosting?

Notice my local version of gcc is 8.3.0-r1, but crossdev is trying to emerge gcc-9.2.0-r1. I'm not sure if that matters.

I'm going to try an older version of crossdev to see if that works.
Last edited by TheMachinesTeacher on Mon Oct 07, 2019 6:09 pm, edited 2 times in total.
Top
kazestigma
n00b
n00b
User avatar
Posts: 9
Joined: Mon Sep 23, 2019 5:40 pm
Location: Italy

  • Quote

Post by kazestigma » Sun Oct 06, 2019 6:44 pm

I'm having the same issue as well with crossdev.
For now, I've decided to go with the chroot way suggested by NeddySeagoon using a stage3 tarball, but it would be nice to know what's causing this, regardless.
Top
kazestigma
n00b
n00b
User avatar
Posts: 9
Joined: Mon Sep 23, 2019 5:40 pm
Location: Italy

  • Quote

Post by kazestigma » Sat Oct 12, 2019 5:49 pm

After copying the libc_nonshared.a from my RPi4 to /usr/aarch64-unknown-linux-gnu/usr/lib64, gcc compiled without problems.

Code: Select all

 * crossdev version:      20190908
 * Host Portage ARCH:     amd64
 * Target Portage ARCH:   arm64
 * Target System:         aarch64-unknown-linux-gnu
 * Stage:                 4 (C/C++ compiler)
 * USE=multilib:          no
 * ABIs:                  arm64

 * binutils:              binutils-[latest]
 * gcc:                   gcc-[latest]
 * headers:               linux-headers-[latest]
 * libc:                  glibc-[latest]

 * CROSSDEV_OVERLAY:      /usr/local/portage-crossdev
 * PORT_LOGDIR:           /var/log/portage
 * PORTAGE_CONFIGROOT:    /
 * Portage flags:         
                                                                                                                      
 * leaving sys-devel/binutils in /usr/local/portage-crossdev
 * leaving sys-devel/gcc in /usr/local/portage-crossdev
 * leaving sys-kernel/linux-headers in /usr/local/portage-crossdev
 * leaving sys-libs/glibc in /usr/local/portage-crossdev
 * leaving sys-devel/gdb in /usr/local/portage-crossdev
 * leaving metadata/layout.conf alone in /usr/local/portage-crossdev
                                                                                                                      
 * Log: /var/log/portage/cross-aarch64-unknown-linux-gnu-binutils.log
 * Emerging cross-binutils ...                                                                                  [ ok ]
 * Log: /var/log/portage/cross-aarch64-unknown-linux-gnu-gcc-stage1.log
 * Emerging cross-gcc-stage1 ...                                                                                [ ok ]
 * Log: /var/log/portage/cross-aarch64-unknown-linux-gnu-linux-headers.log
 * Emerging cross-linux-headers ...                                                                             [ ok ]
 * Log: /var/log/portage/cross-aarch64-unknown-linux-gnu-glibc.log
 * Emerging cross-glibc ...                                                                                     [ ok ]
 * Log: /var/log/portage/cross-aarch64-unknown-linux-gnu-gcc-stage2.log
 * Emerging cross-gcc-stage2 ...                                                                                [ ok ]
So, grabbing this file off a stage3-aarch64 tarball should, in theory, fix the issue.
Top
n1ese
Tux's lil' helper
Tux's lil' helper
Posts: 87
Joined: Sun Sep 29, 2019 3:25 pm

  • Quote

Post by n1ese » Thu Oct 17, 2019 9:22 pm

kazestigma wrote:After copying the libc_nonshared.a from my RPi4 to /usr/aarch64-unknown-linux-gnu/usr/lib64, gcc compiled without problems.
Thanks, I'll give it a try
Top
n1ese
Tux's lil' helper
Tux's lil' helper
Posts: 87
Joined: Sun Sep 29, 2019 3:25 pm

  • Quote

Post by n1ese » Mon Oct 21, 2019 1:29 am

Success! I didn't have to copy lib_nonshared after all. Today I built a new Gentoo VM using the ~amd64 testing branch and updated everything. crossdev worked just fine afterwards.
Top
heroxbd
Developer
Developer
Posts: 31
Joined: Sun Dec 11, 2011 4:27 pm
Location: Kamioka, Hida, Japan

Same problem on mips64el and aarch64

  • Quote

Post by heroxbd » Wed Dec 25, 2019 7:12 am

I am having exactly the same problems for both mips64el and aarch64.
Top
Post Reply
  • Print view

21 posts • Page 1 of 1

Return to “Gentoo on ARM”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic