Cannot build erofs-utils 1.2: multiple definition of `sbi'

Gao Xiang hsiangkao at redhat.com
Tue Dec 8 21:46:26 AEDT 2020


Hi nl6720,

On Tue, Dec 08, 2020 at 12:35:42PM +0200, nl6720 wrote:
> Hi,
> 
> I'm having trouble building erofs-utils 1.2. It fails in "Making all in mkfs":
> 
> /bin/sh ../libtool  --tag=CC   --mode=link gcc -Wall -Werror -I../include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o mkfs.erofs mkfs_erofs-main.o -luuid  ../lib/liberofs.la  -R/usr/lib -llz4 
> libtool: link: gcc -Wall -Werror -I../include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z -Wl,relro -Wl,-z -Wl,now -o mkfs.erofs mkfs_erofs-main.o  -luuid ../lib/.libs/liberofs.a -llz4 -Wl,-rpath -Wl,/usr/lib
> /usr/bin/ld: ../lib/.libs/liberofs.a(liberofs_la-inode.o):(.bss+0x40000): multiple definition of `sbi'; ../lib/.libs/liberofs.a(liberofs_la-super.o):(.bss+0x0): first defined here
> 
> This is on Arch Linux with:
> binutils 2.35.1-1
> gcc 10.2.0-4
> libtool 2.4.6+42+gb88cebd5-14

Thanks for the quick feedback! since inode.o is for just mkfs, and super.o is for just erofsfuse,
so I didn't observe such issue before with my configuration... I think it may need a
temporary fix for packaging (if erofsfuse is unneeded, since lz4-1.9.3 is needed safely,
is just get rid of the one in lib/super.c, or move these two into lib/config.c....)
I will submit a formal submission later....

Thanks,
Gao Xiang



More information about the Linux-erofs mailing list