Re: vmlinux link failure on ia64 with zstd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Sep 14, 2020, at 11:48 PM, Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
> 
> On Tue, Sep 15, 2020 at 4:12 AM Nick Terrell <terrelln@xxxxxx> wrote:
>> 
>> 
>> 
>>> On Sep 13, 2020, at 12:51 PM, Ben Hutchings <ben@xxxxxxxxxxxxxxx> wrote:
>>> 
>>> Enabling CONFIG_RD_ZSTD (which is enabled by default) resulted in a
>>> link failure on ia64:
>>> 
>>> + ld -r -o vmlinux.o --whole-archive arch/ia64/kernel/head.o init/built-in.a usr/built-in.a arch/ia64/kernel/built-in.a arch/ia64/mm/built-in.a kernel/built-in.a certs/built-in.a mm/built-in.a fs/built-in.a ipc/built-in.a security/built-in.a crypto/built-in.a block/built-in.a lib/built-in.a arch/ia64/lib/built-in.a lib/lib.a arch/ia64/lib/lib.a drivers/built-in.a sound/built-in.a net/built-in.a virt/built-in.a arch/ia64/pci/built-in.a arch/ia64/hp/common/built-in.a --no-whole-archive --start-group --end-group
>>> ld: lib/zstd/entropy_common.o: linking constant-gp files with non-constant-gp files
>>> ld: failed to merge target specific data of file lib/zstd/entropy_common.o
>>> ld: lib/zstd/fse_decompress.o: linking constant-gp files with non-constant-gp files
>>> ld: failed to merge target specific data of file lib/zstd/fse_decompress.o
>>> ld: lib/zstd/zstd_common.o: linking constant-gp files with non-constant-gp files
>>> ld: failed to merge target specific data of file lib/zstd/zstd_common.o
>> 
>> I’ve never seen anything like this error before. I did some searching, and found that it may show up if an object file is empty.
>> 
>> These three files are all included in both the zstd_compress and the zstd_decompress modules. We used to exclude these 3 files from the zstd_decompress module when both modules are built-in. But then commit dc35da16a2e2 [0] removed that, because Kbuild is supposed to handle that case.
>> 
>> If you revert commit dc35da16a2e2 [0] does that fix the issue? I’m attempting to build with IA64, and I’ll let you know if I am able to reproduce the issue and test if this fixes it.
>> 
>> CC: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx> author of the commit and the linux-kbuild mailing list.
>> 
>> [0] https://github.com/torvalds/linux/commit/dc35da16a2e23db04822f0129cd5b28b7b0e72b4
> 
> 
> dc35da16a2e2 is more than two years old (i.e. v4.17)
> 
> Are we discussing a long-standing issue
> or something that arose recently?

It arose recently because I believe that zstd wasn’t enabled on any IA64 systems before recently.
But, I believe that the cause is that some of the object files contain no symbols, and binutils can’t
handle it on this architecture. I’m not 100% positive, because I haven’t been able to reproduce the
issue, since I haven’t yet been able to build with IA64.

-Nick

>> Best,
>> Nick
>> 
>>> This is seen on Debian unstable, with gcc 10.2 and binutils 2.35.  A
>>> full build log is available at:
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__buildd.debian.org_status_fetch.php-3Fpkg-3Dlinux-26arch-3Dia64-26ver-3D5.9-7Erc4-2D1-7Eexp1-26stamp-3D1599955166-26raw-3D1&d=DwIFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=HQM5IQdWOB8WaMoii2dYTw&m=zqqAl5yIf7XQV-QrVXwcu88cjrqLf9QedSMsg216RPo&s=dpKuoQBFAM1Z4q9XD9bSaSpK3o4WSELqyze8nMsxRgI&e= 
>>> 
>>> Ben.
>>> 
>>> --
>>> Ben Hutchings
>>> Humour is the best antidote to reality.
>>> 
>> 
> 
> 
> -- 
> Best Regards
> Masahiro Yamada





[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux