Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
wireguard on aarch64 compile fail
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
erg_samowzbudnik
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2011
Posts: 124
Location: uk/sticks

PostPosted: Thu Jan 23, 2020 8:25 pm    Post subject: wireguard on aarch64 compile fail Reply with quote

I get this error when compiling wireguard for RPi 3B+ in 64 bit mode:

Quote:
make: Entering directory '/var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/work/wireguard-tools-1.0.20200102/src'
CC /var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/work/wireguard-tools-1.0.20200102/src/wg.o
CC /var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/work/wireguard-tools-1.0.20200102/src/config.o
CC /var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/work/wireguard-tools-1.0.20200102/src/curve25519.o
CC /var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/work/wireguard-tools-1.0.20200102/src/encoding.o
CC /var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/work/wireguard-tools-1.0.20200102/src/ipc.o
CC /var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/work/wireguard-tools-1.0.20200102/src/mnlg.o
CC /var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/work/wireguard-tools-1.0.20200102/src/genkey.o
CC /var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/work/wireguard-tools-1.0.20200102/src/set.o
CC /var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/work/wireguard-tools-1.0.20200102/src/pubkey.o
CC /var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/work/wireguard-tools-1.0.20200102/src/setconf.o
CC /var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/work/wireguard-tools-1.0.20200102/src/terminal.o
CC /var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/work/wireguard-tools-1.0.20200102/src/showconf.o
CC /var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/work/wireguard-tools-1.0.20200102/src/show.o
LD /var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/work/wireguard-tools-1.0.20200102/src/wg
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: can not size stub section: invalid operation
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: linker stubs: file class ELFCLASSNONE incompatible with ELFCLASS64
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: final link failed: file in wrong format
collect2: error: ld returned 1 exit status
distcc[115] ERROR: compile (null) on localhost failed
make: *** [<builtin>: wg] Error 1
make: Leaving directory '/var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/work/wireguard-tools-1.0.20200102/src'
* ERROR: net-vpn/wireguard-tools-1.0.20200102::gentoo failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=net-vpn/wireguard-tools-1.0.20200102::gentoo'`,
* the complete build log and the output of `emerge -pqv '=net-vpn/wireguard-tools-1.0.20200102::gentoo'`.
* The complete build log is located at '/var/log/portage/net-vpn:wireguard-tools-1.0.20200102:20200123-200850.log'.
* For convenience, a symlink to the build log is located at '/var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/temp/environment'.
* Working directory: '/var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/work/wireguard-tools-1.0.20200102'
* S: '/var/tmp/portage/net-vpn/wireguard-tools-1.0.20200102/work/wireguard-tools-1.0.20200102'


I've just finished world upgrade and upgraded the kernel to 5.4.13, now other packages fail to build with the same error, not sure that is a coincidence.
Back to top
View user's profile Send private message
erg_samowzbudnik
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2011
Posts: 124
Location: uk/sticks

PostPosted: Fri Jan 24, 2020 10:54 am    Post subject: Reply with quote

So actually it's a wider problem, nothing compiles now. I have tried to recompile toolchain but sys-devel/gcc compilation fails with similar error, pasting the last part of the log where it crashes:

Quote:
aarch64-unknown-linux-gnu-g++ -std=gnu++98 -c -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -fno-PIE -I. -Ibuild -I/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/gcc -I/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/gcc/build -I/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/gcc/../include -I/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/gcc/../libcpp/include \
-o build/gencondmd.o build/gencondmd.c
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: can not size stub section: invalid operation
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: linker stubs: file class ELFCLASSNONE incompatible with ELFCLASS64
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: final link failed: file in wrong format
collect2: error: ld returned 1 exit status
distcc[28844] ERROR: compile (null) on localhost failed
make[3]: *** [Makefile:2867: build/genmatch] Error 1
make[3]: *** Waiting for unfinished jobs....
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: can not size stub section: invalid operation
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: linker stubs: file class ELFCLASSNONE incompatible with ELFCLASS64
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: final link failed: file in wrong format
collect2: error: ld returned 1 exit status
distcc[28806] ERROR: compile (null) on localhost failed
make[3]: *** [Makefile:2867: build/genautomata] Error 1
rm gcc.pod
make[3]: Leaving directory '/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/build/gcc'
make[2]: *** [Makefile:4667: all-stage1-gcc] Error 2
make[2]: Leaving directory '/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/build'
make[1]: *** [Makefile:23141: stage1-bubble] Error 2
make[1]: Leaving directory '/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/build'
make: *** [Makefile:23473: bootstrap-lean] Error 2
* ERROR: sys-devel/gcc-9.2.0-r3::gentoo failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=sys-devel/gcc-9.2.0-r3::gentoo'`,
* the complete build log and the output of `emerge -pqv '=sys-devel/gcc-9.2.0-r3::gentoo'`.
* The complete build log is located at '/var/log/portage/sys-devel:gcc-9.2.0-r3:20200124-102458.log'.
* For convenience, a symlink to the build log is located at '/var/tmp/portage/sys-devel/gcc-9.2.0-r3/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-9.2.0-r3/temp/environment'.
* Working directory: '/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/build'
* S: '/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0'


Not sure what info I should attach here.
Quote:
gcc-config -l
[1] aarch64-unknown-linux-gnu-9.2.0 *

make.conf contents:
Quote:
ACCEPT_KEYWORDS="arm64 ~arm64"
LICENCE="-* @EULA"

COMMON_FLAGS="-O2 -pipe"
CFLAGS="-march=armv8-a+crc -mtune=cortex-a53 -ftree-vectorize -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

# following NeddySeagoon following mgorny:
CPU_FLAGS_ARM="edsp neon thumb vfp vfpv3 vfpv4 vfp-d32 crc32 v4 v5 v6 v7 v8 thumb2"

CHOST="aarch64-unknown-linux-gnu"

FEATURES="distcc"
#FEATURES="getbinpkg"

FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable before changing.

# NOTE: This stage was built with the bindist Use flag enabled
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--fix-cortex-a53-843419 -Wl,--fix-cortex-a53-835769 -Wl,--no-map-whole-files"

L10N="en en-GB"
LINGUAS="en en_GB"

MAKEOPTS="-j17 -l4"
#MAKEOPTS="-j4"
#EMERGE_DEFAULT_OPTS="--jobs=4"
PORTAGE_NICENESS="-20"

INPUT_DEVICES="evdev synaptics"
VIDEO_CARDS="fbdev vc4"
#PYTHON_TARGETS="python3_7 python3_6"
#PORTAGE_BINHOST="http://bloodnoc.org/~roy/BINHOSTS/gcc-9.x/armv8a"
#PORTAGE_BINHOST="ssh://erg@192.168.1.150/usr/aarch64-unknown-linux-gnu/packages"

PORTAGE_ELOG_CLASSES="info warn error log qa"
PORT_LOGDIR=/var/log/portage/
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