Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 704468 - net-vpn/wireguard-modules-0.0.20191226 - i686-pc-linux-gnu-ld: relocatable linking with relocations from format elf64-x86-64 (...) to format elf32-i386 (...) is not supported
Summary: net-vpn/wireguard-modules-0.0.20191226 - i686-pc-linux-gnu-ld: relocatable li...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jason A. Donenfeld
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-01 14:29 UTC by Joakim Tjernlund
Modified: 2020-07-02 05:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Tjernlund 2020-01-01 14:29:58 UTC
Kernel is 64 bits but user land is 32, makes wireguard build fail with:
>>  '/var/tmp/portage/net-vpn/wireguard-modules-0.0.20191226/temp/build.log'
 * Package:    net-vpn/wireguard-modules-0.0.20191226
 * Repository: gentoo
 * Maintainer: zx2c4@gentoo.org
 * USE:        abi_x86_32 elibc_glibc kernel_linux module userland_GNU x86
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     4.4.206
 * Checking for suitable kernel configuration options...
 [ ok ]
 * Preparing wireguard module
i686-pc-linux-gnu-ld: relocatable linking with relocations from format elf64-x86-64 (/var/tmp/portage/net-vpn/wireguard-modules-0.0.20191226/work/wireguard-linux-compat-0.0.20191226/src/crypto/zinc/poly1305/.tmp_poly1305.o) to format elf32-i386 (/var/tmp/portage/net-vpn/wireguard-modules-0.0.20191226/work/wireguard-linux-compat-0.0.20191226/src/crypto/zinc/poly1305/poly1305.o) is not supported
make[2]: *** [scripts/Makefile.build:278: /var/tmp/portage/net-vpn/wireguard-modules-0.0.20191226/work/wireguard-linux-compat-0.0.20191226/src/crypto/zinc/poly1305/poly1305.o] Error 1
make[2]: *** Waiting for unfinished jobs....
i686-pc-linux-gnu-ld: relocatable linking with relocations from format elf64-x86-64 (/var/tmp/portage/net-vpn/wireguard-modules-0.0.20191226/work/wireguard-linux-compat-0.0.20191226/src/crypto/zinc/chacha20/.tmp_chacha20.o) to format elf32-i386 (/var/tmp/portage/net-vpn/wireguard-modules-0.0.20191226/work/wireguard-linux-compat-0.0.20191226/src/crypto/zinc/chacha20/chacha20.o) is not supported
make[2]: *** [scripts/Makefile.build:278: /var/tmp/portage/net-vpn/wireguard-modules-0.0.20191226/work/wireguard-linux-compat-0.0.20191226/src/crypto/zinc/chacha20/chacha20.o] Error 1
i686-pc-linux-gnu-ld: relocatable linking with relocations from format elf64-x86-64 (/var/tmp/portage/net-vpn/wireguard-modules-0.0.20191226/work/wireguard-linux-compat-0.0.20191226/src/crypto/zinc/.tmp_chacha20poly1305.o) to format elf32-i386 (/var/tmp/portage/net-vpn/wireguard-modules-0.0.20191226/work/wireguard-linux-compat-0.0.20191226/src/crypto/zinc/chacha20poly1305.o) is not supported
make[2]: *** [scripts/Makefile.build:278: /var/tmp/portage/net-vpn/wireguard-modules-0.0.20191226/work/wireguard-linux-compat-0.0.20191226/src/crypto/zinc/chacha20poly1305.o] Error 1
i686-pc-linux-gnu-ld: relocatable linking with relocations from format elf64-x86-64 (/var/tmp/portage/net-vpn/wireguard-modules-0.0.20191226/work/wireguard-linux-compat-0.0.20191226/src/crypto/zinc/blake2s/.tmp_blake2s.o) to format elf32-i386 (/var/tmp/portage/net-vpn/wireguard-modules-0.0.20191226/work/wireguard-linux-compat-0.0.20191226/src/crypto/zinc/blake2s/blake2s.o) is not supported
make[2]: *** [scripts/Makefile.build:278: /var/tmp/portage/net-vpn/wireguard-modules-0.0.20191226/work/wireguard-linux-compat-0.0.20191226/src/crypto/zinc/blake2s/blake2s.o] Error 1
make[1]: *** [Makefile:1442: _module_/var/tmp/portage/net-vpn/wireguard-modules-0.0.20191226/work/wireguard-linux-compat-0.0.20191226/src] Error 2
make: *** [Makefile:38: module] Error 2
 * ERROR: net-vpn/wireguard-modules-0.0.20191226::gentoo failed (compile phase):
 *   emake failed
Comment 1 Joakim Tjernlund 2020-01-02 23:08:44 UTC
I forced some env. vars for this module:
# > cat /etc/portage/env/arch_x86_64.conf
LDEMULATION="elf_x86_64"
BUILD_FIXES="CFLAGS_MODULE=-m64 AFLAGS_MODULE=-m64"

Now it builds
Comment 2 Jason A. Donenfeld gentoo-dev 2020-06-22 21:58:32 UTC
(In reply to Joakim Tjernlund from comment #1)
> I forced some env. vars for this module:
> # > cat /etc/portage/env/arch_x86_64.conf
> LDEMULATION="elf_x86_64"
> BUILD_FIXES="CFLAGS_MODULE=-m64 AFLAGS_MODULE=-m64"
> 
> Now it builds

Is this therefore a bug? Anything I should be doing?
Comment 3 Jason A. Donenfeld gentoo-dev 2020-06-22 21:58:32 UTC
(In reply to Joakim Tjernlund from comment #1)
> I forced some env. vars for this module:
> # > cat /etc/portage/env/arch_x86_64.conf
> LDEMULATION="elf_x86_64"
> BUILD_FIXES="CFLAGS_MODULE=-m64 AFLAGS_MODULE=-m64"
> 
> Now it builds

Is this therefore a bug? Anything I should be doing?
Comment 4 Joakim Tjernlund 2020-07-02 05:48:14 UTC
(In reply to Jason A. Donenfeld from comment #3)
> (In reply to Joakim Tjernlund from comment #1)
> > I forced some env. vars for this module:
> > # > cat /etc/portage/env/arch_x86_64.conf
> > LDEMULATION="elf_x86_64"
> > BUILD_FIXES="CFLAGS_MODULE=-m64 AFLAGS_MODULE=-m64"
> > 
> > Now it builds
> 
> Is this therefore a bug? Anything I should be doing?

I think so, in tree modules build fine
Moticed that it is enough to just use
LDEMULATION="elf_x86_64"

I guess that ld is used to link somewhere rather than using gcc
Comment 5 Joakim Tjernlund 2020-07-02 05:50:01 UTC
(In reply to Joakim Tjernlund from comment #4)
> (In reply to Jason A. Donenfeld from comment #3)
> > (In reply to Joakim Tjernlund from comment #1)
> > > I forced some env. vars for this module:
> > > # > cat /etc/portage/env/arch_x86_64.conf
> > > LDEMULATION="elf_x86_64"
> > > BUILD_FIXES="CFLAGS_MODULE=-m64 AFLAGS_MODULE=-m64"
> > > 
> > > Now it builds
> > 
> > Is this therefore a bug? Anything I should be doing?
> 
> I think so, in tree modules build fine
> Moticed that it is enough to just use
> LDEMULATION="elf_x86_64"
> 
> I guess that ld is used to link somewhere rather than using gcc

or not passing CFLAGS when linking with gcc?