Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge of ea400129c without fef8bd41f into zfs-2.1-release broke i386 build #12244

Closed
mmatuska opened this issue Jun 16, 2021 · 2 comments
Closed
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@mmatuska
Copy link
Contributor

mmatuska commented Jun 16, 2021

System information

FreeBSD stable/13 i386

Describe the problem you're observing

The changes in ea40012 (More aggsum optimizations) expect the commit fef8bd4 (libspl: implement atomics in terms of atomics) to be landed.

Merge of ea40012 without fef8bd4 broke the build on i386
The code does not build on i386.

Suggested solutions:
Option 1) merge fef8bd4 into zfs-2.1-release
Option 2) add patch to asm-i386/atomic.S from Alexander Motin: https://people.freebsd.org/~mav/zzz3S.patch

Describe how to reproduce the problem

Build OpenZFS 2.1.0-rc7 on i386

Include any warning/errors/backtraces from the system logs

ld: error: undefined symbol: atomic_load_64
>>> referenced by aggsum.c:119 (../../module/zfs/aggsum.c:119)
>>>               .libs/aggsum.o:(aggsum_lower_bound)
>>> referenced by aggsum.c:125 (../../module/zfs/aggsum.c:125)
>>>               .libs/aggsum.o:(aggsum_upper_bound)
>>> referenced by aggsum.c:218 (../../module/zfs/aggsum.c:218)
>>>               .libs/aggsum.o:(aggsum_compare)
>>> referenced 1 more times

ld: error: undefined symbol: atomic_store_64
>>> referenced by aggsum.c:157 (../../module/zfs/aggsum.c:157)
>>>               .libs/aggsum.o:(aggsum_value)
>>> referenced by aggsum.c:158 (../../module/zfs/aggsum.c:158)
>>>               .libs/aggsum.o:(aggsum_value)
>>> referenced by aggsum.c:199 (../../module/zfs/aggsum.c:199)
>>>               .libs/aggsum.o:(aggsum_add)
>>> referenced 3 more times
cc: error: linker command failed with exit code 1 (use -v to see invocation)
@mmatuska mmatuska added Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels Jun 16, 2021
@mmatuska
Copy link
Contributor Author

@behlendorf please take a look into this

mmatuska pushed a commit to mmatuska/zfs that referenced this issue Jun 18, 2021
Signed-Off-By: Martin Matuska <mm@FreeBSD.org>
Closes openzfs#12244
@mmatuska mmatuska changed the title Merge of e76373de7 without fef8bd41f into zfs-2.1-release broke i386 build Merge of ea400129c without fef8bd41f into zfs-2.1-release broke i386 build Jun 18, 2021
mmatuska pushed a commit to mmatuska/zfs that referenced this issue Jun 18, 2021
Signed-off-by: Martin Matuska <mm@FreeBSD.org>
Closes openzfs#12244
behlendorf pushed a commit that referenced this issue Jun 22, 2021
This replaces the generic libspl atomic.c atomics implementation
with one based on builtin gcc atomics.  This functionality was added
as an experimental feature in gcc 4.4.  Today even CentOS 7 ships
with gcc 4.8 as the default compiler we can make this the default.

Furthermore, the builtin atomics are as good or better than our
hand-rolled implementation so it's reasonable to drop that custom code.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #11904
Closes #12252
Closes #12244
@behlendorf
Copy link
Contributor

I've gone ahead and applied the alternate fix of applying all of fef8bd4 to the 2.1 release branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

2 participants