Page MenuHomeFreeBSD

[zfs] Fix LZ4 function definitions to not trip up the compile
ClosedPublic

Authored by adrian on Nov 16 2020, 4:43 PM.
Tags
None
Referenced Files
F132423641: D27240.id79610.diff
Thu, Oct 16, 7:47 PM
F132419346: D27240.id79610.diff
Thu, Oct 16, 6:55 PM
F132419343: D27240.id79666.diff
Thu, Oct 16, 6:55 PM
F132419342: D27240.id.diff
Thu, Oct 16, 6:55 PM
F132375155: D27240.diff
Thu, Oct 16, 8:41 AM
Unknown Object (File)
Mon, Oct 13, 3:29 AM
Unknown Object (File)
Sat, Sep 20, 3:12 AM
Unknown Object (File)
Sep 15 2025, 10:02 PM
Subscribers

Details

Summary

This is today (Nov 16 2020) head amd64; llvm tripped up in compiling
userland by noting that lz4_init/lz4_fini were lacking in being previously
defined.

So, just remove the extern and add it to lz4. So far so good.

Test Plan
  • compiled userland/kernel on amd64

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Nov 16 2020, 5:15 PM
brooks added a subscriber: brooks.

How did this work for anyone? I tripped on it in CheriBSD on aarch64 just now (this is with llvm ~11.0.0).

How did this work for anyone? I tripped on it in CheriBSD on aarch64 just now (this is with llvm ~11.0.0).

What was the exact error message? I never got that, and it always compiled just fine for me...

Apparently for me, _FAKE_KERNEL just never gets defined, so that part of the code never gets compiled. I have no idea where that define comes from. In the preprocessed lz4.i I simply do not see the offending code fragment at all.

In D27240#608670, @dim wrote:

Apparently for me, _FAKE_KERNEL just never gets defined, so that part of the code never gets compiled. I have no idea where that define comes from. In the preprocessed lz4.i I simply do not see the offending code fragment at all.

I'm guessing it's a bit like our _STANDALONE environment, but that's less well defined in the upstream code.